diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..79e40ad --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,52 @@ +name: Deploy static content to Pages + +on: + push: + branches: + - "main" # или ваша основная ветка, например, "main" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Pages + uses: actions/configure-pages@v4 + + # Устанавливаем Doxygen + - name: Install Doxygen + run: sudo apt install doxygen && doxygen --version + + # Устанавливаем Graphviz (если нужно для генерации графиков в Doxygen) + - name: Install Graphviz + run: sudo apt install graphviz + + # Создаем документацию + - name: Create documentation + run: doxygen + + # Загрузка артефакта (с учетом структуры папок) + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './docs/doxygen/html' # Указываем правильный путь к сгенерированной документации + + # Разворачиваем на GitHub Pages + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..d922b17 --- /dev/null +++ b/Doxyfile @@ -0,0 +1,48 @@ +# Основные настройки +PROJECT_NAME = "My Project" # Название проекта +PROJECT_BRIEF = "Project description" # Краткое описание проекта +OUTPUT_DIRECTORY = docs/doxygen # Папка для вывода документации +CREATE_SUBDIRS = NO # Не создавать подкаталоги для выходных файлов +EXTRACT_ALL = YES # Извлекать все комментарии (даже если нет тегов Doxygen) +EXTRACT_PRIVATE = YES # Включать приватные члены +EXTRACT_STATIC = YES # Включать статические функции и переменные +INLINE_SOURCES = YES # Включать исходный код в документацию +FILE_PATTERNS = *.h *.cpp # Паттерны для поиска исходных файлов +RECURSIVE = YES # Рекурсивный поиск по каталогам +ENABLE_PREPROCESSING = YES # Разрешить обработку препроцессора +MACRO_EXPANSION = YES # Разрешить расширение макросов +TCL_SUBST = YES # Разрешить обработку команд TCL + +# Формат вывода документации +GENERATE_HTML = YES # Генерация HTML документации +HTML_OUTPUT = html # Папка для вывода HTML файлов +HTML_EXTRA_STYLESHEET = "" # Кастомный файл стилей (если есть) + +# Формат LaTeX (если нужен) +GENERATE_LATEX = YES # Отключить генерацию LaTeX документации + + +# Использование Doxygen комментариев +ALIASES = "myalias=somealias" # Можно настроить пользовательские алиасы (не обязательно) +TEMPLATE_RELATIONS = YES # Включить создание связей между файлами и классами +HAVE_DOT = YES # Использовать Graphviz для генерации графиков и диаграмм + +# Функции и классы +EXTRACT_LOCAL_CLASSES = YES # Включать локальные классы в документацию +EXTRACT_LOCAL_METHODS = YES # Включать локальные методы в документацию + +# Включение/выключение различных типов документации +SHOW_FILES = YES # Показать файлы в документации +SHOW_NAMESPACES = YES # Показать пространства имен +SHOW_INCLUDE_FILES = YES # Показать включаемые файлы + +# Визуальные параметры +HTML_DYNAMIC_MENUS = YES # Включить динамические меню в HTML документации +HTML_COLORSTYLE = "yes" # Включить стилизацию документации + +# Включение тэгов Doxygen в комментариях +JAVADOC_AUTOBRIEF = YES # Автоматически добавлять краткое описание в JavaDoc стиле +DISTRIBUTE_GROUPS = YES # Разрешить группировку документации + +# Путь к исходным файлам +INPUT = ./server ./client # Путь к вашим исходным файлам diff --git a/client/Singleton.h b/client/Singleton.h index abdbd0c..69846cf 100644 --- a/client/Singleton.h +++ b/client/Singleton.h @@ -1,5 +1,6 @@ #ifndef SINGLETON_H #define SINGLETON_H + #include #include #include @@ -7,47 +8,79 @@ #include #include - -class ClientSingleton; - - +/** + * @brief Разрушитель Singleton для корректного удаления ClientSingleton. + */ class ClientSingletonDestroyer { - private: - ClientSingleton * p_instance; - public: - ~ClientSingletonDestroyer(); - void initialize(ClientSingleton * p); +private: + ClientSingleton* p_instance; /**< Указатель на экземпляр ClientSingleton */ +public: + /** + * @brief Деструктор. Удаляет экземпляр ClientSingleton. + */ + ~ClientSingletonDestroyer(); + + /** + * @brief Инициализирует указатель на Singleton. + * @param p Указатель на экземпляр ClientSingleton. + */ + void initialize(ClientSingleton* p); }; - -class ClientSingleton : public QObject -{ +/** + * @brief Сетевой клиент, реализующий паттерн Singleton. + * + * Используется для подключения к серверу, отправки и получения данных. + */ +class ClientSingleton : public QObject { Q_OBJECT + private: - static ClientSingleton * p_instance; - static ClientSingletonDestroyer destroyer; - QTcpSocket* socket; + static ClientSingleton* p_instance; /**< Указатель на экземпляр Singleton */ + static ClientSingletonDestroyer destroyer; /**< Объект-разрушитель */ + QTcpSocket* socket; /**< Сокет для соединения с сервером */ + protected: - ClientSingleton(); //соед с сервером - ~ClientSingleton(); // закрыть соед - ClientSingleton(const ClientSingleton&) = delete; - ClientSingleton& operator=(const ClientSingleton&) = delete; + /** + * @brief Конструктор по умолчанию. Устанавливает соединение с сервером. + */ + ClientSingleton(); + + /** + * @brief Деструктор. Закрывает соединение с сервером. + */ + ~ClientSingleton(); + + ClientSingleton(const ClientSingleton&) = delete; /**< Запрещено копирование */ + ClientSingleton& operator=(const ClientSingleton&) = delete; /**< Запрещено присваивание */ friend class ClientSingletonDestroyer; public: + /** + * @brief Получить экземпляр Singleton. + * @return Ссылка на экземпляр ClientSingleton. + */ static ClientSingleton& getInstance(); - QByteArray send_msg(QStringList); + + /** + * @brief Отправляет сообщение серверу. + * @param list Список строк с данными для отправки. + * @return Ответ от сервера в виде QByteArray. + */ + QByteArray send_msg(QStringList list); + public slots: + /** + * @brief Слот вызывается при успешном соединении с сервером. + */ void slot_connected(); + + /** + * @brief Слот вызывается при получении данных от сервера. + */ void slot_readyRead(); }; - - - - - - #endif // SINGLETON_H diff --git a/client/add_product.h b/client/add_product.h index 94609e7..e72c00d 100644 --- a/client/add_product.h +++ b/client/add_product.h @@ -3,31 +3,64 @@ #include #include + namespace Ui { class AddProductWindow; } +/** + * @brief Класс окна для добавления нового продукта. + * + * Этот класс предоставляет пользовательский интерфейс для ввода информации + * о продукте (название, белки, жиры, углеводы, вес, цена, тип) и отправки этих данных. + */ class AddProductWindow : public QWidget { Q_OBJECT public: + /** + * @brief Конструктор окна добавления продукта. + * @param parent Родительский виджет. + */ explicit AddProductWindow(QWidget *parent = nullptr); - ~AddProductWindow(); - -private: - Ui::AddProductWindow *ui; + /** + * @brief Деструктор. + */ + ~AddProductWindow(); signals: + /** + * @brief Сигнал, испускаемый после успешного добавления продукта. + * @param name Название продукта. + * @param proteins Количество белков. + * @param fats Количество жиров. + * @param carbs Количество углеводов. + * @param weight Вес продукта. + * @param cost Стоимость продукта. + * @param type Тип продукта. + */ void productAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type); - public slots: + /** + * @brief Очистка всех полей ввода. + */ void clear(); + + /** + * @brief Отображение окна добавления продукта. + */ void slot_show(); +private: + Ui::AddProductWindow *ui; /**< Указатель на интерфейс UI. */ + private slots: + /** + * @brief Обработчик нажатия кнопки добавления продукта. + */ void on_add_clicked(); }; diff --git a/client/authregwindow.h b/client/authregwindow.h index 5865867..8d2d106 100644 --- a/client/authregwindow.h +++ b/client/authregwindow.h @@ -4,34 +4,75 @@ #include #include "functions_for_client.h" - QT_BEGIN_NAMESPACE namespace Ui { class AuthRegWindow; } QT_END_NAMESPACE +/** + * @brief Класс окна авторизации и регистрации. + * + * Этот класс реализует окно для входа в систему и создания нового аккаунта. + * Содержит обработчики для переключения между формами, а также подтверждения входа/регистрации. + */ class AuthRegWindow : public QMainWindow { Q_OBJECT public: + /** + * @brief Конструктор окна авторизации/регистрации. + * @param parent Родительский виджет. + */ AuthRegWindow(QWidget *parent = nullptr); + + /** + * @brief Деструктор. + */ ~AuthRegWindow(); private slots: + /** + * @brief Обработчик нажатия кнопки "Регистрация". + * Переключает окно в режим регистрации. + */ void on_toRegButton_clicked(); + /** + * @brief Обработчик подтверждения регистрации. + * Отправляет данные нового пользователя на сервер. + */ void on_regButton_clicked(); + /** + * @brief Обработчик подтверждения входа. + * Отправляет данные пользователя на сервер для авторизации. + */ void on_loginButton_clicked(); signals: + /** + * @brief Сигнал об успешной авторизации. + * @param id Идентификатор пользователя. + * @param login Логин пользователя. + * @param email Электронная почта пользователя. + */ void auth_ok(QString id, QString login, QString email); private: - Ui::AuthRegWindow *ui; - void change_type_to_reg(bool); + Ui::AuthRegWindow *ui; /**< Указатель на интерфейс. */ + + /** + * @brief Вспомогательная функция переключения режима окна. + * @param to_reg Если true — включается режим регистрации. + */ + void change_type_to_reg(bool to_reg); + + /** + * @brief Очистка всех полей ввода. + */ void clear(); }; + #endif // AUTHREGWINDOW_H diff --git a/client/functions_for_client.h b/client/functions_for_client.h index 2036bdd..89e7c87 100644 --- a/client/functions_for_client.h +++ b/client/functions_for_client.h @@ -4,26 +4,111 @@ #include #include "Singleton.h" - +/** + * @brief Авторизация пользователя. + * @param login Логин пользователя. + * @param password Пароль пользователя. + * @return Ответ от сервера. + */ QString auth(QString login, QString password); + +/** + * @brief Регистрация нового пользователя. + * @param login Логин пользователя. + * @param password Пароль. + * @param email Электронная почта. + * @return true, если регистрация успешна; иначе — false. + */ bool reg(QString login, QString password, QString email); -QString get_stable_stat(/* какие-то аргументы, если потребуются */); -QString get_dynamic_stat(/* какие-то аргументы, если потребуются */); + +/** + * @brief Получение стабильной статистики. + * @return JSON-строка с данными статистики. + */ +QString get_stable_stat(); + +/** + * @brief Получение динамической статистики. + * @return JSON-строка с данными статистики. + */ +QString get_dynamic_stat(); + +/** + * @brief Получение списка всех пользователей. + * @return Массив байтов с данными пользователей. + */ QByteArray get_all_users(); -QByteArray check_task(/*QStringList*/); -QByteArray menu_export(/*QStringList*/); +/** + * @brief Проверка задачи (рациона). + * @return Массив байтов с результатом проверки. + */ +QByteArray check_task(); + +/** + * @brief Экспорт меню. + * @return Массив байтов с экспортированными данными. + */ +QByteArray menu_export(); + +/** + * @brief Получение всех продуктов пользователя. + * @param userId Идентификатор пользователя. + * @return Массив байтов с продуктами. + */ QByteArray get_products(QString userId); +/** + * @brief Добавление нового продукта. + * @param id Идентификатор пользователя. + * @param name Название продукта. + * @param proteins Количество белков. + * @param fats Количество жиров. + * @param carbs Количество углеводов. + * @param weight Вес продукта. + * @param cost Стоимость продукта. + * @param type Тип продукта. + * @return Массив байтов с результатом операции. + */ QByteArray add_product(QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type); +/** + * @brief Получение общего количества пользователей. + * @return Количество пользователей. + */ int get_user_count(); + +/** + * @brief Получение общего количества продуктов. + * @return Количество продуктов. + */ int get_product_count(); + +/** + * @brief Получение количества входов за неделю. + * @return Количество входов. + */ int get_weekly_logins(); + +/** + * @brief Получение количества входов за месяц. + * @return Количество входов. + */ int get_monthly_logins(); -QByteArray add_favorite_ration(const QStringList& container); -bool add_ration_to_favorites(const QString& userId, const QString& rationId); +/** + * @brief Добавление рациона в избранное. + * @param container Контейнер с параметрами рациона. + * @return Массив байтов с результатом добавления. + */ +QByteArray add_favorite_ration(const QStringList& container); +/** + * @brief Добавление существующего рациона в избранное. + * @param userId Идентификатор пользователя. + * @param rationId Идентификатор рациона. + * @return true, если успешно; иначе — false. + */ +bool add_ration_to_favorites(const QString& userId, const QString& rationId); #endif // FUNCTIONS_FOR_CLIENT_H diff --git a/client/mainwindow.h b/client/mainwindow.h index e5e3562..4abead2 100644 --- a/client/mainwindow.h +++ b/client/mainwindow.h @@ -11,37 +11,102 @@ namespace Ui { class MainWindow; } +/** + * @brief Главное окно клиента. + * + * Отвечает за отображение основной информации, взаимодействие с продуктами, + * пользователями, рационом и статистикой. + */ class MainWindow : public QMainWindow { Q_OBJECT public: + /** + * @brief Конструктор класса MainWindow. + * @param parent Родительский виджет. + */ explicit MainWindow(QWidget *parent = nullptr); + + /** + * @brief Деструктор. + */ ~MainWindow(); - QString id; - QString login; - QString password; - QString email; + QString id; ///< Идентификатор текущего пользователя. + QString login; ///< Логин пользователя. + QString password; ///< Пароль пользователя. + QString email; ///< Электронная почта пользователя. public slots: + /** + * @brief Показывает главное окно. + */ void slot_show(); + + /** + * @brief Устанавливает данные текущего пользователя. + * @param id Идентификатор пользователя. + * @param login Логин. + * @param email Электронная почта. + */ void set_current_user(QString id, QString login, QString email); - void handleProductAdded( QString name, int proteins, int fats, int carbs, int weight, int cost, int type); + + /** + * @brief Обрабатывает добавление нового продукта. + * @param name Название продукта. + * @param proteins Белки. + * @param fats Жиры. + * @param carbs Углеводы. + * @param weight Вес. + * @param cost Стоимость. + * @param type Тип продукта. + */ + void handleProductAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type); private: - Ui::MainWindow *ui; + Ui::MainWindow *ui; ///< Указатель на UI-элементы окна. private slots: + /** + * @brief Обработчик нажатия на кнопку "Стабильная статистика". + */ void on_stableStatButton_clicked(); + + /** + * @brief Обработчик нажатия на кнопку "Динамическая статистика". + */ void on_dynamicStatButton_clicked(); + + /** + * @brief Обработчик нажатия на кнопку "Список пользователей". + */ void on_tableUsersButton_clicked(); + + /** + * @brief Обработчик нажатия на кнопку "Список продуктов". + */ void on_productListButton_clicked(); + + /** + * @brief Обработчик нажатия на кнопку "Создать рацион". + */ void on_createMenButton_clicked(); + + /** + * @brief Обработчик нажатия на кнопку "Добавить продукт". + */ void on_addProductButton_clicked(); + + /** + * @brief Обработчик нажатия на кнопку "Выход". + */ void on_exitButton_clicked(); signals: + /** + * @brief Сигнал, указывающий на необходимость открыть окно добавления продукта. + */ void add_product(); }; diff --git a/client/managerforms.h b/client/managerforms.h index 61849c9..d772cf4 100644 --- a/client/managerforms.h +++ b/client/managerforms.h @@ -11,19 +11,32 @@ namespace Ui { class ManagerForms; } +/** + * @brief Класс для управления окнами приложения. + * + * Отвечает за создание и переключение между окнами авторизации, + * главного интерфейса и окна добавления продукта. + */ class ManagerForms : public QMainWindow { Q_OBJECT public: + /** + * @brief Конструктор класса ManagerForms. + * @param parent Родительский виджет. + */ explicit ManagerForms(QWidget *parent = nullptr); + + /** + * @brief Деструктор. + */ ~ManagerForms(); private: - AuthRegWindow * curr_auth; - MainWindow * main; - AddProductWindow * addProductWindow; + AuthRegWindow *curr_auth; ///< Указатель на окно авторизации и регистрации. + MainWindow *main; ///< Указатель на главное окно приложения. + AddProductWindow *addProductWindow; ///< Указатель на окно добавления продукта. }; - #endif // MANAGERFORMS_H diff --git a/client/menuCard.h b/client/menuCard.h index 450a2aa..103f6f0 100644 --- a/client/menuCard.h +++ b/client/menuCard.h @@ -7,16 +7,36 @@ namespace Ui { class menuCard; } +/** + * @brief Виджет отображения информации о рационе питания. + * + * Показывает данные за определённый день: список продуктов, калорийность, + * содержание БЖУ, вес и цену. + */ class menuCard : public QWidget { Q_OBJECT public: + /** + * @brief Конструктор виджета menuCard. + * @param day День недели или дата. + * @param products Список продуктов в рационе. + * @param calories Общее количество калорий. + * @param pfc Вектор, содержащий значения белков, жиров и углеводов. + * @param weight Общий вес рациона. + * @param price Общая стоимость рациона. + * @param parent Родительский виджет. + */ explicit menuCard(QString day, QStringList products, int calories, QVector& pfc, int weight, int price, QWidget *parent = nullptr); + + /** + * @brief Деструктор. + */ ~menuCard(); private: - Ui::menuCard *ui; + Ui::menuCard *ui; ///< UI-компоненты, сгенерированные Qt Designer. }; #endif // MENUCARD_H diff --git a/client/productCard.h b/client/productCard.h index 80d4383..238caa5 100644 --- a/client/productCard.h +++ b/client/productCard.h @@ -1,9 +1,23 @@ #pragma once #include - +/** + * @brief Виджет карточки продукта. + * + * Отображает информацию о продукте: название, цену и пищевую ценность (белки, жиры, углеводы). + */ class productCard : public QWidget { Q_OBJECT + public: + /** + * @brief Конструктор карточки продукта. + * @param name Название продукта. + * @param price Стоимость продукта. + * @param proteins Количество белков. + * @param fatness Количество жиров. + * @param carbs Количество углеводов. + * @param parent Родительский виджет. + */ explicit productCard(QString name, int price, int proteins, int fatness, int carbs, QWidget *parent = nullptr); }; diff --git "a/docs/C\321\202\321\200\321\203\320\272\321\202\321\203\321\200\320\260 Git.png" "b/docs/C\321\202\321\200\321\203\320\272\321\202\321\203\321\200\320\260 Git.png" new file mode 100644 index 0000000..1556cfa Binary files /dev/null and "b/docs/C\321\202\321\200\321\203\320\272\321\202\321\203\321\200\320\260 Git.png" differ diff --git a/docs/UseCase.png b/docs/UseCase.png new file mode 100644 index 0000000..a528822 Binary files /dev/null and b/docs/UseCase.png differ diff --git a/docs/doxygen/html/_singleton_8cpp.html b/docs/doxygen/html/_singleton_8cpp.html new file mode 100644 index 0000000..6c42077 --- /dev/null +++ b/docs/doxygen/html/_singleton_8cpp.html @@ -0,0 +1,142 @@ + + + + + + + +My Project: client/Singleton.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Singleton.cpp File Reference
+
+
+
#include "Singleton.h"
+
+Include dependency graph for Singleton.cpp:
+
+
+ + + + + + + + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/_singleton_8cpp__incl.dot b/docs/doxygen/html/_singleton_8cpp__incl.dot new file mode 100644 index 0000000..c247a45 --- /dev/null +++ b/docs/doxygen/html/_singleton_8cpp__incl.dot @@ -0,0 +1,22 @@ +digraph "client/Singleton.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/Singleton.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node5 [id="edge4_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node6 [id="edge5_Node000002_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge6_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node8 [id="edge7_Node000002_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/_singleton_8cpp__incl.map b/docs/doxygen/html/_singleton_8cpp__incl.map new file mode 100644 index 0000000..d41b18c --- /dev/null +++ b/docs/doxygen/html/_singleton_8cpp__incl.map @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/_singleton_8cpp__incl.md5 b/docs/doxygen/html/_singleton_8cpp__incl.md5 new file mode 100644 index 0000000..b1d8939 --- /dev/null +++ b/docs/doxygen/html/_singleton_8cpp__incl.md5 @@ -0,0 +1 @@ +7e48afa46b089cf50f6847134f0dc351 \ No newline at end of file diff --git a/docs/doxygen/html/_singleton_8cpp__incl.png b/docs/doxygen/html/_singleton_8cpp__incl.png new file mode 100644 index 0000000..66af76d Binary files /dev/null and b/docs/doxygen/html/_singleton_8cpp__incl.png differ diff --git a/docs/doxygen/html/_singleton_8h.html b/docs/doxygen/html/_singleton_8h.html new file mode 100644 index 0000000..cb97903 --- /dev/null +++ b/docs/doxygen/html/_singleton_8h.html @@ -0,0 +1,191 @@ + + + + + + + +My Project: client/Singleton.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
Singleton.h File Reference
+
+
+
#include <QObject>
+#include <QTcpSocket>
+#include <QtNetwork>
+#include <QByteArray>
+#include <QDebug>
+#include <QStringList>
+
+Include dependency graph for Singleton.h:
+
+
+ + + + + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + + + + +

+Classes

class  ClientSingletonDestroyer
 Разрушитель Singleton для корректного удаления ClientSingleton. More...
 
class  ClientSingleton
 Сетевой клиент, реализующий паттерн Singleton. More...
 
+
+
+ + + + diff --git a/docs/doxygen/html/_singleton_8h.js b/docs/doxygen/html/_singleton_8h.js new file mode 100644 index 0000000..9dcd005 --- /dev/null +++ b/docs/doxygen/html/_singleton_8h.js @@ -0,0 +1,5 @@ +var _singleton_8h = +[ + [ "ClientSingletonDestroyer", "class_client_singleton_destroyer.html", "class_client_singleton_destroyer" ], + [ "ClientSingleton", "class_client_singleton.html", "class_client_singleton" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/_singleton_8h__dep__incl.dot b/docs/doxygen/html/_singleton_8h__dep__incl.dot new file mode 100644 index 0000000..27b83af --- /dev/null +++ b/docs/doxygen/html/_singleton_8h__dep__incl.dot @@ -0,0 +1,32 @@ +digraph "client/Singleton.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/Singleton.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/Singleton.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/functions_for\l_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge4_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/authregwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8cpp.html",tooltip=" "]; + Node4 -> Node6 [id="edge5_Node000004_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node6 -> Node7 [id="edge6_Node000006_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node6 -> Node8 [id="edge7_Node000006_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node6 -> Node9 [id="edge8_Node000006_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; + Node3 -> Node7 [id="edge9_Node000003_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 -> Node10 [id="edge10_Node000003_Node000010",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="client/mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node10 -> Node7 [id="edge11_Node000010_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node10 -> Node11 [id="edge12_Node000010_Node000011",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node10 -> Node6 [id="edge13_Node000010_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node6 [id="edge14_Node000001_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/html/_singleton_8h__dep__incl.map b/docs/doxygen/html/_singleton_8h__dep__incl.map new file mode 100644 index 0000000..5810499 --- /dev/null +++ b/docs/doxygen/html/_singleton_8h__dep__incl.map @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/_singleton_8h__dep__incl.md5 b/docs/doxygen/html/_singleton_8h__dep__incl.md5 new file mode 100644 index 0000000..c0a5327 --- /dev/null +++ b/docs/doxygen/html/_singleton_8h__dep__incl.md5 @@ -0,0 +1 @@ +114c2c713d46826095bf9ce76714dfa5 \ No newline at end of file diff --git a/docs/doxygen/html/_singleton_8h__dep__incl.png b/docs/doxygen/html/_singleton_8h__dep__incl.png new file mode 100644 index 0000000..54337d0 Binary files /dev/null and b/docs/doxygen/html/_singleton_8h__dep__incl.png differ diff --git a/docs/doxygen/html/_singleton_8h__incl.dot b/docs/doxygen/html/_singleton_8h__incl.dot new file mode 100644 index 0000000..5e05ba6 --- /dev/null +++ b/docs/doxygen/html/_singleton_8h__incl.dot @@ -0,0 +1,20 @@ +digraph "client/Singleton.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/Singleton.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge6_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/_singleton_8h__incl.map b/docs/doxygen/html/_singleton_8h__incl.map new file mode 100644 index 0000000..1f17694 --- /dev/null +++ b/docs/doxygen/html/_singleton_8h__incl.map @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/_singleton_8h__incl.md5 b/docs/doxygen/html/_singleton_8h__incl.md5 new file mode 100644 index 0000000..6e057e8 --- /dev/null +++ b/docs/doxygen/html/_singleton_8h__incl.md5 @@ -0,0 +1 @@ +6a7d1ee2f9a582344bff2a1f3728ea6d \ No newline at end of file diff --git a/docs/doxygen/html/_singleton_8h__incl.png b/docs/doxygen/html/_singleton_8h__incl.png new file mode 100644 index 0000000..9c8c42e Binary files /dev/null and b/docs/doxygen/html/_singleton_8h__incl.png differ diff --git a/docs/doxygen/html/_singleton_8h_source.html b/docs/doxygen/html/_singleton_8h_source.html new file mode 100644 index 0000000..4d72e57 --- /dev/null +++ b/docs/doxygen/html/_singleton_8h_source.html @@ -0,0 +1,190 @@ + + + + + + + +My Project: client/Singleton.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Singleton.h
+
+
+Go to the documentation of this file.
1#ifndef SINGLETON_H
+
2#define SINGLETON_H
+
3
+
4#include <QObject>
+
5#include <QTcpSocket>
+
6#include <QtNetwork>
+
7#include <QByteArray>
+
8#include <QDebug>
+
9#include <QStringList>
+
10
+
+ +
15private:
+ +
17public:
+ +
22
+ +
28};
+
+
29
+
30
+
+
36class ClientSingleton : public QObject {
+
37 Q_OBJECT
+
38
+
39private:
+ + +
42 QTcpSocket* socket;
+
43
+
44protected:
+ +
49
+ +
54
+ + +
57
+ +
59
+
60public:
+ +
66
+
72 QByteArray send_msg(QStringList list);
+
73
+
74public slots:
+
78 void slot_connected();
+
79
+
83 void slot_readyRead();
+
84};
+
+
85
+
86#endif // SINGLETON_H
+
Разрушитель Singleton для корректного удаления ClientSingleton.
Definition Singleton.h:14
+
~ClientSingletonDestroyer()
Деструктор.
Definition Singleton.cpp:6
+
void initialize(ClientSingleton *p)
Инициализирует указатель на Singleton.
Definition Singleton.cpp:23
+
ClientSingleton * p_instance
Указатель на экземпляр ClientSingleton.
Definition Singleton.h:16
+
Сетевой клиент, реализующий паттерн Singleton.
Definition Singleton.h:36
+
static ClientSingleton * p_instance
Указатель на экземпляр Singleton.
Definition Singleton.h:40
+
QTcpSocket * socket
Сокет для соединения с сервером
Definition Singleton.h:42
+
~ClientSingleton()
Деструктор.
Definition Singleton.cpp:49
+
ClientSingleton()
Конструктор по умолчанию.
Definition Singleton.cpp:28
+
static ClientSingletonDestroyer destroyer
Объект-разрушитель
Definition Singleton.h:41
+
ClientSingleton & operator=(const ClientSingleton &)=delete
Запрещено присваивание
+
ClientSingleton(const ClientSingleton &)=delete
Запрещено копирование
+
friend class ClientSingletonDestroyer
Definition Singleton.h:58
+
void slot_readyRead()
Слот вызывается при получении данных от сервера.
Definition Singleton.cpp:95
+
void slot_connected()
Слот вызывается при успешном соединении с сервером.
Definition Singleton.cpp:91
+
static ClientSingleton & getInstance()
Получить экземпляр Singleton.
Definition Singleton.cpp:13
+
QByteArray send_msg(QStringList list)
Отправляет сообщение серверу.
Definition Singleton.cpp:54
+
+
+ + + + diff --git a/docs/doxygen/html/add__product_8cpp.html b/docs/doxygen/html/add__product_8cpp.html new file mode 100644 index 0000000..48c222b --- /dev/null +++ b/docs/doxygen/html/add__product_8cpp.html @@ -0,0 +1,137 @@ + + + + + + + +My Project: client/add_product.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
add_product.cpp File Reference
+
+
+
#include "add_product.h"
+#include "ui_add_product.h"
+
+Include dependency graph for add_product.cpp:
+
+
+ + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/add__product_8cpp__incl.dot b/docs/doxygen/html/add__product_8cpp__incl.dot new file mode 100644 index 0000000..bb2a5cd --- /dev/null +++ b/docs/doxygen/html/add__product_8cpp__incl.dot @@ -0,0 +1,16 @@ +digraph "client/add_product.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/add_product.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="ui_add_product.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/add__product_8cpp__incl.map b/docs/doxygen/html/add__product_8cpp__incl.map new file mode 100644 index 0000000..9cb0d30 --- /dev/null +++ b/docs/doxygen/html/add__product_8cpp__incl.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/doxygen/html/add__product_8cpp__incl.md5 b/docs/doxygen/html/add__product_8cpp__incl.md5 new file mode 100644 index 0000000..5d6bd88 --- /dev/null +++ b/docs/doxygen/html/add__product_8cpp__incl.md5 @@ -0,0 +1 @@ +7ef3685c6bfcfd005d8ca901a9bafb61 \ No newline at end of file diff --git a/docs/doxygen/html/add__product_8cpp__incl.png b/docs/doxygen/html/add__product_8cpp__incl.png new file mode 100644 index 0000000..3827414 Binary files /dev/null and b/docs/doxygen/html/add__product_8cpp__incl.png differ diff --git a/docs/doxygen/html/add__product_8h.html b/docs/doxygen/html/add__product_8h.html new file mode 100644 index 0000000..b96b152 --- /dev/null +++ b/docs/doxygen/html/add__product_8h.html @@ -0,0 +1,168 @@ + + + + + + + +My Project: client/add_product.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
add_product.h File Reference
+
+
+
#include <QWidget>
+#include <QMessageBox>
+
+Include dependency graph for add_product.h:
+
+
+ + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  AddProductWindow
 Класс окна для добавления нового продукта. More...
 
+ + + +

+Namespaces

namespace  Ui
 
+
+
+ + + + diff --git a/docs/doxygen/html/add__product_8h.js b/docs/doxygen/html/add__product_8h.js new file mode 100644 index 0000000..313154e --- /dev/null +++ b/docs/doxygen/html/add__product_8h.js @@ -0,0 +1,4 @@ +var add__product_8h = +[ + [ "AddProductWindow", "class_add_product_window.html", "class_add_product_window" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/add__product_8h__dep__incl.dot b/docs/doxygen/html/add__product_8h__dep__incl.dot new file mode 100644 index 0000000..2b3a224 --- /dev/null +++ b/docs/doxygen/html/add__product_8h__dep__incl.dot @@ -0,0 +1,18 @@ +digraph "client/add_product.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/add_product.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/add_product.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node3 -> Node5 [id="edge4_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node3 -> Node6 [id="edge5_Node000003_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/add__product_8h__dep__incl.map b/docs/doxygen/html/add__product_8h__dep__incl.map new file mode 100644 index 0000000..cc181e2 --- /dev/null +++ b/docs/doxygen/html/add__product_8h__dep__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/doxygen/html/add__product_8h__dep__incl.md5 b/docs/doxygen/html/add__product_8h__dep__incl.md5 new file mode 100644 index 0000000..e2c087b --- /dev/null +++ b/docs/doxygen/html/add__product_8h__dep__incl.md5 @@ -0,0 +1 @@ +326562ad365f6409315c1171b9bb7ad7 \ No newline at end of file diff --git a/docs/doxygen/html/add__product_8h__dep__incl.png b/docs/doxygen/html/add__product_8h__dep__incl.png new file mode 100644 index 0000000..13974c8 Binary files /dev/null and b/docs/doxygen/html/add__product_8h__dep__incl.png differ diff --git a/docs/doxygen/html/add__product_8h__incl.dot b/docs/doxygen/html/add__product_8h__incl.dot new file mode 100644 index 0000000..b618bca --- /dev/null +++ b/docs/doxygen/html/add__product_8h__incl.dot @@ -0,0 +1,12 @@ +digraph "client/add_product.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/add_product.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/add__product_8h__incl.map b/docs/doxygen/html/add__product_8h__incl.map new file mode 100644 index 0000000..82769e0 --- /dev/null +++ b/docs/doxygen/html/add__product_8h__incl.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/doxygen/html/add__product_8h__incl.md5 b/docs/doxygen/html/add__product_8h__incl.md5 new file mode 100644 index 0000000..4f7bbdf --- /dev/null +++ b/docs/doxygen/html/add__product_8h__incl.md5 @@ -0,0 +1 @@ +302cdb650f73c68f3c7754b61c3ce43b \ No newline at end of file diff --git a/docs/doxygen/html/add__product_8h__incl.png b/docs/doxygen/html/add__product_8h__incl.png new file mode 100644 index 0000000..c0754f1 Binary files /dev/null and b/docs/doxygen/html/add__product_8h__incl.png differ diff --git a/docs/doxygen/html/add__product_8h_source.html b/docs/doxygen/html/add__product_8h_source.html new file mode 100644 index 0000000..f3c363d --- /dev/null +++ b/docs/doxygen/html/add__product_8h_source.html @@ -0,0 +1,167 @@ + + + + + + + +My Project: client/add_product.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
add_product.h
+
+
+Go to the documentation of this file.
1#ifndef ADD_PRODUCT_H
+
2#define ADD_PRODUCT_H
+
3
+
4#include <QWidget>
+
5#include <QMessageBox>
+
6
+
+
7namespace Ui {
+ +
9}
+
+
10
+
+
17class AddProductWindow : public QWidget
+
18{
+
19 Q_OBJECT
+
20
+
21public:
+
26 explicit AddProductWindow(QWidget *parent = nullptr);
+
27
+ +
32
+
33signals:
+
44 void productAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type);
+
45
+
46public slots:
+
50 void clear();
+
51
+
55 void slot_show();
+
56
+
57private:
+
58 Ui::AddProductWindow *ui;
+
59
+
60private slots:
+
64 void on_add_clicked();
+
65};
+
+
66
+
67#endif // ADD_PRODUCT_H
+
Класс окна для добавления нового продукта.
Definition add_product.h:18
+
void on_add_clicked()
Обработчик нажатия кнопки добавления продукта.
Definition add_product.cpp:12
+
Ui::AddProductWindow * ui
Указатель на интерфейс UI.
Definition add_product.h:58
+
~AddProductWindow()
Деструктор.
Definition add_product.cpp:38
+
AddProductWindow(QWidget *parent=nullptr)
Конструктор окна добавления продукта.
Definition add_product.cpp:4
+
void slot_show()
Отображение окна добавления продукта.
Definition add_product.cpp:54
+
void productAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
Сигнал, испускаемый после успешного добавления продукта.
+
void clear()
Очистка всех полей ввода.
Definition add_product.cpp:43
+
Definition add_product.h:7
+
+
+ + + + diff --git a/docs/doxygen/html/annotated.html b/docs/doxygen/html/annotated.html new file mode 100644 index 0000000..c011e0b --- /dev/null +++ b/docs/doxygen/html/annotated.html @@ -0,0 +1,133 @@ + + + + + + + +My Project: Class List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + + + + + + + + +
 CAddProductWindowКласс окна для добавления нового продукта
 CAuthRegWindowКласс окна авторизации и регистрации
 CClientSingletonСетевой клиент, реализующий паттерн Singleton
 CClientSingletonDestroyerРазрушитель Singleton для корректного удаления ClientSingleton
 CDataBaseSingletonКласс для работы с базой данных
 CMainWindowГлавное окно клиента
 CManagerFormsКласс для управления окнами приложения
 CmenuCardВиджет отображения информации о рационе питания
 CMyTcpServer
 CproductCardВиджет карточки продукта
 CSingletonDestroyerКласс для разрушения экземпляра Singleton
+
+
+
+ + + + diff --git a/docs/doxygen/html/annotated_dup.js b/docs/doxygen/html/annotated_dup.js new file mode 100644 index 0000000..5fdb92d --- /dev/null +++ b/docs/doxygen/html/annotated_dup.js @@ -0,0 +1,14 @@ +var annotated_dup = +[ + [ "AddProductWindow", "class_add_product_window.html", "class_add_product_window" ], + [ "AuthRegWindow", "class_auth_reg_window.html", "class_auth_reg_window" ], + [ "ClientSingleton", "class_client_singleton.html", "class_client_singleton" ], + [ "ClientSingletonDestroyer", "class_client_singleton_destroyer.html", "class_client_singleton_destroyer" ], + [ "DataBaseSingleton", "class_data_base_singleton.html", "class_data_base_singleton" ], + [ "MainWindow", "class_main_window.html", "class_main_window" ], + [ "ManagerForms", "class_manager_forms.html", "class_manager_forms" ], + [ "menuCard", "classmenu_card.html", "classmenu_card" ], + [ "MyTcpServer", "class_my_tcp_server.html", "class_my_tcp_server" ], + [ "productCard", "classproduct_card.html", "classproduct_card" ], + [ "SingletonDestroyer", "class_singleton_destroyer.html", "class_singleton_destroyer" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/authregwindow_8cpp.html b/docs/doxygen/html/authregwindow_8cpp.html new file mode 100644 index 0000000..2a72998 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8cpp.html @@ -0,0 +1,153 @@ + + + + + + + +My Project: client/authregwindow.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
authregwindow.cpp File Reference
+
+
+
#include "authregwindow.h"
+#include "ui_authregwindow.h"
+
+Include dependency graph for authregwindow.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/authregwindow_8cpp__incl.dot b/docs/doxygen/html/authregwindow_8cpp__incl.dot new file mode 100644 index 0000000..d41fd62 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8cpp__incl.dot @@ -0,0 +1,32 @@ +digraph "client/authregwindow.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/authregwindow.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge5_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node6 -> Node7 [id="edge6_Node000006_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node8 [id="edge7_Node000006_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node9 [id="edge8_Node000006_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node10 [id="edge9_Node000006_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node11 [id="edge10_Node000006_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node12 [id="edge11_Node000006_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node13 [id="edge12_Node000001_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="ui_authregwindow.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/authregwindow_8cpp__incl.map b/docs/doxygen/html/authregwindow_8cpp__incl.map new file mode 100644 index 0000000..68e3b64 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8cpp__incl.map @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/authregwindow_8cpp__incl.md5 b/docs/doxygen/html/authregwindow_8cpp__incl.md5 new file mode 100644 index 0000000..c75e52d --- /dev/null +++ b/docs/doxygen/html/authregwindow_8cpp__incl.md5 @@ -0,0 +1 @@ +d6c30e6acdf0cf8447d8dea2c3fe743f \ No newline at end of file diff --git a/docs/doxygen/html/authregwindow_8cpp__incl.png b/docs/doxygen/html/authregwindow_8cpp__incl.png new file mode 100644 index 0000000..95cf606 Binary files /dev/null and b/docs/doxygen/html/authregwindow_8cpp__incl.png differ diff --git a/docs/doxygen/html/authregwindow_8h.html b/docs/doxygen/html/authregwindow_8h.html new file mode 100644 index 0000000..a74c1ae --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h.html @@ -0,0 +1,184 @@ + + + + + + + +My Project: client/authregwindow.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
authregwindow.h File Reference
+
+
+
#include <QMainWindow>
+#include "functions_for_client.h"
+
+Include dependency graph for authregwindow.h:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  AuthRegWindow
 Класс окна авторизации и регистрации. More...
 
+ + + +

+Namespaces

namespace  Ui
 
+
+
+ + + + diff --git a/docs/doxygen/html/authregwindow_8h.js b/docs/doxygen/html/authregwindow_8h.js new file mode 100644 index 0000000..bad20a3 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h.js @@ -0,0 +1,4 @@ +var authregwindow_8h = +[ + [ "AuthRegWindow", "class_auth_reg_window.html", "class_auth_reg_window" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/authregwindow_8h__dep__incl.dot b/docs/doxygen/html/authregwindow_8h__dep__incl.dot new file mode 100644 index 0000000..625d129 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h__dep__incl.dot @@ -0,0 +1,18 @@ +digraph "client/authregwindow.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/authregwindow.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/authregwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node3 -> Node5 [id="edge4_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node3 -> Node6 [id="edge5_Node000003_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/authregwindow_8h__dep__incl.map b/docs/doxygen/html/authregwindow_8h__dep__incl.map new file mode 100644 index 0000000..a776237 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h__dep__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/doxygen/html/authregwindow_8h__dep__incl.md5 b/docs/doxygen/html/authregwindow_8h__dep__incl.md5 new file mode 100644 index 0000000..e7e5b5a --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h__dep__incl.md5 @@ -0,0 +1 @@ +f69677d30847ca8f5cadb226a045be47 \ No newline at end of file diff --git a/docs/doxygen/html/authregwindow_8h__dep__incl.png b/docs/doxygen/html/authregwindow_8h__dep__incl.png new file mode 100644 index 0000000..83feba1 Binary files /dev/null and b/docs/doxygen/html/authregwindow_8h__dep__incl.png differ diff --git a/docs/doxygen/html/authregwindow_8h__incl.dot b/docs/doxygen/html/authregwindow_8h__incl.dot new file mode 100644 index 0000000..674541c --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h__incl.dot @@ -0,0 +1,28 @@ +digraph "client/authregwindow.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/authregwindow.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge3_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node5 [id="edge4_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node7 [id="edge6_Node000005_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node8 [id="edge7_Node000005_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node9 [id="edge8_Node000005_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node10 [id="edge9_Node000005_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node11 [id="edge10_Node000005_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/authregwindow_8h__incl.map b/docs/doxygen/html/authregwindow_8h__incl.map new file mode 100644 index 0000000..586c172 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h__incl.map @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/authregwindow_8h__incl.md5 b/docs/doxygen/html/authregwindow_8h__incl.md5 new file mode 100644 index 0000000..5dcad22 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h__incl.md5 @@ -0,0 +1 @@ +a06a6c91d8aedded60a6e0fada8ad047 \ No newline at end of file diff --git a/docs/doxygen/html/authregwindow_8h__incl.png b/docs/doxygen/html/authregwindow_8h__incl.png new file mode 100644 index 0000000..eafed15 Binary files /dev/null and b/docs/doxygen/html/authregwindow_8h__incl.png differ diff --git a/docs/doxygen/html/authregwindow_8h_source.html b/docs/doxygen/html/authregwindow_8h_source.html new file mode 100644 index 0000000..da37227 --- /dev/null +++ b/docs/doxygen/html/authregwindow_8h_source.html @@ -0,0 +1,172 @@ + + + + + + + +My Project: client/authregwindow.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
authregwindow.h
+
+
+Go to the documentation of this file.
1#ifndef AUTHREGWINDOW_H
+
2#define AUTHREGWINDOW_H
+
3
+
4#include <QMainWindow>
+ +
6
+
7QT_BEGIN_NAMESPACE
+
8namespace Ui {
+
9class AuthRegWindow;
+
10}
+
11QT_END_NAMESPACE
+
12
+
+
19class AuthRegWindow : public QMainWindow
+
20{
+
21 Q_OBJECT
+
22
+
23public:
+
28 AuthRegWindow(QWidget *parent = nullptr);
+
29
+ +
34
+
35private slots:
+ +
41
+ +
47
+ +
53
+
54signals:
+
61 void auth_ok(QString id, QString login, QString email);
+
62
+
63private:
+
64 Ui::AuthRegWindow *ui;
+
65
+
70 void change_type_to_reg(bool to_reg);
+
71
+
75 void clear();
+
76};
+
+
77
+
78#endif // AUTHREGWINDOW_H
+
Ui::AuthRegWindow * ui
Указатель на интерфейс.
Definition authregwindow.h:64
+
void on_toRegButton_clicked()
Обработчик нажатия кнопки "Регистрация".
Definition authregwindow.cpp:36
+
void change_type_to_reg(bool to_reg)
Вспомогательная функция переключения режима окна.
Definition authregwindow.cpp:17
+
AuthRegWindow(QWidget *parent=nullptr)
Конструктор окна авторизации/регистрации.
Definition authregwindow.cpp:4
+
void clear()
Очистка всех полей ввода.
Definition authregwindow.cpp:71
+
~AuthRegWindow()
Деструктор.
Definition authregwindow.cpp:31
+
void on_loginButton_clicked()
Обработчик подтверждения входа.
Definition authregwindow.cpp:46
+
void auth_ok(QString id, QString login, QString email)
Сигнал об успешной авторизации.
+
void on_regButton_clicked()
Обработчик подтверждения регистрации.
Definition authregwindow.cpp:79
+ +
Definition add_product.h:7
+
+
+ + + + diff --git a/docs/doxygen/html/class_add_product_window-members.html b/docs/doxygen/html/class_add_product_window-members.html new file mode 100644 index 0000000..99622a2 --- /dev/null +++ b/docs/doxygen/html/class_add_product_window-members.html @@ -0,0 +1,128 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
AddProductWindow Member List
+
+
+ +

This is the complete list of members for AddProductWindow, including all inherited members.

+ + + + + + + + +
AddProductWindow(QWidget *parent=nullptr)AddProductWindowexplicit
clear()AddProductWindowslot
on_add_clicked()AddProductWindowprivateslot
productAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type)AddProductWindowsignal
slot_show()AddProductWindowslot
uiAddProductWindowprivate
~AddProductWindow()AddProductWindow
+
+ + + + diff --git a/docs/doxygen/html/class_add_product_window.html b/docs/doxygen/html/class_add_product_window.html new file mode 100644 index 0000000..203a417 --- /dev/null +++ b/docs/doxygen/html/class_add_product_window.html @@ -0,0 +1,472 @@ + + + + + + + +My Project: AddProductWindow Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+ +

Класс окна для добавления нового продукта. + More...

+ +

#include <add_product.h>

+
+Inheritance diagram for AddProductWindow:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for AddProductWindow:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + + + + +

+Public Slots

void clear ()
 Очистка всех полей ввода.
 
void slot_show ()
 Отображение окна добавления продукта.
 
+ + + + +

+Signals

void productAdded (QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
 Сигнал, испускаемый после успешного добавления продукта.
 
+ + + + + + + +

+Public Member Functions

 AddProductWindow (QWidget *parent=nullptr)
 Конструктор окна добавления продукта.
 
 ~AddProductWindow ()
 Деструктор.
 
+ + + + +

+Private Slots

void on_add_clicked ()
 Обработчик нажатия кнопки добавления продукта.
 
+ + + + +

+Private Attributes

Ui::AddProductWindow * ui
 Указатель на интерфейс UI.
 
+

Detailed Description

+

Класс окна для добавления нового продукта.

+

Этот класс предоставляет пользовательский интерфейс для ввода информации о продукте (название, белки, жиры, углеводы, вес, цена, тип) и отправки этих данных.

+

Constructor & Destructor Documentation

+ +

◆ AddProductWindow()

+ +
+
+ + + + + +
+ + + + + + + +
AddProductWindow::AddProductWindow (QWidget * parent = nullptr)
+
+explicit
+
+ +

Конструктор окна добавления продукта.

+
Parameters
+ + +
parentРодительский виджет.
+
+
+
4 :
+
5 QWidget(parent),
+
6 ui(new Ui::AddProductWindow)
+
7{
+
8 ui->setupUi(this);
+
9 //connect(ui->add, &QPushButton::clicked, this, &AddProductWindow::on_add_clicked);
+
10}
+
Ui::AddProductWindow * ui
Указатель на интерфейс UI.
Definition add_product.h:58
+
+
+
+ +

◆ ~AddProductWindow()

+ +
+
+ + + + + + + +
AddProductWindow::~AddProductWindow ()
+
+ +

Деструктор.

+
39{
+
40 delete ui;
+
41}
+
+
+
+

Member Function Documentation

+ +

◆ clear

+ +
+
+ + + + + +
+ + + + + + + +
void AddProductWindow::clear ()
+
+slot
+
+ +

Очистка всех полей ввода.

+
43 {
+
44 ui->In_name->setText("");
+
45 ui->In_proteins->setText("");
+
46 ui->In_fats->setText("");
+
47 ui->In_carbs->setText("");
+
48 ui->In_weights->setText("");
+
49 ui->In_cost->setText("");
+
50 ui->comboBox->setCurrentIndex(-1);
+
51};
+
+
+
+ +

◆ on_add_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void AddProductWindow::on_add_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия кнопки добавления продукта.

+
13{
+
14 QString name = ui->In_name->text();
+
15 int proteins = ui->In_proteins->text().toInt();
+
16 int fats = ui->In_fats->text().toInt();
+
17 int carbs = ui->In_carbs->text().toInt();
+
18 int weight = ui->In_weights->text().toInt();
+
19 int cost = ui->In_cost->text().toInt();
+
20 int type = ui->comboBox->currentIndex();
+
21
+
22 // Проверка на заполненность полей
+
23 if (name.isEmpty() || ui->In_proteins->text().isEmpty() ||
+
24 ui->In_fats->text().isEmpty() || ui->In_carbs->text().isEmpty() ||
+
25 ui->In_weights->text().isEmpty() || ui->In_cost->text().isEmpty())
+
26 {
+
27 QMessageBox::warning(this, "Ошибка", "Все поля должны быть заполнены!");
+
28 return;
+
29 }
+
30
+
31 emit productAdded(name, proteins, fats, carbs, weight, cost, type);
+
32
+
33 this->clear();
+
34 this->close();
+
35}
+
void productAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
Сигнал, испускаемый после успешного добавления продукта.
+
void clear()
Очистка всех полей ввода.
Definition add_product.cpp:43
+
+
+
+ +

◆ productAdded

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void AddProductWindow::productAdded (QString name,
int proteins,
int fats,
int carbs,
int weight,
int cost,
int type )
+
+signal
+
+ +

Сигнал, испускаемый после успешного добавления продукта.

+
Parameters
+ + + + + + + + +
nameНазвание продукта.
proteinsКоличество белков.
fatsКоличество жиров.
carbsКоличество углеводов.
weightВес продукта.
costСтоимость продукта.
typeТип продукта.
+
+
+ +
+
+ +

◆ slot_show

+ +
+
+ + + + + +
+ + + + + + + +
void AddProductWindow::slot_show ()
+
+slot
+
+ +

Отображение окна добавления продукта.

+
55{
+
56 this->show();
+
57
+
58}
+
+
+
+

Member Data Documentation

+ +

◆ ui

+ +
+
+ + + + + +
+ + + + +
Ui::AddProductWindow* AddProductWindow::ui
+
+private
+
+ +

Указатель на интерфейс UI.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_add_product_window.js b/docs/doxygen/html/class_add_product_window.js new file mode 100644 index 0000000..af2dc99 --- /dev/null +++ b/docs/doxygen/html/class_add_product_window.js @@ -0,0 +1,10 @@ +var class_add_product_window = +[ + [ "AddProductWindow", "class_add_product_window.html#a49c10613d21d41f0fdac806935c52ac5", null ], + [ "~AddProductWindow", "class_add_product_window.html#a498b45adac7d1269980cd4278b8eb277", null ], + [ "clear", "class_add_product_window.html#ac12c9b053c1c61820ffb11b4be8a9b4c", null ], + [ "on_add_clicked", "class_add_product_window.html#a0ddc09d3daa55c6c5b82211f16dee0fe", null ], + [ "productAdded", "class_add_product_window.html#ab982bd5dd091137578e647c0c588fade", null ], + [ "slot_show", "class_add_product_window.html#a92754fe51527bbce7e7dbe5f07542d21", null ], + [ "ui", "class_add_product_window.html#a28dcf3fbd6c9bb3ce89f9f52f801ebe0", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_add_product_window__coll__graph.dot b/docs/doxygen/html/class_add_product_window__coll__graph.dot new file mode 100644 index 0000000..ca08f07 --- /dev/null +++ b/docs/doxygen/html/class_add_product_window__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "AddProductWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="AddProductWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс окна для добавления нового продукта."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_add_product_window__coll__graph.map b/docs/doxygen/html/class_add_product_window__coll__graph.map new file mode 100644 index 0000000..f8f857c --- /dev/null +++ b/docs/doxygen/html/class_add_product_window__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_add_product_window__coll__graph.md5 b/docs/doxygen/html/class_add_product_window__coll__graph.md5 new file mode 100644 index 0000000..637dd33 --- /dev/null +++ b/docs/doxygen/html/class_add_product_window__coll__graph.md5 @@ -0,0 +1 @@ +21acfb60adfe5563a83c3abea4b109bb \ No newline at end of file diff --git a/docs/doxygen/html/class_add_product_window__coll__graph.png b/docs/doxygen/html/class_add_product_window__coll__graph.png new file mode 100644 index 0000000..6321c40 Binary files /dev/null and b/docs/doxygen/html/class_add_product_window__coll__graph.png differ diff --git a/docs/doxygen/html/class_add_product_window__inherit__graph.dot b/docs/doxygen/html/class_add_product_window__inherit__graph.dot new file mode 100644 index 0000000..ca08f07 --- /dev/null +++ b/docs/doxygen/html/class_add_product_window__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "AddProductWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="AddProductWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс окна для добавления нового продукта."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_add_product_window__inherit__graph.map b/docs/doxygen/html/class_add_product_window__inherit__graph.map new file mode 100644 index 0000000..f8f857c --- /dev/null +++ b/docs/doxygen/html/class_add_product_window__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_add_product_window__inherit__graph.md5 b/docs/doxygen/html/class_add_product_window__inherit__graph.md5 new file mode 100644 index 0000000..637dd33 --- /dev/null +++ b/docs/doxygen/html/class_add_product_window__inherit__graph.md5 @@ -0,0 +1 @@ +21acfb60adfe5563a83c3abea4b109bb \ No newline at end of file diff --git a/docs/doxygen/html/class_add_product_window__inherit__graph.png b/docs/doxygen/html/class_add_product_window__inherit__graph.png new file mode 100644 index 0000000..6321c40 Binary files /dev/null and b/docs/doxygen/html/class_add_product_window__inherit__graph.png differ diff --git a/docs/doxygen/html/class_auth_reg_window-members.html b/docs/doxygen/html/class_auth_reg_window-members.html new file mode 100644 index 0000000..60722a2 --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window-members.html @@ -0,0 +1,130 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
AuthRegWindow Member List
+
+
+ +

This is the complete list of members for AuthRegWindow, including all inherited members.

+ + + + + + + + + + +
auth_ok(QString id, QString login, QString email)AuthRegWindowsignal
AuthRegWindow(QWidget *parent=nullptr)AuthRegWindow
change_type_to_reg(bool to_reg)AuthRegWindowprivate
clear()AuthRegWindowprivate
on_loginButton_clicked()AuthRegWindowprivateslot
on_regButton_clicked()AuthRegWindowprivateslot
on_toRegButton_clicked()AuthRegWindowprivateslot
uiAuthRegWindowprivate
~AuthRegWindow()AuthRegWindow
+
+ + + + diff --git a/docs/doxygen/html/class_auth_reg_window.html b/docs/doxygen/html/class_auth_reg_window.html new file mode 100644 index 0000000..0eacbc0 --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window.html @@ -0,0 +1,540 @@ + + + + + + + +My Project: AuthRegWindow Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+ +

Класс окна авторизации и регистрации. + More...

+ +

#include <authregwindow.h>

+
+Inheritance diagram for AuthRegWindow:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for AuthRegWindow:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + +

+Signals

void auth_ok (QString id, QString login, QString email)
 Сигнал об успешной авторизации.
 
+ + + + + + + +

+Public Member Functions

 AuthRegWindow (QWidget *parent=nullptr)
 Конструктор окна авторизации/регистрации.
 
 ~AuthRegWindow ()
 Деструктор.
 
+ + + + + + + + + + +

+Private Slots

void on_toRegButton_clicked ()
 Обработчик нажатия кнопки "Регистрация".
 
void on_regButton_clicked ()
 Обработчик подтверждения регистрации.
 
void on_loginButton_clicked ()
 Обработчик подтверждения входа.
 
+ + + + + + + +

+Private Member Functions

void change_type_to_reg (bool to_reg)
 Вспомогательная функция переключения режима окна.
 
void clear ()
 Очистка всех полей ввода.
 
+ + + + +

+Private Attributes

Ui::AuthRegWindow * ui
 Указатель на интерфейс.
 
+

Detailed Description

+

Класс окна авторизации и регистрации.

+

Этот класс реализует окно для входа в систему и создания нового аккаунта. Содержит обработчики для переключения между формами, а также подтверждения входа/регистрации.

+

Constructor & Destructor Documentation

+ +

◆ AuthRegWindow()

+ +
+
+ + + + + + + +
AuthRegWindow::AuthRegWindow (QWidget * parent = nullptr)
+
+ +

Конструктор окна авторизации/регистрации.

+
Parameters
+ + +
parentРодительский виджет.
+
+
+
5 : QMainWindow(parent)
+
6 , ui(new Ui::AuthRegWindow)
+
7{
+
8 ui->setupUi(this);
+
9 ui->loginLabel->setVisible(false);
+
10 ui->loginLine->setVisible(false);
+
11 change_type_to_reg(false);
+
12}
+
Ui::AuthRegWindow * ui
Указатель на интерфейс.
Definition authregwindow.h:64
+
void change_type_to_reg(bool to_reg)
Вспомогательная функция переключения режима окна.
Definition authregwindow.cpp:17
+
+
+
+ +

◆ ~AuthRegWindow()

+ +
+
+ + + + + + + +
AuthRegWindow::~AuthRegWindow ()
+
+ +

Деструктор.

+
32{
+
33 delete ui;
+
34}
+
+
+
+

Member Function Documentation

+ +

◆ auth_ok

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + +
void AuthRegWindow::auth_ok (QString id,
QString login,
QString email )
+
+signal
+
+ +

Сигнал об успешной авторизации.

+
Parameters
+ + + + +
idИдентификатор пользователя.
loginЛогин пользователя.
emailЭлектронная почта пользователя.
+
+
+ +
+
+ +

◆ change_type_to_reg()

+ +
+
+ + + + + +
+ + + + + + + +
void AuthRegWindow::change_type_to_reg (bool to_reg)
+
+private
+
+ +

Вспомогательная функция переключения режима окна.

+
Parameters
+ + +
to_regЕсли true — включается режим регистрации.
+
+
+
17 {
+
18 ui->reportMessage->setText("");
+
19
+
20 ui->loginLabel->setVisible(is_reg);
+
21 ui->loginLine->setVisible(is_reg);
+
22
+
23 ui->confirmPasswordLabel->setVisible(is_reg);
+
24 ui->confirmPasswordLine->setVisible(is_reg);
+
25
+
26 ui->regButton->setVisible(is_reg);
+
27 ui->loginButton->setVisible(!is_reg);
+
28 ui->toRegButton->setText(!is_reg? "РЕГИСТРАЦИЯ" : "АВТОРИЗАЦИЯ");
+
29};
+
+
+
+ +

◆ clear()

+ +
+
+ + + + + +
+ + + + + + + +
void AuthRegWindow::clear ()
+
+private
+
+ +

Очистка всех полей ввода.

+
71 {
+
72 ui->loginLine->setText("");
+
73 ui->emailLine->setText("");
+
74 ui->passwordLine->setText("");
+
75 ui->confirmPasswordLine->setText("");
+
76};
+
+
+
+ +

◆ on_loginButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void AuthRegWindow::on_loginButton_clicked ()
+
+privateslot
+
+ +

Обработчик подтверждения входа.

+

Отправляет данные пользователя на сервер для авторизации.

+
47{
+
48
+
49
+
50 QString response = auth(ui->emailLine->text(), ui->passwordLine->text());
+
51
+
52 QStringList parts = response.split("//");
+
53
+
54 if (parts[0] == "auth_success") {
+
55 QString id = parts[1];
+
56 QString login = parts[2];
+
57 QString email = parts[3];
+
58
+
59
+
60 emit auth_ok(id, login, email);
+
61 this->close();
+
62 }
+
63
+
64
+
65 else {
+
66 ui->reportMessage->setText("Ошибка, проверьте правильность введённых данных");
+
67 clear();
+
68 }
+
69}
+
void clear()
Очистка всех полей ввода.
Definition authregwindow.cpp:71
+
void auth_ok(QString id, QString login, QString email)
Сигнал об успешной авторизации.
+
QByteArray auth(QStringList log)
Авторизация пользователя.
Definition func2serv.cpp:77
+
+
+
+ +

◆ on_regButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void AuthRegWindow::on_regButton_clicked ()
+
+privateslot
+
+ +

Обработчик подтверждения регистрации.

+

Отправляет данные нового пользователя на сервер.

+
80{
+
81 if (ui->passwordLine->text() != ui->confirmPasswordLine->text()) {
+
82 ui->reportMessage->setText("Введённые пароли не совпадают");
+
83 } else {
+
84 if (reg(ui->loginLine->text(), // делаем запрос на сервер для регистрации, передаём логин, пароль, почту
+
85 ui->passwordLine->text(),
+
86 ui->emailLine->text()))
+
87 {
+
88 ui->loginLine->setText("");
+
89 ui->confirmPasswordLine->setText("");
+
90 ui->reportMessage->setText("Регистрация успешна, нажмите login для авторизации");
+
91 change_type_to_reg(false);
+
92 } else {
+
93 ui->reportMessage->setText("Ошибка, пользователь с таким email уже существует");
+
94 this->clear();
+
95 };
+
96 }
+
97}
+
QByteArray reg(QStringList params)
Регистрация пользователя.
Definition func2serv.cpp:118
+
+
+
+ +

◆ on_toRegButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void AuthRegWindow::on_toRegButton_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия кнопки "Регистрация".

+

Переключает окно в режим регистрации.

+
37{
+
38 change_type_to_reg(!ui->loginLabel->isVisible());
+
39}
+
+
+
+

Member Data Documentation

+ +

◆ ui

+ +
+
+ + + + + +
+ + + + +
Ui::AuthRegWindow* AuthRegWindow::ui
+
+private
+
+ +

Указатель на интерфейс.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_auth_reg_window.js b/docs/doxygen/html/class_auth_reg_window.js new file mode 100644 index 0000000..551949e --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window.js @@ -0,0 +1,12 @@ +var class_auth_reg_window = +[ + [ "AuthRegWindow", "class_auth_reg_window.html#a63d0011acccbecf9228b753146a481c9", null ], + [ "~AuthRegWindow", "class_auth_reg_window.html#a8943657334ceb937919fb555148a4ddb", null ], + [ "auth_ok", "class_auth_reg_window.html#ae7c7188f7a51b721fa342670262d2faa", null ], + [ "change_type_to_reg", "class_auth_reg_window.html#a635ffca6ab9ac9f659d053e56ca47eaf", null ], + [ "clear", "class_auth_reg_window.html#a7a94b51b7d506acd94390e2663b5baa0", null ], + [ "on_loginButton_clicked", "class_auth_reg_window.html#aaf84765f56f397a63dc1d952a1de8268", null ], + [ "on_regButton_clicked", "class_auth_reg_window.html#aed5a0ff0a108f067e2070eb3a72f9273", null ], + [ "on_toRegButton_clicked", "class_auth_reg_window.html#a5987983dc2b91cd78eb0e557da1bbfde", null ], + [ "ui", "class_auth_reg_window.html#a0e1dff8a9b2550dc25e88889e131fc94", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_auth_reg_window__coll__graph.dot b/docs/doxygen/html/class_auth_reg_window__coll__graph.dot new file mode 100644 index 0000000..e13c5ff --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "AuthRegWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="AuthRegWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс окна авторизации и регистрации."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_auth_reg_window__coll__graph.map b/docs/doxygen/html/class_auth_reg_window__coll__graph.map new file mode 100644 index 0000000..8d78c2f --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_auth_reg_window__coll__graph.md5 b/docs/doxygen/html/class_auth_reg_window__coll__graph.md5 new file mode 100644 index 0000000..ae07dca --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window__coll__graph.md5 @@ -0,0 +1 @@ +6775f0f51cdb78407174180e68a7ce0b \ No newline at end of file diff --git a/docs/doxygen/html/class_auth_reg_window__coll__graph.png b/docs/doxygen/html/class_auth_reg_window__coll__graph.png new file mode 100644 index 0000000..151dbba Binary files /dev/null and b/docs/doxygen/html/class_auth_reg_window__coll__graph.png differ diff --git a/docs/doxygen/html/class_auth_reg_window__inherit__graph.dot b/docs/doxygen/html/class_auth_reg_window__inherit__graph.dot new file mode 100644 index 0000000..e13c5ff --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "AuthRegWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="AuthRegWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс окна авторизации и регистрации."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_auth_reg_window__inherit__graph.map b/docs/doxygen/html/class_auth_reg_window__inherit__graph.map new file mode 100644 index 0000000..8d78c2f --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_auth_reg_window__inherit__graph.md5 b/docs/doxygen/html/class_auth_reg_window__inherit__graph.md5 new file mode 100644 index 0000000..ae07dca --- /dev/null +++ b/docs/doxygen/html/class_auth_reg_window__inherit__graph.md5 @@ -0,0 +1 @@ +6775f0f51cdb78407174180e68a7ce0b \ No newline at end of file diff --git a/docs/doxygen/html/class_auth_reg_window__inherit__graph.png b/docs/doxygen/html/class_auth_reg_window__inherit__graph.png new file mode 100644 index 0000000..151dbba Binary files /dev/null and b/docs/doxygen/html/class_auth_reg_window__inherit__graph.png differ diff --git a/docs/doxygen/html/class_client_singleton-members.html b/docs/doxygen/html/class_client_singleton-members.html new file mode 100644 index 0000000..ab581d7 --- /dev/null +++ b/docs/doxygen/html/class_client_singleton-members.html @@ -0,0 +1,133 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
ClientSingleton Member List
+
+
+ +

This is the complete list of members for ClientSingleton, including all inherited members.

+ + + + + + + + + + + + + +
ClientSingleton()ClientSingletonprotected
ClientSingleton(const ClientSingleton &)=deleteClientSingletonprotected
ClientSingletonDestroyer classClientSingletonfriend
destroyerClientSingletonprivatestatic
getInstance()ClientSingletonstatic
operator=(const ClientSingleton &)=deleteClientSingletonprotected
p_instanceClientSingletonprivatestatic
send_msg(QStringList list)ClientSingleton
slot_connected()ClientSingletonslot
slot_readyRead()ClientSingletonslot
socketClientSingletonprivate
~ClientSingleton()ClientSingletonprotected
+
+ + + + diff --git a/docs/doxygen/html/class_client_singleton.html b/docs/doxygen/html/class_client_singleton.html new file mode 100644 index 0000000..8d5987f --- /dev/null +++ b/docs/doxygen/html/class_client_singleton.html @@ -0,0 +1,616 @@ + + + + + + + +My Project: ClientSingleton Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+ +

Сетевой клиент, реализующий паттерн Singleton. + More...

+ +

#include <Singleton.h>

+
+Inheritance diagram for ClientSingleton:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for ClientSingleton:
+
+
Collaboration graph
+ + + + + + + + + +
[legend]
+ + + + + + + + +

+Public Slots

void slot_connected ()
 Слот вызывается при успешном соединении с сервером.
 
void slot_readyRead ()
 Слот вызывается при получении данных от сервера.
 
+ + + + +

+Public Member Functions

QByteArray send_msg (QStringList list)
 Отправляет сообщение серверу.
 
+ + + + +

+Static Public Member Functions

static ClientSingletongetInstance ()
 Получить экземпляр Singleton.
 
+ + + + + + + + + + + + + +

+Protected Member Functions

 ClientSingleton ()
 Конструктор по умолчанию.
 
 ~ClientSingleton ()
 Деструктор.
 
 ClientSingleton (const ClientSingleton &)=delete
 Запрещено копирование
 
ClientSingletonoperator= (const ClientSingleton &)=delete
 Запрещено присваивание
 
+ + + + +

+Private Attributes

QTcpSocket * socket
 Сокет для соединения с сервером
 
+ + + + + + + +

+Static Private Attributes

static ClientSingletonp_instance
 Указатель на экземпляр Singleton.
 
static ClientSingletonDestroyer destroyer
 Объект-разрушитель
 
+ + + +

+Friends

class ClientSingletonDestroyer
 
+

Detailed Description

+

Сетевой клиент, реализующий паттерн Singleton.

+

Используется для подключения к серверу, отправки и получения данных.

+

Constructor & Destructor Documentation

+ +

◆ ClientSingleton() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
ClientSingleton::ClientSingleton ()
+
+protected
+
+ +

Конструктор по умолчанию.

+

Устанавливает соединение с сервером.

+
28 {
+
29 socket = new QTcpSocket(this);
+
30
+
31 // т.к. запускаю на своём пк адрес localhost, в будущем заменить на ip сервера
+
32 socket->connectToHost("localhost", 33333);
+
33
+
34 // проверка успешного подключения к серверу
+
35 if (socket->waitForConnected()) {
+
36 qDebug() << "Connected to server!";
+
37 } else {
+
38 qDebug() << "Failed to connect to server:" << socket->errorString();
+
39 }
+
40
+
41
+
42
+
43 //connect(socket, SIGNAL(connected()), SLOT(slot_connected()));
+
44 //connect(socket, SIGNAL(readyRead()), SLOT(slot_readyRead()));
+
45
+
46
+
47
+
48};
+
QTcpSocket * socket
Сокет для соединения с сервером
Definition Singleton.h:42
+
+
+
+ +

◆ ~ClientSingleton()

+ +
+
+ + + + + +
+ + + + + + + +
ClientSingleton::~ClientSingleton ()
+
+protected
+
+ +

Деструктор.

+

Закрывает соединение с сервером.

+
49 {
+
50 socket->close();
+
51
+
52};
+
+
+
+ +

◆ ClientSingleton() [2/2]

+ +
+
+ + + + + +
+ + + + + + + +
ClientSingleton::ClientSingleton (const ClientSingleton & )
+
+protecteddelete
+
+ +

Запрещено копирование

+ +
+
+

Member Function Documentation

+ +

◆ getInstance()

+ +
+
+ + + + + +
+ + + + + + + +
ClientSingleton & ClientSingleton::getInstance ()
+
+static
+
+ +

Получить экземпляр Singleton.

+
Returns
Ссылка на экземпляр ClientSingleton.
+
13 {
+
14
+
15 if (!p_instance) {
+ +
17 destroyer.initialize(p_instance);
+
18 };
+
19 return *p_instance;
+
20}
+
static ClientSingleton * p_instance
Указатель на экземпляр Singleton.
Definition Singleton.h:40
+
ClientSingleton()
Конструктор по умолчанию.
Definition Singleton.cpp:28
+
static ClientSingletonDestroyer destroyer
Объект-разрушитель
Definition Singleton.h:41
+
+
+
+ +

◆ operator=()

+ +
+
+ + + + + +
+ + + + + + + +
ClientSingleton & ClientSingleton::operator= (const ClientSingleton & )
+
+protecteddelete
+
+ +

Запрещено присваивание

+ +
+
+ +

◆ send_msg()

+ +
+
+ + + + + + + +
QByteArray ClientSingleton::send_msg (QStringList list)
+
+ +

Отправляет сообщение серверу.

+
Parameters
+ + +
listСписок строк с данными для отправки.
+
+
+
Returns
Ответ от сервера в виде QByteArray.
+
55{
+
56
+
57 if (socket->state() != QAbstractSocket::ConnectedState) {
+
58 qDebug() << "Error: Not connected to server!";
+
59 return "Error: Not connected to server!";
+
60 }
+
61
+
62
+
63 QString message = msg.join("//");
+
64 QByteArray data = message.toUtf8();
+
65
+
66 socket->write(data);
+
67 socket->waitForReadyRead(5000); // таймаут 5 сек
+
68
+
69
+
70
+
71 QByteArray res = "";
+
72 while (socket->bytesAvailable() > 0) {
+
73 QByteArray array = socket->readAll();
+
74 //qDebug() << array << "\n";
+
75 if (array == "\\x01\r\n") {
+
76 socket->write(res);
+
77 res = "";
+
78 } else {
+
79 res.append(array);
+
80 }
+
81 }
+
82
+
83 if (res.isEmpty()) {
+
84 //qDebug() << "Error: empty response from server";
+
85 return "Error: empty response from server";
+
86 }
+
87 return res;
+
88
+
89}
+
+
+
+ +

◆ slot_connected

+ +
+
+ + + + + +
+ + + + + + + +
void ClientSingleton::slot_connected ()
+
+slot
+
+ +

Слот вызывается при успешном соединении с сервером.

+
91 {
+
92 qDebug() << "Connected to server!";
+
93}
+
+
+
+ +

◆ slot_readyRead

+ +
+
+ + + + + +
+ + + + + + + +
void ClientSingleton::slot_readyRead ()
+
+slot
+
+ +

Слот вызывается при получении данных от сервера.

+
95 {
+
96 QByteArray data = socket->readAll();
+
97 qDebug() << "Data received:" << data;
+
98}
+
+
+
+

Friends And Related Symbol Documentation

+ +

◆ ClientSingletonDestroyer

+ +
+
+ + + + + +
+ + + + +
friend class ClientSingletonDestroyer
+
+friend
+
+ +
+
+

Member Data Documentation

+ +

◆ destroyer

+ +
+
+ + + + + +
+ + + + +
ClientSingletonDestroyer ClientSingleton::destroyer
+
+staticprivate
+
+ +

Объект-разрушитель

+ +
+
+ +

◆ p_instance

+ +
+
+ + + + + +
+ + + + +
ClientSingleton * ClientSingleton::p_instance
+
+staticprivate
+
+ +

Указатель на экземпляр Singleton.

+ +
+
+ +

◆ socket

+ +
+
+ + + + + +
+ + + + +
QTcpSocket* ClientSingleton::socket
+
+private
+
+ +

Сокет для соединения с сервером

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_client_singleton.js b/docs/doxygen/html/class_client_singleton.js new file mode 100644 index 0000000..d562e3d --- /dev/null +++ b/docs/doxygen/html/class_client_singleton.js @@ -0,0 +1,15 @@ +var class_client_singleton = +[ + [ "ClientSingleton", "class_client_singleton.html#a57646cacb9dca62e898d284eeda9a149", null ], + [ "~ClientSingleton", "class_client_singleton.html#a50d0d044c19911495d1f4faad14a8fc3", null ], + [ "ClientSingleton", "class_client_singleton.html#a8c1320c8b92c5c48a5ece0c9706ecc7e", null ], + [ "getInstance", "class_client_singleton.html#addfb20092076c2a67a058b26f7bc399a", null ], + [ "operator=", "class_client_singleton.html#a58f471a67b4888bd27539bc53eadfe54", null ], + [ "send_msg", "class_client_singleton.html#af0ffa3bef8214e9929b4a04293c15564", null ], + [ "slot_connected", "class_client_singleton.html#ad5bef444cf0be862cfcd1db9b13be85f", null ], + [ "slot_readyRead", "class_client_singleton.html#ab0a1e28677b42aa8af44beebcae64c12", null ], + [ "ClientSingletonDestroyer", "class_client_singleton.html#a9c2e5f87a0557168f05d25189a9da384", null ], + [ "destroyer", "class_client_singleton.html#a58182cf45d3ad789fd78ba39eba6121e", null ], + [ "p_instance", "class_client_singleton.html#a0614c6ae3e4e0b166500a150dc178720", null ], + [ "socket", "class_client_singleton.html#a1341b873e995fed7fb253213de3eac19", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_client_singleton__coll__graph.dot b/docs/doxygen/html/class_client_singleton__coll__graph.dot new file mode 100644 index 0000000..1378b4a --- /dev/null +++ b/docs/doxygen/html/class_client_singleton__coll__graph.dot @@ -0,0 +1,14 @@ +digraph "ClientSingleton" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ClientSingleton",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Сетевой клиент, реализующий паттерн Singleton."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; + Node1 -> Node1 [id="edge2_Node000001_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node3 -> Node1 [id="edge3_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" destroyer",fontcolor="grey" ]; + Node3 [id="Node000003",label="ClientSingletonDestroyer",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_client_singleton_destroyer.html",tooltip="Разрушитель Singleton для корректного удаления ClientSingleton."]; + Node1 -> Node3 [id="edge4_Node000003_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; +} diff --git a/docs/doxygen/html/class_client_singleton__coll__graph.map b/docs/doxygen/html/class_client_singleton__coll__graph.map new file mode 100644 index 0000000..0ab6289 --- /dev/null +++ b/docs/doxygen/html/class_client_singleton__coll__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/doxygen/html/class_client_singleton__coll__graph.md5 b/docs/doxygen/html/class_client_singleton__coll__graph.md5 new file mode 100644 index 0000000..2699655 --- /dev/null +++ b/docs/doxygen/html/class_client_singleton__coll__graph.md5 @@ -0,0 +1 @@ +dd0d8ed000c73cd2c27c16e24c6ca793 \ No newline at end of file diff --git a/docs/doxygen/html/class_client_singleton__coll__graph.png b/docs/doxygen/html/class_client_singleton__coll__graph.png new file mode 100644 index 0000000..87849d9 Binary files /dev/null and b/docs/doxygen/html/class_client_singleton__coll__graph.png differ diff --git a/docs/doxygen/html/class_client_singleton__inherit__graph.dot b/docs/doxygen/html/class_client_singleton__inherit__graph.dot new file mode 100644 index 0000000..cfd161c --- /dev/null +++ b/docs/doxygen/html/class_client_singleton__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "ClientSingleton" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ClientSingleton",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Сетевой клиент, реализующий паттерн Singleton."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_client_singleton__inherit__graph.map b/docs/doxygen/html/class_client_singleton__inherit__graph.map new file mode 100644 index 0000000..f4555dd --- /dev/null +++ b/docs/doxygen/html/class_client_singleton__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_client_singleton__inherit__graph.md5 b/docs/doxygen/html/class_client_singleton__inherit__graph.md5 new file mode 100644 index 0000000..6aef865 --- /dev/null +++ b/docs/doxygen/html/class_client_singleton__inherit__graph.md5 @@ -0,0 +1 @@ +95d1b705a3d871fb6ed57013009c71dd \ No newline at end of file diff --git a/docs/doxygen/html/class_client_singleton__inherit__graph.png b/docs/doxygen/html/class_client_singleton__inherit__graph.png new file mode 100644 index 0000000..6e41610 Binary files /dev/null and b/docs/doxygen/html/class_client_singleton__inherit__graph.png differ diff --git a/docs/doxygen/html/class_client_singleton_destroyer-members.html b/docs/doxygen/html/class_client_singleton_destroyer-members.html new file mode 100644 index 0000000..a137459 --- /dev/null +++ b/docs/doxygen/html/class_client_singleton_destroyer-members.html @@ -0,0 +1,124 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
ClientSingletonDestroyer Member List
+
+
+ +

This is the complete list of members for ClientSingletonDestroyer, including all inherited members.

+ + + + +
initialize(ClientSingleton *p)ClientSingletonDestroyer
p_instanceClientSingletonDestroyerprivate
~ClientSingletonDestroyer()ClientSingletonDestroyer
+
+ + + + diff --git a/docs/doxygen/html/class_client_singleton_destroyer.html b/docs/doxygen/html/class_client_singleton_destroyer.html new file mode 100644 index 0000000..0712f78 --- /dev/null +++ b/docs/doxygen/html/class_client_singleton_destroyer.html @@ -0,0 +1,246 @@ + + + + + + + +My Project: ClientSingletonDestroyer Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
ClientSingletonDestroyer Class Reference
+
+
+ +

Разрушитель Singleton для корректного удаления ClientSingleton. + More...

+ +

#include <Singleton.h>

+
+Collaboration diagram for ClientSingletonDestroyer:
+
+
Collaboration graph
+ + + + + + + + + +
[legend]
+ + + + + + + + +

+Public Member Functions

 ~ClientSingletonDestroyer ()
 Деструктор.
 
void initialize (ClientSingleton *p)
 Инициализирует указатель на Singleton.
 
+ + + + +

+Private Attributes

ClientSingletonp_instance
 Указатель на экземпляр ClientSingleton.
 
+

Detailed Description

+

Разрушитель Singleton для корректного удаления ClientSingleton.

+

Constructor & Destructor Documentation

+ +

◆ ~ClientSingletonDestroyer()

+ +
+
+ + + + + + + +
ClientSingletonDestroyer::~ClientSingletonDestroyer ()
+
+ +

Деструктор.

+

Удаляет экземпляр ClientSingleton.

+
6 {
+
7 if (p_instance) {
+
8 delete p_instance;
+
9 p_instance = nullptr;
+
10 };
+
11};
+
ClientSingleton * p_instance
Указатель на экземпляр ClientSingleton.
Definition Singleton.h:16
+
+
+
+

Member Function Documentation

+ +

◆ initialize()

+ +
+
+ + + + + + + +
void ClientSingletonDestroyer::initialize (ClientSingleton * p)
+
+ +

Инициализирует указатель на Singleton.

+
Parameters
+ + +
pУказатель на экземпляр ClientSingleton.
+
+
+
23 {
+
24 this->p_instance = b;
+
25};
+
+
+
+

Member Data Documentation

+ +

◆ p_instance

+ +
+
+ + + + + +
+ + + + +
ClientSingleton* ClientSingletonDestroyer::p_instance
+
+private
+
+ +

Указатель на экземпляр ClientSingleton.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_client_singleton_destroyer.js b/docs/doxygen/html/class_client_singleton_destroyer.js new file mode 100644 index 0000000..a04617c --- /dev/null +++ b/docs/doxygen/html/class_client_singleton_destroyer.js @@ -0,0 +1,6 @@ +var class_client_singleton_destroyer = +[ + [ "~ClientSingletonDestroyer", "class_client_singleton_destroyer.html#a2357bc74046db52178cf01625f92b5a7", null ], + [ "initialize", "class_client_singleton_destroyer.html#a26da498540dff266ed02cadab5cf2ceb", null ], + [ "p_instance", "class_client_singleton_destroyer.html#a58c4352591e26446fbc431e15fd5df76", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.dot b/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.dot new file mode 100644 index 0000000..fe644d5 --- /dev/null +++ b/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.dot @@ -0,0 +1,14 @@ +digraph "ClientSingletonDestroyer" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ClientSingletonDestroyer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Разрушитель Singleton для корректного удаления ClientSingleton."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node2 [id="Node000002",label="ClientSingleton",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_client_singleton.html",tooltip="Сетевой клиент, реализующий паттерн Singleton."]; + Node3 -> Node2 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; + Node2 -> Node2 [id="edge3_Node000002_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node1 -> Node2 [id="edge4_Node000002_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" destroyer",fontcolor="grey" ]; +} diff --git a/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.map b/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.map new file mode 100644 index 0000000..ac73cc1 --- /dev/null +++ b/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.md5 b/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.md5 new file mode 100644 index 0000000..d6a2f4a --- /dev/null +++ b/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.md5 @@ -0,0 +1 @@ +f418fcb615063eb1b511c476f7ef6f30 \ No newline at end of file diff --git a/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.png b/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.png new file mode 100644 index 0000000..76a86f8 Binary files /dev/null and b/docs/doxygen/html/class_client_singleton_destroyer__coll__graph.png differ diff --git a/docs/doxygen/html/class_data_base_singleton-members.html b/docs/doxygen/html/class_data_base_singleton-members.html new file mode 100644 index 0000000..a9d42a5 --- /dev/null +++ b/docs/doxygen/html/class_data_base_singleton-members.html @@ -0,0 +1,140 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
DataBaseSingleton Member List
+
+
+ +

This is the complete list of members for DataBaseSingleton, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + +
addFavoriteRation(int userId, const QVector< int > &productIds, int calories, int allCost, int allWeight)DataBaseSingleton
addProduct(int userId, const QString &name, int proteins, int fatness, int carbs, int weight, int cost, int type)DataBaseSingleton
addUser(const QString &name, const QString &email, const QString &password, bool isAdmin=false)DataBaseSingleton
checkUserCredentials(const QString &login, const QString &password)DataBaseSingleton
DataBaseSingleton()DataBaseSingletonprivate
DataBaseSingleton(const DataBaseSingleton &)=deleteDataBaseSingletonprivate
dbDataBaseSingletonprivate
destroyerDataBaseSingletonprivatestatic
executeQuery(const QString &query, const QVariantMap &params=QVariantMap())DataBaseSingleton
getFavoritesByUser(int userId)DataBaseSingleton
getInstance()DataBaseSingletonstatic
getProductsByUser(int userId)DataBaseSingleton
getStatistics()DataBaseSingleton
initialize(const QString &databaseName)DataBaseSingleton
operator=(const DataBaseSingleton &)=deleteDataBaseSingletonprivate
p_instanceDataBaseSingletonprivatestatic
SingletonDestroyer classDataBaseSingletonfriend
updateStatistics(int registrations, int visits, int generations)DataBaseSingleton
~DataBaseSingleton()=defaultDataBaseSingletonprivate
+
+ + + + diff --git a/docs/doxygen/html/class_data_base_singleton.html b/docs/doxygen/html/class_data_base_singleton.html new file mode 100644 index 0000000..cdbee27 --- /dev/null +++ b/docs/doxygen/html/class_data_base_singleton.html @@ -0,0 +1,1015 @@ + + + + + + + +My Project: DataBaseSingleton Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+ +

Класс для работы с базой данных. + More...

+ +

#include <databasesingleton.h>

+
+Collaboration diagram for DataBaseSingleton:
+
+
Collaboration graph
+ + + + + + + +
[legend]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool initialize (const QString &databaseName)
 Инициализация базы данных.
 
QSqlQuery executeQuery (const QString &query, const QVariantMap &params=QVariantMap())
 Выполнение SQL-запроса с параметрами.
 
bool checkUserCredentials (const QString &login, const QString &password)
 Проверка учетных данных пользователя.
 
bool addUser (const QString &name, const QString &email, const QString &password, bool isAdmin=false)
 Добавление нового пользователя в базу данных.
 
bool addProduct (int userId, const QString &name, int proteins, int fatness, int carbs, int weight, int cost, int type)
 Добавление продукта в базу данных.
 
QVector< QVariantMap > getProductsByUser (int userId)
 Получение продуктов для конкретного пользователя.
 
bool addFavoriteRation (int userId, const QVector< int > &productIds, int calories, int allCost, int allWeight)
 Добавление рациона в избранное.
 
QVector< QVariantMap > getFavoritesByUser (int userId)
 Получение избранных рационов пользователя.
 
bool updateStatistics (int registrations, int visits, int generations)
 Обновление статистики.
 
QVariantMap getStatistics ()
 Получение статистики.
 
+ + + + +

+Static Public Member Functions

static DataBaseSingletongetInstance ()
 Получение единственного экземпляра Singleton.
 
+ + + + + + + + + + + + + +

+Private Member Functions

 DataBaseSingleton ()
 Приватный конструктор.
 
 DataBaseSingleton (const DataBaseSingleton &)=delete
 Запрещает копирование экземпляра
 
DataBaseSingletonoperator= (const DataBaseSingleton &)=delete
 Запрещает присваивание
 
 ~DataBaseSingleton ()=default
 Приватный деструктор.
 
+ + + + +

+Private Attributes

QSqlDatabase db
 Объект базы данных
 
+ + + + + + + +

+Static Private Attributes

static DataBaseSingletonp_instance = nullptr
 Единственный экземпляр класса
 
static SingletonDestroyer destroyer
 Объект-разрушитель
 
+ + + + +

+Friends

class SingletonDestroyer
 Дружественный класс для доступа к деструктору
 
+

Detailed Description

+

Класс для работы с базой данных.

+

Реализует паттерн Singleton для подключения к базе данных, выполнения SQL-запросов, а также управления данными пользователей, продуктов, избранных рационов и статистики.

+

Constructor & Destructor Documentation

+ +

◆ DataBaseSingleton() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
DataBaseSingleton::DataBaseSingleton ()
+
+private
+
+ +

Приватный конструктор.

+

Запрещает создание экземпляров класса напрямую.

+
6 {
+
7 db = QSqlDatabase::addDatabase("QSQLITE");
+
8}
+
QSqlDatabase db
Объект базы данных
Definition databasesingleton.h:47
+
+
+
+ +

◆ DataBaseSingleton() [2/2]

+ +
+
+ + + + + +
+ + + + + + + +
DataBaseSingleton::DataBaseSingleton (const DataBaseSingleton & )
+
+privatedelete
+
+ +

Запрещает копирование экземпляра

+ +
+
+ +

◆ ~DataBaseSingleton()

+ +
+
+ + + + + +
+ + + + + + + +
DataBaseSingleton::~DataBaseSingleton ()
+
+privatedefault
+
+ +

Приватный деструктор.

+

Закрыт для предотвращения удаления экземпляра Singleton извне.

+ +
+
+

Member Function Documentation

+ +

◆ addFavoriteRation()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
bool DataBaseSingleton::addFavoriteRation (int userId,
const QVector< int > & productIds,
int calories,
int allCost,
int allWeight )
+
+ +

Добавление рациона в избранное.

+
Parameters
+ + + + + + +
userIdИдентификатор пользователя.
productIdsСписок идентификаторов продуктов.
caloriesОбщее количество калорий.
allCostОбщая стоимость рациона.
allWeightОбщий вес рациона.
+
+
+
Returns
true, если рацион добавлен, иначе false.
+
154 {
+
155 // Преобразуем QVector<int> в QVector<QString>
+
156 QVector<QString> productIdsStr;
+
157 for (int id : productIds) {
+
158 productIdsStr.append(QString::number(id)); // Преобразуем int в QString
+
159 }
+
160
+
161 // Преобразуем QVector<QString> в QStringList и объединяем в строку через запятую
+
162 QString productsStr = QStringList::fromVector(productIdsStr).join(",");
+
163
+
164 // Выполняем SQL-запрос
+
165 return executeQuery(
+
166 "INSERT INTO favorites (id_user, products, calories, all_cost, all_weight) "
+
167 "VALUES (:id_user, :products, :calories, :all_cost, :all_weight)",
+
168 {{":id_user", userId}, {":products", productsStr}, {":calories", calories},
+
169 {":all_cost", allCost}, {":all_weight", allWeight}}
+
170 ).exec();
+
171}
+
QSqlQuery executeQuery(const QString &query, const QVariantMap &params=QVariantMap())
Выполнение SQL-запроса с параметрами.
Definition databasesingleton.cpp:78
+
+
+
+ +

◆ addProduct()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool DataBaseSingleton::addProduct (int userId,
const QString & name,
int proteins,
int fatness,
int carbs,
int weight,
int cost,
int type )
+
+ +

Добавление продукта в базу данных.

+
Parameters
+ + + + + + + + + +
userIdИдентификатор пользователя.
nameНазвание продукта.
proteinsКоличество белков в продукте.
fatnessКоличество жиров в продукте.
carbsКоличество углеводов в продукте.
weightВес продукта.
costСтоимость продукта.
typeТип продукта.
+
+
+
Returns
true, если продукт добавлен, иначе false.
+
114 {
+
115 QSqlQuery query = executeQuery(
+
116 "INSERT INTO products (id_user, name, proteins, fatness, carbs, weight, cost, type) "
+
117 "VALUES (:id_user, :name, :proteins, :fatness, :carbs, :weight, :cost, :type)",
+
118 {
+
119 {":id_user", userId},
+
120 {":name", name},
+
121 {":proteins", proteins},
+
122 {":fatness", fatness},
+
123 {":carbs", carbs},
+
124 {":weight", weight},
+
125 {":cost", cost},
+
126 {":type", type}
+
127 }
+
128 );
+
129 return !query.lastError().isValid(); // Возвращаем true, если ошибок нет
+
130}
+
+
+
+ +

◆ addUser()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
bool DataBaseSingleton::addUser (const QString & name,
const QString & email,
const QString & password,
bool isAdmin = false )
+
+ +

Добавление нового пользователя в базу данных.

+
Parameters
+ + + + + +
nameИмя пользователя.
emailЭлектронная почта пользователя.
passwordПароль пользователя.
isAdminФлаг администратора (по умолчанию false).
+
+
+
Returns
true, если пользователь добавлен, иначе false.
+
100 {
+
101 QSqlQuery query = executeQuery(
+
102 "INSERT INTO users (name, email, pass, is_admin) VALUES (:name, :email, :pass, :is_admin)",
+
103 {{":name", name}, {":email", email}, {":pass", password}, {":is_admin", isAdmin}}
+
104 );
+
105
+
106 if (query.lastError().isValid()) {
+
107 qDebug() << "Ошибка SQL:" << query.lastError().text();
+
108 return false;
+
109 }
+
110 return true;
+
111}
+
+
+
+ +

◆ checkUserCredentials()

+ +
+
+ + + + + + + + + + + +
bool DataBaseSingleton::checkUserCredentials (const QString & login,
const QString & password )
+
+ +

Проверка учетных данных пользователя.

+
Parameters
+ + + +
loginЛогин пользователя.
passwordПароль пользователя.
+
+
+
Returns
true, если учетные данные корректны, иначе false.
+
92 {
+
93 QSqlQuery query = executeQuery(
+
94 "SELECT * FROM users WHERE email = :email AND pass = :pass",
+
95 {{":email", email}, {":pass", password}}
+
96 );
+
97 return query.next();
+
98}
+
+
+
+ +

◆ executeQuery()

+ +
+
+ + + + + + + + + + + +
QSqlQuery DataBaseSingleton::executeQuery (const QString & query,
const QVariantMap & params = QVariantMap() )
+
+ +

Выполнение SQL-запроса с параметрами.

+
Parameters
+ + + +
querySQL-запрос в виде строки.
paramsПараметры для SQL-запроса.
+
+
+
Returns
Результат выполнения запроса в виде QSqlQuery.
+
78 {
+
79 QSqlQuery query(db);
+
80 query.prepare(queryStr);
+
81 for (auto it = params.begin(); it != params.end(); ++it) {
+
82 query.bindValue(it.key(), it.value());
+
83 }
+
84 if (!query.exec()) {
+
85 qDebug() << "Ошибка запроса:" << query.lastError().text();
+
86 qDebug() << "Текст запроса:" << queryStr;
+
87 }
+
88 return query;
+
89}
+
+
+
+ +

◆ getFavoritesByUser()

+ +
+
+ + + + + + + +
QVector< QVariantMap > DataBaseSingleton::getFavoritesByUser (int userId)
+
+ +

Получение избранных рационов пользователя.

+
Parameters
+ + +
userIdИдентификатор пользователя.
+
+
+
Returns
Список избранных рационов пользователя.
+
173 {
+
174 QSqlQuery query = executeQuery(
+
175 "SELECT * FROM favorites WHERE id_user = :id_user",
+
176 {{":id_user", userId}}
+
177 );
+
178 QVector<QVariantMap> favorites;
+
179 while (query.next()) {
+
180 QVariantMap favorite;
+
181 favorite["products"] = query.value("products").toString();
+
182 favorite["calories"] = query.value("calories").toInt();
+
183 favorite["all_cost"] = query.value("all_cost").toInt();
+
184 favorite["all_weight"] = query.value("all_weight").toInt();
+
185 favorites.append(favorite);
+
186 }
+
187 return favorites;
+
188}
+
+
+
+ +

◆ getInstance()

+ +
+
+ + + + + +
+ + + + + + + +
DataBaseSingleton * DataBaseSingleton::getInstance ()
+
+static
+
+ +

Получение единственного экземпляра Singleton.

+
Returns
Экземпляр класса DataBaseSingleton.
+
10 {
+
11 if (!p_instance) {
+ +
13 destroyer.initialize(p_instance);
+
14 }
+
15 return p_instance;
+
16}
+
static SingletonDestroyer destroyer
Объект-разрушитель
Definition databasesingleton.h:46
+
DataBaseSingleton()
Приватный конструктор.
Definition databasesingleton.cpp:6
+
static DataBaseSingleton * p_instance
Единственный экземпляр класса
Definition databasesingleton.h:45
+
+
+
+ +

◆ getProductsByUser()

+ +
+
+ + + + + + + +
QVector< QVariantMap > DataBaseSingleton::getProductsByUser (int userId)
+
+ +

Получение продуктов для конкретного пользователя.

+
Parameters
+ + +
userIdИдентификатор пользователя.
+
+
+
Returns
Список продуктов, принадлежащих пользователю.
+
132 {
+
133 QSqlQuery query = executeQuery(
+
134 "SELECT * FROM products WHERE id_user = :id_user",
+
135 {{":id_user", userId}}
+
136 );
+
137 QVector<QVariantMap> products;
+
138 while (query.next()) {
+
139 QVariantMap product;
+
140 product["id"] = query.value("id").toInt();
+
141 product["name"] = query.value("name").toString();
+
142 product["proteins"] = query.value("proteins").toInt();
+
143 product["fatness"] = query.value("fatness").toInt();
+
144 product["carbs"] = query.value("carbs").toInt();
+
145 product["weight"] = query.value("weight").toInt();
+
146 product["cost"] = query.value("cost").toInt();
+
147 product["type"] = query.value("type").toInt();
+
148 products.append(product);
+
149 }
+
150 return products;
+
151}
+
+
+
+ +

◆ getStatistics()

+ +
+
+ + + + + + + +
QVariantMap DataBaseSingleton::getStatistics ()
+
+ +

Получение статистики.

+
Returns
Словарь с данными статистики.
+
199 {
+
200 QSqlQuery query = executeQuery("SELECT * FROM statistics");
+
201 QVariantMap stats;
+
202 if (query.next()) {
+
203 stats["registrations"] = query.value("count_registrations").toInt();
+
204 stats["visits"] = query.value("count_visits").toInt();
+
205 stats["generations"] = query.value("count_generations").toInt();
+
206 }
+
207 return stats;
+
208}
+
+
+
+ +

◆ initialize()

+ +
+
+ + + + + + + +
bool DataBaseSingleton::initialize (const QString & databaseName)
+
+ +

Инициализация базы данных.

+

Создает соединение с базой данных и выполняет необходимые операции для создания таблиц.

+
Parameters
+ + +
databaseNameИмя файла базы данных.
+
+
+
Returns
true, если инициализация успешна, иначе false.
+
18 {
+
19 db.setDatabaseName(databaseName);
+
20 if (!db.open()) {
+
21 qDebug() << "Ошибка подключения:" << db.lastError().text();
+
22 return false;
+
23 }
+
24
+
25 // Создание таблицы users
+
26 QSqlQuery query(db);
+
27 bool success = query.exec(
+
28 "CREATE TABLE IF NOT EXISTS users ("
+
29 "id INTEGER PRIMARY KEY AUTOINCREMENT, "
+
30 "name VARCHAR(20) NOT NULL, "
+
31 "email VARCHAR(50) NOT NULL , "
+
32 "pass VARCHAR(20) NOT NULL, "
+
33 "is_admin BOOLEAN DEFAULT FALSE)"
+
34 );
+
35
+
36 success &= query.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_users_email ON users(email)");
+
37
+
38 // Создание таблицы products
+
39 success &= query.exec(
+
40 "CREATE TABLE IF NOT EXISTS products ("
+
41 "id INTEGER PRIMARY KEY AUTOINCREMENT, "
+
42 "id_user INTEGER NOT NULL, "
+
43 "name VARCHAR(50) NOT NULL, "
+
44 "proteins INTEGER NOT NULL, "
+
45 "fatness INTEGER NOT NULL, "
+
46 "carbs INTEGER NOT NULL, "
+
47 "weight INTEGER NOT NULL, "
+
48 "cost INTEGER NOT NULL, "
+
49 "type INTEGER NOT NULL, "
+
50 "FOREIGN KEY(id_user) REFERENCES users(id))"
+
51 );
+
52
+
53 // Создание таблицы favorites
+
54 success &= query.exec(
+
55 "CREATE TABLE IF NOT EXISTS favorites ("
+
56 "id_user INTEGER NOT NULL, "
+
57 "products TEXT NOT NULL, " // Хранение массива ID продуктов в виде строки
+
58 "calories INTEGER NOT NULL, "
+
59 "all_cost INTEGER NOT NULL, "
+
60 "all_weight INTEGER NOT NULL, "
+
61 "FOREIGN KEY(id_user) REFERENCES users(id))"
+
62 );
+
63
+
64 // Создание таблицы statistics
+
65 success &= query.exec(
+
66 "CREATE TABLE IF NOT EXISTS statistics ("
+
67 "count_registrations INTEGER DEFAULT 0, "
+
68 "count_visits INTEGER DEFAULT 0, "
+
69 "count_generations INTEGER DEFAULT 0)"
+
70 );
+
71
+
72 // Инициализация статистики, если таблица пуста
+
73 query.exec("INSERT OR IGNORE INTO statistics (count_registrations, count_visits, count_generations) VALUES (0, 0, 0)");
+
74 query.exec("INSERT OR IGNORE INTO users(name, email, pass, is_admin) VALUES ('NewDev','new@devs.su','admin',true)");
+
75 return success;
+
76}
+
+
+
+ +

◆ operator=()

+ +
+
+ + + + + +
+ + + + + + + +
DataBaseSingleton & DataBaseSingleton::operator= (const DataBaseSingleton & )
+
+privatedelete
+
+ +

Запрещает присваивание

+ +
+
+ +

◆ updateStatistics()

+ +
+
+ + + + + + + + + + + + + + + + +
bool DataBaseSingleton::updateStatistics (int registrations,
int visits,
int generations )
+
+ +

Обновление статистики.

+
Parameters
+ + + + +
registrationsКоличество регистраций.
visitsКоличество посещений.
generationsКоличество генераций.
+
+
+
Returns
true, если статистика обновлена, иначе false.
+
191 {
+
192 return executeQuery(
+
193 "UPDATE statistics SET count_registrations = :registrations, "
+
194 "count_visits = :visits, count_generations = :generations",
+
195 {{":registrations", registrations}, {":visits", visits}, {":generations", generations}}
+
196 ).exec();
+
197}
+
+
+
+

Friends And Related Symbol Documentation

+ +

◆ SingletonDestroyer

+ +
+
+ + + + + +
+ + + + +
friend class SingletonDestroyer
+
+friend
+
+ +

Дружественный класс для доступа к деструктору

+ +
+
+

Member Data Documentation

+ +

◆ db

+ +
+
+ + + + + +
+ + + + +
QSqlDatabase DataBaseSingleton::db
+
+private
+
+ +

Объект базы данных

+ +
+
+ +

◆ destroyer

+ +
+
+ + + + + +
+ + + + +
SingletonDestroyer DataBaseSingleton::destroyer
+
+staticprivate
+
+ +

Объект-разрушитель

+ +
+
+ +

◆ p_instance

+ +
+
+ + + + + +
+ + + + +
DataBaseSingleton * DataBaseSingleton::p_instance = nullptr
+
+staticprivate
+
+ +

Единственный экземпляр класса

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_data_base_singleton.js b/docs/doxygen/html/class_data_base_singleton.js new file mode 100644 index 0000000..e7a80d8 --- /dev/null +++ b/docs/doxygen/html/class_data_base_singleton.js @@ -0,0 +1,22 @@ +var class_data_base_singleton = +[ + [ "DataBaseSingleton", "class_data_base_singleton.html#aa289e69de3195fef9593052246b9b1b0", null ], + [ "DataBaseSingleton", "class_data_base_singleton.html#abe02a9a0f33a2664ba969d20d777d4d9", null ], + [ "~DataBaseSingleton", "class_data_base_singleton.html#aa0d2615a21bdb8d7367a513c802e32c1", null ], + [ "addFavoriteRation", "class_data_base_singleton.html#a515aed6cbbb34fe71f254943a70d504b", null ], + [ "addProduct", "class_data_base_singleton.html#a3fe2a5e1f41a408023066e8caf63b523", null ], + [ "addUser", "class_data_base_singleton.html#af17db97dfc40b0fa48b3ed9abeacca76", null ], + [ "checkUserCredentials", "class_data_base_singleton.html#a51bd7dc4507c5f3d04a2903899e13d42", null ], + [ "executeQuery", "class_data_base_singleton.html#a4aa9edfd87be83120492e7b5c8de6151", null ], + [ "getFavoritesByUser", "class_data_base_singleton.html#afee32779221eaa5f92eb0c8a8666bb50", null ], + [ "getInstance", "class_data_base_singleton.html#ae1a24c20c524fd67554e1ffe66319ede", null ], + [ "getProductsByUser", "class_data_base_singleton.html#a84fe7936dd15c077eff86d7884ce3049", null ], + [ "getStatistics", "class_data_base_singleton.html#aad20b90cdb02aab3df1f27a9e4f882a3", null ], + [ "initialize", "class_data_base_singleton.html#a59bda63308000a018c5bdc1989582e50", null ], + [ "operator=", "class_data_base_singleton.html#af310f74ceebe21ef29454dd7eccac19a", null ], + [ "updateStatistics", "class_data_base_singleton.html#ab2877d5184cd7af28f1ea3b31f523280", null ], + [ "SingletonDestroyer", "class_data_base_singleton.html#aa93ce997b9645496c0e17460fba08432", null ], + [ "db", "class_data_base_singleton.html#a929da7bbfe9e068b4c3bc5a095e6156a", null ], + [ "destroyer", "class_data_base_singleton.html#a414f1ff51603535a839d5fc2e24b65e0", null ], + [ "p_instance", "class_data_base_singleton.html#abf86267afcfebbe05658438ff0ccfdfd", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_data_base_singleton__coll__graph.dot b/docs/doxygen/html/class_data_base_singleton__coll__graph.dot new file mode 100644 index 0000000..9be96b5 --- /dev/null +++ b/docs/doxygen/html/class_data_base_singleton__coll__graph.dot @@ -0,0 +1,12 @@ +digraph "DataBaseSingleton" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="DataBaseSingleton",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс для работы с базой данных."]; + Node1 -> Node1 [id="edge1_Node000001_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" destroyer",fontcolor="grey" ]; + Node2 [id="Node000002",label="SingletonDestroyer",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_singleton_destroyer.html",tooltip="Класс для разрушения экземпляра Singleton."]; + Node1 -> Node2 [id="edge3_Node000002_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; +} diff --git a/docs/doxygen/html/class_data_base_singleton__coll__graph.map b/docs/doxygen/html/class_data_base_singleton__coll__graph.map new file mode 100644 index 0000000..d2974af --- /dev/null +++ b/docs/doxygen/html/class_data_base_singleton__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/doxygen/html/class_data_base_singleton__coll__graph.md5 b/docs/doxygen/html/class_data_base_singleton__coll__graph.md5 new file mode 100644 index 0000000..027ec47 --- /dev/null +++ b/docs/doxygen/html/class_data_base_singleton__coll__graph.md5 @@ -0,0 +1 @@ +f51591212ef30ef52da2a8ec5f53a275 \ No newline at end of file diff --git a/docs/doxygen/html/class_data_base_singleton__coll__graph.png b/docs/doxygen/html/class_data_base_singleton__coll__graph.png new file mode 100644 index 0000000..c5bc9a8 Binary files /dev/null and b/docs/doxygen/html/class_data_base_singleton__coll__graph.png differ diff --git a/docs/doxygen/html/class_main_window-members.html b/docs/doxygen/html/class_main_window-members.html new file mode 100644 index 0000000..55f4196 --- /dev/null +++ b/docs/doxygen/html/class_main_window-members.html @@ -0,0 +1,139 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
MainWindow Member List
+
+
+ +

This is the complete list of members for MainWindow, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
add_product()MainWindowsignal
emailMainWindow
handleProductAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type)MainWindowslot
idMainWindow
loginMainWindow
MainWindow(QWidget *parent=nullptr)MainWindowexplicit
on_addProductButton_clicked()MainWindowprivateslot
on_createMenButton_clicked()MainWindowprivateslot
on_dynamicStatButton_clicked()MainWindowprivateslot
on_exitButton_clicked()MainWindowprivateslot
on_productListButton_clicked()MainWindowprivateslot
on_stableStatButton_clicked()MainWindowprivateslot
on_tableUsersButton_clicked()MainWindowprivateslot
passwordMainWindow
set_current_user(QString id, QString login, QString email)MainWindowslot
slot_show()MainWindowslot
uiMainWindowprivate
~MainWindow()MainWindow
+
+ + + + diff --git a/docs/doxygen/html/class_main_window.html b/docs/doxygen/html/class_main_window.html new file mode 100644 index 0000000..be38492 --- /dev/null +++ b/docs/doxygen/html/class_main_window.html @@ -0,0 +1,894 @@ + + + + + + + +My Project: MainWindow Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+ +

Главное окно клиента. + More...

+ +

#include <mainwindow.h>

+
+Inheritance diagram for MainWindow:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for MainWindow:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + + + + + + + +

+Public Slots

void slot_show ()
 Показывает главное окно.
 
void set_current_user (QString id, QString login, QString email)
 Устанавливает данные текущего пользователя.
 
void handleProductAdded (QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
 Обрабатывает добавление нового продукта.
 
+ + + + +

+Signals

void add_product ()
 Сигнал, указывающий на необходимость открыть окно добавления продукта.
 
+ + + + + + + +

+Public Member Functions

 MainWindow (QWidget *parent=nullptr)
 Конструктор класса MainWindow.
 
 ~MainWindow ()
 Деструктор.
 
+ + + + + + + + + + + + + +

+Public Attributes

QString id
 Идентификатор текущего пользователя.
 
QString login
 Логин пользователя.
 
QString password
 Пароль пользователя.
 
QString email
 Электронная почта пользователя.
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Private Slots

void on_stableStatButton_clicked ()
 Обработчик нажатия на кнопку "Стабильная статистика".
 
void on_dynamicStatButton_clicked ()
 Обработчик нажатия на кнопку "Динамическая статистика".
 
void on_tableUsersButton_clicked ()
 Обработчик нажатия на кнопку "Список пользователей".
 
void on_productListButton_clicked ()
 Обработчик нажатия на кнопку "Список продуктов".
 
void on_createMenButton_clicked ()
 Обработчик нажатия на кнопку "Создать рацион".
 
void on_addProductButton_clicked ()
 Обработчик нажатия на кнопку "Добавить продукт".
 
void on_exitButton_clicked ()
 Обработчик нажатия на кнопку "Выход".
 
+ + + + +

+Private Attributes

Ui::MainWindow * ui
 Указатель на UI-элементы окна.
 
+

Detailed Description

+

Главное окно клиента.

+

Отвечает за отображение основной информации, взаимодействие с продуктами, пользователями, рационом и статистикой.

+

Constructor & Destructor Documentation

+ +

◆ MainWindow()

+ +
+
+ + + + + +
+ + + + + + + +
MainWindow::MainWindow (QWidget * parent = nullptr)
+
+explicit
+
+ +

Конструктор класса MainWindow.

+
Parameters
+ + +
parentРодительский виджет.
+
+
+
12 : QMainWindow(parent)
+
13 , ui(new Ui::MainWindow)
+
14{
+
15 ui->setupUi(this);
+
16}
+
Ui::MainWindow * ui
Указатель на UI-элементы окна.
Definition mainwindow.h:68
+
+
+
+ +

◆ ~MainWindow()

+ +
+
+ + + + + + + +
MainWindow::~MainWindow ()
+
+ +

Деструктор.

+
19{
+
20 delete ui;
+
21}
+
+
+
+

Member Function Documentation

+ +

◆ add_product

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::add_product ()
+
+signal
+
+ +

Сигнал, указывающий на необходимость открыть окно добавления продукта.

+ +
+
+ +

◆ handleProductAdded

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void MainWindow::handleProductAdded (QString name,
int proteins,
int fats,
int carbs,
int weight,
int cost,
int type )
+
+slot
+
+ +

Обрабатывает добавление нового продукта.

+
Parameters
+ + + + + + + + +
nameНазвание продукта.
proteinsБелки.
fatsЖиры.
carbsУглеводы.
weightВес.
costСтоимость.
typeТип продукта.
+
+
+
179{
+
180 QByteArray response = ::add_product(id, name, proteins, fats, carbs, weight, cost, type);
+
181 qDebug() << "Response from server:" << response;
+
182
+
183 if (response.contains("success")) {
+
184 QMessageBox::information(this, "Успех", "Продукт успешно добавлен!");
+
185 } else {
+
186 QMessageBox::warning(this, "Ошибка", "Не удалось добавить продукт: " + response);
+
187 }
+
188}
+
void add_product()
Сигнал, указывающий на необходимость открыть окно добавления продукта.
+
+
+
+ +

◆ on_addProductButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::on_addProductButton_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия на кнопку "Добавить продукт".

+
173{
+
174 emit add_product(); // Отправляем сигнал для открытия окна добавления продукта
+
175}
+
+
+
+ +

◆ on_createMenButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::on_createMenButton_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия на кнопку "Создать рацион".

+
131{
+
132 QScrollArea* scrollArea = qobject_cast<QScrollArea*>(ui->mainContainer->findChild<QWidget*>("innerScrollArea"));
+
133
+
134 if (!scrollArea) {
+
135 scrollArea = new QScrollArea(ui->mainContainer);
+
136 scrollArea->setObjectName("innerScrollArea");
+
137 scrollArea->setWidgetResizable(false); // Отключаем авто-растягивание
+
138 scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+
139
+
140
+
141 if (ui->mainContainer->layout()) {
+
142 delete ui->mainContainer->layout();
+
143 }
+
144 ui->mainContainer->setLayout(new QVBoxLayout());
+
145 ui->mainContainer->layout()->addWidget(scrollArea);
+
146 }
+
147
+
148 QWidget* cardsContainer = new QWidget();
+
149 QHBoxLayout* cardsLayout = new QHBoxLayout(cardsContainer);
+
150 cardsLayout->setSpacing(10);
+
151
+
152 const QStringList days = {"ПОНЕДЕЛЬНИК", "ВТОРНИК", "СРЕДА", "ЧЕТВЕРГ", "ПЯТНИЦА", "СУББОТА", "ВОСКРЕСЕНЬЕ"};
+
153
+
154 for (int i = 0; i < 7; i++) {
+
155
+
156 QStringList products = {"Курица c рисом", "Овощи", "Квас"};
+
157 QVector<int> pfc = {34, 21, 113};
+
158
+
159
+
160 menuCard* card = new menuCard(days[i], products, 623, pfc, 500, 219, cardsContainer);
+
161
+
162 card->setFixedSize(370, 468);
+
163 cardsLayout->addWidget(card);
+
164 }
+
165
+
166 // 4. Настраиваем скролл
+
167 scrollArea->setWidget(cardsContainer);
+
168}
+
+
+
+ +

◆ on_dynamicStatButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::on_dynamicStatButton_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия на кнопку "Динамическая статистика".

+
48{
+
49 QString stat = get_dynamic_stat(); // вызываем функцию получения статистки из func_for_cleint по клику на кнопку
+
50 qDebug() << stat;
+
51}
+
QByteArray get_dynamic_stat()
Получение динамической статистики.
Definition func2serv.cpp:279
+
+
+
+ +

◆ on_exitButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::on_exitButton_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия на кнопку "Выход".

+
192{
+
193 // Получаем путь к исполняемому файлу и аргументы
+
194 QString program = QApplication::applicationFilePath();
+
195 QStringList arguments = QApplication::arguments();
+
196 arguments.removeFirst(); // Удаляем первый аргумент (путь к программе)
+
197
+
198 // Запускаем новый экземпляр приложения
+
199 QProcess::startDetached(program, arguments);
+
200
+
201 // Закрываем текущее приложение
+
202 QApplication::quit();
+
203}
+
+
+
+ +

◆ on_productListButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::on_productListButton_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия на кнопку "Список продуктов".

+
63{
+
64 // Получаем строку с продуктами (JSON)
+
65 QByteArray productsJson = get_products(id);
+
66
+
67 qDebug() << "Сырой JSON продуктов: " << productsJson;
+
68
+
69 // Парсим JSON
+
70 QJsonParseError parseError;
+
71 QJsonDocument doc = QJsonDocument::fromJson(productsJson, &parseError);
+
72
+
73 if (parseError.error != QJsonParseError::NoError) {
+
74 qDebug() << "Ошибка парсинга JSON: " << parseError.errorString();
+
75 return;
+
76 }
+
77
+
78 if (!doc.isArray()) {
+
79 qDebug() << "Ошибка: ожидался JSON-массив!";
+
80 return;
+
81 }
+
82
+
83 QJsonArray productArray = doc.array();
+
84
+
85 // Берём контейнер и полностью очищаем старый layout (с удалением)
+
86 QWidget* container = ui->mainContainer;
+
87
+
88 if (QLayout* oldLayout = container->layout()) {
+
89 while (QLayoutItem* item = oldLayout->takeAt(0)) {
+
90 if (QWidget* widget = item->widget()) {
+
91 delete widget; // Удаляем виджет
+
92 }
+
93 delete item; // Удаляем item
+
94 }
+
95 delete oldLayout; // Полностью удаляем старый layout
+
96 }
+
97
+
98 // ВСЕГДА создаём новый layout после удаления
+
99 QGridLayout* gridLayout = new QGridLayout(container);
+
100 container->setLayout(gridLayout);
+
101
+
102 // Создаём карточки
+
103 const int columns = 4;
+
104 for (int i = 0; i < productArray.size(); ++i) {
+
105 QJsonObject obj = productArray[i].toObject();
+
106
+
107 QString productName = obj["name"].toString();
+
108 int price = obj["cost"].toInt();
+
109 int proteins = obj["proteins"].toInt();
+
110 int fatness = obj["fatness"].toInt();
+
111 int carbs = obj["carbs"].toInt();
+
112
+
113 qDebug() << "Продукт #" << (i + 1)
+
114 << " Name:" << productName
+
115 << " Price:" << price
+
116 << " Proteins:" << proteins
+
117 << " Fatness:" << fatness
+
118 << " Carbs:" << carbs;
+
119
+
120 productCard* card = new productCard(productName, price, proteins, fatness, carbs, container);
+
121 gridLayout->addWidget(card, i / columns, i % columns);
+
122 }
+
123
+
124 container->setVisible(true);
+
125}
+
QByteArray get_products(QString userId)
Получение списка продуктов.
Definition func2serv.cpp:216
+
+
+
+ +

◆ on_stableStatButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::on_stableStatButton_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия на кнопку "Стабильная статистика".

+
41{
+
42 QString stat = get_stable_stat(); // вызываем функцию получения статистки из func_for_cleint по клику на кнопку
+
43 qDebug() << stat;
+
44}
+
QByteArray get_stable_stat()
Получение стабильной статистики.
Definition func2serv.cpp:256
+
+
+
+ +

◆ on_tableUsersButton_clicked

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::on_tableUsersButton_clicked ()
+
+privateslot
+
+ +

Обработчик нажатия на кнопку "Список пользователей".

+
56{
+
57 QByteArray users = get_all_users();
+
58 qDebug() << users;
+
59}
+
QByteArray get_all_users()
Получение всех пользователей.
Definition func2serv.cpp:235
+
+
+
+ +

◆ set_current_user

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + +
void MainWindow::set_current_user (QString id,
QString login,
QString email )
+
+slot
+
+ +

Устанавливает данные текущего пользователя.

+
Parameters
+ + + + +
idИдентификатор пользователя.
loginЛогин.
emailЭлектронная почта.
+
+
+
28 {
+
29 this->id = id;
+
30 this->login = login;
+
31
+
32 this->email = email;
+
33}
+
QString login
Логин пользователя.
Definition mainwindow.h:37
+
QString email
Электронная почта пользователя.
Definition mainwindow.h:39
+
QString id
Идентификатор текущего пользователя.
Definition mainwindow.h:36
+
+
+
+ +

◆ slot_show

+ +
+
+ + + + + +
+ + + + + + + +
void MainWindow::slot_show ()
+
+slot
+
+ +

Показывает главное окно.

+
23 {
+
24 this->show();
+
25};
+
+
+
+

Member Data Documentation

+ +

◆ email

+ +
+
+ + + + +
QString MainWindow::email
+
+ +

Электронная почта пользователя.

+ +
+
+ +

◆ id

+ +
+
+ + + + +
QString MainWindow::id
+
+ +

Идентификатор текущего пользователя.

+ +
+
+ +

◆ login

+ +
+
+ + + + +
QString MainWindow::login
+
+ +

Логин пользователя.

+ +
+
+ +

◆ password

+ +
+
+ + + + +
QString MainWindow::password
+
+ +

Пароль пользователя.

+ +
+
+ +

◆ ui

+ +
+
+ + + + + +
+ + + + +
Ui::MainWindow* MainWindow::ui
+
+private
+
+ +

Указатель на UI-элементы окна.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_main_window.js b/docs/doxygen/html/class_main_window.js new file mode 100644 index 0000000..dbd3dae --- /dev/null +++ b/docs/doxygen/html/class_main_window.js @@ -0,0 +1,21 @@ +var class_main_window = +[ + [ "MainWindow", "class_main_window.html#a996c5a2b6f77944776856f08ec30858d", null ], + [ "~MainWindow", "class_main_window.html#ae98d00a93bc118200eeef9f9bba1dba7", null ], + [ "add_product", "class_main_window.html#afa09d58e484be8e5c49e5f5b33f0e3d8", null ], + [ "handleProductAdded", "class_main_window.html#a9e4beb27bda168783b6e71d486ebcb90", null ], + [ "on_addProductButton_clicked", "class_main_window.html#a0a031c02eff36254765c9030a443ab04", null ], + [ "on_createMenButton_clicked", "class_main_window.html#aa811d4e586dc8aee0fb9cbdc953342a2", null ], + [ "on_dynamicStatButton_clicked", "class_main_window.html#a0c422ab00483005eb0251aa551869d70", null ], + [ "on_exitButton_clicked", "class_main_window.html#afcbbbc80001065310d2cd6221c5be55c", null ], + [ "on_productListButton_clicked", "class_main_window.html#a11507d87b5fb4a79fb557e8e313c90cd", null ], + [ "on_stableStatButton_clicked", "class_main_window.html#a9c7432f74a43023beb13ba1250e9c6bd", null ], + [ "on_tableUsersButton_clicked", "class_main_window.html#a2ccbff8c6af34935185f027972958b5c", null ], + [ "set_current_user", "class_main_window.html#a91a9ec299ac67e179bd9e3acbf23eb0c", null ], + [ "slot_show", "class_main_window.html#a9a15eca3ebf289292af72b78b2cf1b56", null ], + [ "email", "class_main_window.html#a46daecfbbd4056b097b3b470cc4f1618", null ], + [ "id", "class_main_window.html#a9ba91413f46ab4481ab8042ac8f2b799", null ], + [ "login", "class_main_window.html#a4338481359e3e8145930703e0089340f", null ], + [ "password", "class_main_window.html#a25493964c8f550b2380a12616fbc8250", null ], + [ "ui", "class_main_window.html#a35466a70ed47252a0191168126a352a5", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_main_window__coll__graph.dot b/docs/doxygen/html/class_main_window__coll__graph.dot new file mode 100644 index 0000000..c9a2a65 --- /dev/null +++ b/docs/doxygen/html/class_main_window__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "MainWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="MainWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Главное окно клиента."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_main_window__coll__graph.map b/docs/doxygen/html/class_main_window__coll__graph.map new file mode 100644 index 0000000..5c4cfaf --- /dev/null +++ b/docs/doxygen/html/class_main_window__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_main_window__coll__graph.md5 b/docs/doxygen/html/class_main_window__coll__graph.md5 new file mode 100644 index 0000000..be8976c --- /dev/null +++ b/docs/doxygen/html/class_main_window__coll__graph.md5 @@ -0,0 +1 @@ +35d3da74a7d446a88e61e470299bca83 \ No newline at end of file diff --git a/docs/doxygen/html/class_main_window__coll__graph.png b/docs/doxygen/html/class_main_window__coll__graph.png new file mode 100644 index 0000000..c786a2b Binary files /dev/null and b/docs/doxygen/html/class_main_window__coll__graph.png differ diff --git a/docs/doxygen/html/class_main_window__inherit__graph.dot b/docs/doxygen/html/class_main_window__inherit__graph.dot new file mode 100644 index 0000000..c9a2a65 --- /dev/null +++ b/docs/doxygen/html/class_main_window__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "MainWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="MainWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Главное окно клиента."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_main_window__inherit__graph.map b/docs/doxygen/html/class_main_window__inherit__graph.map new file mode 100644 index 0000000..5c4cfaf --- /dev/null +++ b/docs/doxygen/html/class_main_window__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_main_window__inherit__graph.md5 b/docs/doxygen/html/class_main_window__inherit__graph.md5 new file mode 100644 index 0000000..be8976c --- /dev/null +++ b/docs/doxygen/html/class_main_window__inherit__graph.md5 @@ -0,0 +1 @@ +35d3da74a7d446a88e61e470299bca83 \ No newline at end of file diff --git a/docs/doxygen/html/class_main_window__inherit__graph.png b/docs/doxygen/html/class_main_window__inherit__graph.png new file mode 100644 index 0000000..c786a2b Binary files /dev/null and b/docs/doxygen/html/class_main_window__inherit__graph.png differ diff --git a/docs/doxygen/html/class_manager_forms-members.html b/docs/doxygen/html/class_manager_forms-members.html new file mode 100644 index 0000000..ca61710 --- /dev/null +++ b/docs/doxygen/html/class_manager_forms-members.html @@ -0,0 +1,126 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
ManagerForms Member List
+
+
+ +

This is the complete list of members for ManagerForms, including all inherited members.

+ + + + + + +
addProductWindowManagerFormsprivate
curr_authManagerFormsprivate
mainManagerFormsprivate
ManagerForms(QWidget *parent=nullptr)ManagerFormsexplicit
~ManagerForms()ManagerForms
+
+ + + + diff --git a/docs/doxygen/html/class_manager_forms.html b/docs/doxygen/html/class_manager_forms.html new file mode 100644 index 0000000..331bf03 --- /dev/null +++ b/docs/doxygen/html/class_manager_forms.html @@ -0,0 +1,339 @@ + + + + + + + +My Project: ManagerForms Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
ManagerForms Class Reference
+
+
+ +

Класс для управления окнами приложения. + More...

+ +

#include <managerforms.h>

+
+Inheritance diagram for ManagerForms:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for ManagerForms:
+
+
Collaboration graph
+ + + + + + + + + + + + + + + +
[legend]
+ + + + + + + + +

+Public Member Functions

 ManagerForms (QWidget *parent=nullptr)
 Конструктор класса ManagerForms.
 
 ~ManagerForms ()
 Деструктор.
 
+ + + + + + + + + + +

+Private Attributes

AuthRegWindowcurr_auth
 Указатель на окно авторизации и регистрации.
 
MainWindowmain
 Указатель на главное окно приложения.
 
AddProductWindowaddProductWindow
 Указатель на окно добавления продукта.
 
+

Detailed Description

+

Класс для управления окнами приложения.

+

Отвечает за создание и переключение между окнами авторизации, главного интерфейса и окна добавления продукта.

+

Constructor & Destructor Documentation

+ +

◆ ManagerForms()

+ +
+
+ + + + + +
+ + + + + + + +
ManagerForms::ManagerForms (QWidget * parent = nullptr)
+
+explicit
+
+ +

Конструктор класса ManagerForms.

+
Parameters
+ + +
parentРодительский виджет.
+
+
+
3 : QMainWindow(parent)
+
4{
+
5 this->curr_auth = new AuthRegWindow();
+
6 this->main = new MainWindow();
+
7 this->curr_auth->show();
+
8 this->addProductWindow = new AddProductWindow();
+
9
+ + +
12
+ + +
15}
+
void slot_show()
Отображение окна добавления продукта.
Definition add_product.cpp:54
+
void productAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
Сигнал, испускаемый после успешного добавления продукта.
+
void auth_ok(QString id, QString login, QString email)
Сигнал об успешной авторизации.
+
void set_current_user(QString id, QString login, QString email)
Устанавливает данные текущего пользователя.
Definition mainwindow.cpp:28
+
void slot_show()
Показывает главное окно.
Definition mainwindow.cpp:23
+
void handleProductAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
Обрабатывает добавление нового продукта.
Definition mainwindow.cpp:178
+
void add_product()
Сигнал, указывающий на необходимость открыть окно добавления продукта.
+
AuthRegWindow * curr_auth
Указатель на окно авторизации и регистрации.
Definition managerforms.h:37
+
AddProductWindow * addProductWindow
Указатель на окно добавления продукта.
Definition managerforms.h:39
+
MainWindow * main
Указатель на главное окно приложения.
Definition managerforms.h:38
+
+
+
+ +

◆ ~ManagerForms()

+ +
+
+ + + + + + + +
ManagerForms::~ManagerForms ()
+
+ +

Деструктор.

+
18{
+
19
+
20}
+
+
+
+

Member Data Documentation

+ +

◆ addProductWindow

+ +
+
+ + + + + +
+ + + + +
AddProductWindow* ManagerForms::addProductWindow
+
+private
+
+ +

Указатель на окно добавления продукта.

+ +
+
+ +

◆ curr_auth

+ +
+
+ + + + + +
+ + + + +
AuthRegWindow* ManagerForms::curr_auth
+
+private
+
+ +

Указатель на окно авторизации и регистрации.

+ +
+
+ +

◆ main

+ +
+
+ + + + + +
+ + + + +
MainWindow* ManagerForms::main
+
+private
+
+ +

Указатель на главное окно приложения.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_manager_forms.js b/docs/doxygen/html/class_manager_forms.js new file mode 100644 index 0000000..a4df5c0 --- /dev/null +++ b/docs/doxygen/html/class_manager_forms.js @@ -0,0 +1,8 @@ +var class_manager_forms = +[ + [ "ManagerForms", "class_manager_forms.html#a28520be4f92d605ac48783497f23cf96", null ], + [ "~ManagerForms", "class_manager_forms.html#a6fcef06607418dbf71c05c44847b0112", null ], + [ "addProductWindow", "class_manager_forms.html#a35e56ed089659370d82a6ede47a35ff0", null ], + [ "curr_auth", "class_manager_forms.html#a30b01a09a0e1859c5c934d77280249c8", null ], + [ "main", "class_manager_forms.html#a55e8215156bd70da8b91860773f181a6", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_manager_forms__coll__graph.dot b/docs/doxygen/html/class_manager_forms__coll__graph.dot new file mode 100644 index 0000000..6442ad0 --- /dev/null +++ b/docs/doxygen/html/class_manager_forms__coll__graph.dot @@ -0,0 +1,20 @@ +digraph "ManagerForms" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ManagerForms",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс для управления окнами приложения."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; + Node3 -> Node1 [id="edge2_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" curr_auth",fontcolor="grey" ]; + Node3 [id="Node000003",label="AuthRegWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_auth_reg_window.html",tooltip="Класс окна авторизации и регистрации."]; + Node2 -> Node3 [id="edge3_Node000003_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 -> Node1 [id="edge4_Node000001_Node000004",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" main",fontcolor="grey" ]; + Node4 [id="Node000004",label="MainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_main_window.html",tooltip="Главное окно клиента."]; + Node2 -> Node4 [id="edge5_Node000004_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 -> Node1 [id="edge6_Node000001_Node000005",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" addProductWindow",fontcolor="grey" ]; + Node5 [id="Node000005",label="AddProductWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_add_product_window.html",tooltip="Класс окна для добавления нового продукта."]; + Node6 -> Node5 [id="edge7_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_manager_forms__coll__graph.map b/docs/doxygen/html/class_manager_forms__coll__graph.map new file mode 100644 index 0000000..012f64d --- /dev/null +++ b/docs/doxygen/html/class_manager_forms__coll__graph.map @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/class_manager_forms__coll__graph.md5 b/docs/doxygen/html/class_manager_forms__coll__graph.md5 new file mode 100644 index 0000000..d6c2914 --- /dev/null +++ b/docs/doxygen/html/class_manager_forms__coll__graph.md5 @@ -0,0 +1 @@ +b7b5621eb7ca3720e1823138c5530013 \ No newline at end of file diff --git a/docs/doxygen/html/class_manager_forms__coll__graph.png b/docs/doxygen/html/class_manager_forms__coll__graph.png new file mode 100644 index 0000000..dd7ae85 Binary files /dev/null and b/docs/doxygen/html/class_manager_forms__coll__graph.png differ diff --git a/docs/doxygen/html/class_manager_forms__inherit__graph.dot b/docs/doxygen/html/class_manager_forms__inherit__graph.dot new file mode 100644 index 0000000..044b361 --- /dev/null +++ b/docs/doxygen/html/class_manager_forms__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "ManagerForms" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ManagerForms",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс для управления окнами приложения."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_manager_forms__inherit__graph.map b/docs/doxygen/html/class_manager_forms__inherit__graph.map new file mode 100644 index 0000000..1c4c732 --- /dev/null +++ b/docs/doxygen/html/class_manager_forms__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_manager_forms__inherit__graph.md5 b/docs/doxygen/html/class_manager_forms__inherit__graph.md5 new file mode 100644 index 0000000..8efff73 --- /dev/null +++ b/docs/doxygen/html/class_manager_forms__inherit__graph.md5 @@ -0,0 +1 @@ +802dfa3a55df9e74b532f3550b351c1a \ No newline at end of file diff --git a/docs/doxygen/html/class_manager_forms__inherit__graph.png b/docs/doxygen/html/class_manager_forms__inherit__graph.png new file mode 100644 index 0000000..ee6615e Binary files /dev/null and b/docs/doxygen/html/class_manager_forms__inherit__graph.png differ diff --git a/docs/doxygen/html/class_my_tcp_server-members.html b/docs/doxygen/html/class_my_tcp_server-members.html new file mode 100644 index 0000000..8bbfdd9 --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server-members.html @@ -0,0 +1,130 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
MyTcpServer Member List
+
+
+ +

This is the complete list of members for MyTcpServer, including all inherited members.

+ + + + + + + + + + +
mSocketDescriptorsMyTcpServerprivate
mTcpServerMyTcpServerprivate
mTcpSocketMyTcpServerprivate
MyTcpServer(QObject *parent=nullptr)MyTcpServerexplicit
server_statusMyTcpServerprivate
slotClientDisconnected()MyTcpServerslot
slotNewConnection()MyTcpServerslot
slotServerRead()MyTcpServerslot
~MyTcpServer()MyTcpServer
+
+ + + + diff --git a/docs/doxygen/html/class_my_tcp_server.html b/docs/doxygen/html/class_my_tcp_server.html new file mode 100644 index 0000000..3faf244 --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server.html @@ -0,0 +1,492 @@ + + + + + + + +My Project: MyTcpServer Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
MyTcpServer Class Reference
+
+
+ +

#include <mytcpserver.h>

+
+Inheritance diagram for MyTcpServer:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for MyTcpServer:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + + + + + + + +

+Public Slots

void slotNewConnection ()
 Слот для обработки нового подключения.
 
void slotClientDisconnected ()
 Слот для обработки отключения клиента.
 
void slotServerRead ()
 Слот для чтения данных от клиента.
 
+ + + + + + + +

+Public Member Functions

 MyTcpServer (QObject *parent=nullptr)
 Конструктор
 
 ~MyTcpServer ()
 Деструктор
 
+ + + + + + + + + + + + + +

+Private Attributes

QTcpServer * mTcpServer
 Сервер для обработки TCP-соединений
 
QTcpSocket * mTcpSocket
 Сокет для взаимодействия с клиентом
 
int server_status
 Статус сервера
 
QMap< int, QTcpSocket * > mSocketDescriptors
 Хранение дескрипторов сокетов
 
+

Constructor & Destructor Documentation

+ +

◆ MyTcpServer()

+ +
+
+ + + + + +
+ + + + + + + +
MyTcpServer::MyTcpServer (QObject * parent = nullptr)
+
+explicit
+
+ +

Конструктор

+
14 : QObject(parent)
+
15{
+
16 mTcpServer = new QTcpServer(this);
+
17
+
18 connect(mTcpServer, &QTcpServer::newConnection, this, &MyTcpServer::slotNewConnection);
+
19
+
20 if (!mTcpServer->listen(QHostAddress::Any, 33333)) {
+
21 qDebug() << "server is not started";
+
22 } else {
+
23 server_status = 1;
+
24 qDebug() << "server is started";
+
25 }
+
26}
+
void slotNewConnection()
Слот для обработки нового подключения.
Definition mytcpserver.cpp:28
+
QTcpServer * mTcpServer
Сервер для обработки TCP-соединений
Definition mytcpserver.h:35
+
int server_status
Статус сервера
Definition mytcpserver.h:37
+
+
+
+ +

◆ ~MyTcpServer()

+ +
+
+ + + + + + + +
MyTcpServer::~MyTcpServer ()
+
+ +

Деструктор

+
8{
+
9 mTcpServer->close();
+
10 server_status = 0;
+
11 qDeleteAll(mSocketDescriptors); // Удаляем все сокеты
+
12}
+
QMap< int, QTcpSocket * > mSocketDescriptors
Хранение дескрипторов сокетов
Definition mytcpserver.h:38
+
+
+
+

Member Function Documentation

+ +

◆ slotClientDisconnected

+ +
+
+ + + + + +
+ + + + + + + +
void MyTcpServer::slotClientDisconnected ()
+
+slot
+
+ +

Слот для обработки отключения клиента.

+
62{
+
63 QTcpSocket *clientSocket = qobject_cast<QTcpSocket*>(sender());
+
64 if (!clientSocket) {
+
65 return;
+
66 }
+
67
+
68 // Получаем дескриптор сокета из контейнера
+
69 int socketDescriptor = -1;
+
70 for (auto it = mSocketDescriptors.begin(); it != mSocketDescriptors.end(); ++it) {
+
71 if (it.value() == clientSocket) {
+
72 socketDescriptor = it.key();
+
73 break;
+
74 }
+
75 }
+
76
+
77 if (socketDescriptor != -1) {
+
78 mSocketDescriptors.remove(socketDescriptor); // Удаляем сокет из контейнера
+
79 qDebug() << "Client disconnected, socket descriptor:" << socketDescriptor;
+
80 } else {
+
81 qDebug() << "Client disconnected, but socket descriptor not found!";
+
82 }
+
83
+
84 clientSocket->deleteLater(); // Удаляем сокет
+
85}
+
+
+
+ +

◆ slotNewConnection

+ +
+
+ + + + + +
+ + + + + + + +
void MyTcpServer::slotNewConnection ()
+
+slot
+
+ +

Слот для обработки нового подключения.

+
29{
+
30 if (server_status == 1) {
+
31 QTcpSocket *clientSocket = mTcpServer->nextPendingConnection();
+
32 int socketDescriptor = clientSocket->socketDescriptor(); // Получаем дескриптор сокета
+
33
+
34 if (socketDescriptor == -1) {
+
35 qDebug() << "Invalid socket descriptor!";
+
36 clientSocket->deleteLater(); // Удаляем сокет, если дескриптор недействителен
+
37 return;
+
38 }
+
39
+
40 mSocketDescriptors.insert(socketDescriptor, clientSocket); // Сохраняем сокет в контейнере
+
41
+
42 qDebug() << "New connection, socket descriptor:" << socketDescriptor;
+
43
+
44 connect(clientSocket, &QTcpSocket::readyRead, this, &MyTcpServer::slotServerRead);
+
45 connect(clientSocket, &QTcpSocket::disconnected, this, &MyTcpServer::slotClientDisconnected);
+
46 }
+
47}
+
void slotClientDisconnected()
Слот для обработки отключения клиента.
Definition mytcpserver.cpp:61
+
void slotServerRead()
Слот для чтения данных от клиента.
Definition mytcpserver.cpp:49
+
+
+
+ +

◆ slotServerRead

+ +
+
+ + + + + +
+ + + + + + + +
void MyTcpServer::slotServerRead ()
+
+slot
+
+ +

Слот для чтения данных от клиента.

+
49 {
+
50 QTcpSocket *clientSocket = qobject_cast<QTcpSocket*>(sender());
+
51 if (!clientSocket) return;
+
52
+
53 QByteArray data = clientSocket->readAll();
+
54 qDebug() << "Received data:" << data;
+
55
+
56 // Обрабатываем данные сразу, без накопления
+
57 QByteArray response = parsing(QString(data).trimmed(), clientSocket->socketDescriptor());
+
58 clientSocket->write(response);
+
59}
+
QByteArray parsing(QString input, int socdes)
Парсинг входных данных.
Definition func2serv.cpp:18
+
+
+
+

Member Data Documentation

+ +

◆ mSocketDescriptors

+ +
+
+ + + + + +
+ + + + +
QMap<int, QTcpSocket*> MyTcpServer::mSocketDescriptors
+
+private
+
+ +

Хранение дескрипторов сокетов

+ +
+
+ +

◆ mTcpServer

+ +
+
+ + + + + +
+ + + + +
QTcpServer* MyTcpServer::mTcpServer
+
+private
+
+ +

Сервер для обработки TCP-соединений

+ +
+
+ +

◆ mTcpSocket

+ +
+
+ + + + + +
+ + + + +
QTcpSocket* MyTcpServer::mTcpSocket
+
+private
+
+ +

Сокет для взаимодействия с клиентом

+ +
+
+ +

◆ server_status

+ +
+
+ + + + + +
+ + + + +
int MyTcpServer::server_status
+
+private
+
+ +

Статус сервера

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_my_tcp_server.js b/docs/doxygen/html/class_my_tcp_server.js new file mode 100644 index 0000000..5bb0ff7 --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server.js @@ -0,0 +1,12 @@ +var class_my_tcp_server = +[ + [ "MyTcpServer", "class_my_tcp_server.html#acf367c4695b4d160c7a2d25c2afaaec4", null ], + [ "~MyTcpServer", "class_my_tcp_server.html#ab39e651ff7c37c152215c02c225e79ef", null ], + [ "slotClientDisconnected", "class_my_tcp_server.html#a3e040c49dbefd65b9a58ab662fc9f7a2", null ], + [ "slotNewConnection", "class_my_tcp_server.html#a0ba7316ffe1a26c57fabde9e74b6c8dc", null ], + [ "slotServerRead", "class_my_tcp_server.html#ab4a64d2eab985d723090963f5c8a2882", null ], + [ "mSocketDescriptors", "class_my_tcp_server.html#aae9c5addbbedcfa39ccbe55204f473a3", null ], + [ "mTcpServer", "class_my_tcp_server.html#a7d854875e1e02887023ec9aac1a1542c", null ], + [ "mTcpSocket", "class_my_tcp_server.html#ab55c030e6eb6cf5d1acfe6d7d2bf0ed1", null ], + [ "server_status", "class_my_tcp_server.html#ae0dc69dfef4f9fc3a5f031f4152e4f91", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_my_tcp_server__coll__graph.dot b/docs/doxygen/html/class_my_tcp_server__coll__graph.dot new file mode 100644 index 0000000..dec6b4d --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "MyTcpServer" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="MyTcpServer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_my_tcp_server__coll__graph.map b/docs/doxygen/html/class_my_tcp_server__coll__graph.map new file mode 100644 index 0000000..71cc0a2 --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_my_tcp_server__coll__graph.md5 b/docs/doxygen/html/class_my_tcp_server__coll__graph.md5 new file mode 100644 index 0000000..71b2b49 --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server__coll__graph.md5 @@ -0,0 +1 @@ +53c879b120a1522ccbec99d77f295aa7 \ No newline at end of file diff --git a/docs/doxygen/html/class_my_tcp_server__coll__graph.png b/docs/doxygen/html/class_my_tcp_server__coll__graph.png new file mode 100644 index 0000000..628ddc5 Binary files /dev/null and b/docs/doxygen/html/class_my_tcp_server__coll__graph.png differ diff --git a/docs/doxygen/html/class_my_tcp_server__inherit__graph.dot b/docs/doxygen/html/class_my_tcp_server__inherit__graph.dot new file mode 100644 index 0000000..dec6b4d --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "MyTcpServer" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="MyTcpServer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/class_my_tcp_server__inherit__graph.map b/docs/doxygen/html/class_my_tcp_server__inherit__graph.map new file mode 100644 index 0000000..71cc0a2 --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/class_my_tcp_server__inherit__graph.md5 b/docs/doxygen/html/class_my_tcp_server__inherit__graph.md5 new file mode 100644 index 0000000..71b2b49 --- /dev/null +++ b/docs/doxygen/html/class_my_tcp_server__inherit__graph.md5 @@ -0,0 +1 @@ +53c879b120a1522ccbec99d77f295aa7 \ No newline at end of file diff --git a/docs/doxygen/html/class_my_tcp_server__inherit__graph.png b/docs/doxygen/html/class_my_tcp_server__inherit__graph.png new file mode 100644 index 0000000..628ddc5 Binary files /dev/null and b/docs/doxygen/html/class_my_tcp_server__inherit__graph.png differ diff --git a/docs/doxygen/html/class_singleton_destroyer-members.html b/docs/doxygen/html/class_singleton_destroyer-members.html new file mode 100644 index 0000000..371a97d --- /dev/null +++ b/docs/doxygen/html/class_singleton_destroyer-members.html @@ -0,0 +1,124 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
SingletonDestroyer Member List
+
+
+ +

This is the complete list of members for SingletonDestroyer, including all inherited members.

+ + + + +
initialize(DataBaseSingleton *p)SingletonDestroyer
p_instanceSingletonDestroyerprivate
~SingletonDestroyer()SingletonDestroyer
+
+ + + + diff --git a/docs/doxygen/html/class_singleton_destroyer.html b/docs/doxygen/html/class_singleton_destroyer.html new file mode 100644 index 0000000..a775e78 --- /dev/null +++ b/docs/doxygen/html/class_singleton_destroyer.html @@ -0,0 +1,238 @@ + + + + + + + +My Project: SingletonDestroyer Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
SingletonDestroyer Class Reference
+
+
+ +

Класс для разрушения экземпляра Singleton. + More...

+ +

#include <databasesingleton.h>

+
+Collaboration diagram for SingletonDestroyer:
+
+
Collaboration graph
+ + + + + + + +
[legend]
+ + + + + + + + +

+Public Member Functions

 ~SingletonDestroyer ()
 Деструктор для удаления Singleton.
 
void initialize (DataBaseSingleton *p)
 Инициализация указателя на экземпляр Singleton.
 
+ + + + +

+Private Attributes

DataBaseSingletonp_instance
 Указатель на экземпляр Singleton.
 
+

Detailed Description

+

Класс для разрушения экземпляра Singleton.

+

Используется для корректного удаления экземпляра DataBaseSingleton.

+

Constructor & Destructor Documentation

+ +

◆ ~SingletonDestroyer()

+ +
+
+ + + + + + + +
SingletonDestroyer::~SingletonDestroyer ()
+
+ +

Деструктор для удаления Singleton.

+

Уничтожает экземпляр Singleton, если он существует.

+
211{ delete p_instance; }
+
DataBaseSingleton * p_instance
Указатель на экземпляр Singleton.
Definition databasesingleton.h:20
+
+
+
+

Member Function Documentation

+ +

◆ initialize()

+ +
+
+ + + + + + + +
void SingletonDestroyer::initialize (DataBaseSingleton * p)
+
+ +

Инициализация указателя на экземпляр Singleton.

+
Parameters
+ + +
pУказатель на экземпляр Singleton.
+
+
+
212{ p_instance = p; }
+
+
+
+

Member Data Documentation

+ +

◆ p_instance

+ +
+
+ + + + + +
+ + + + +
DataBaseSingleton* SingletonDestroyer::p_instance
+
+private
+
+ +

Указатель на экземпляр Singleton.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/class_singleton_destroyer.js b/docs/doxygen/html/class_singleton_destroyer.js new file mode 100644 index 0000000..6b6d4c0 --- /dev/null +++ b/docs/doxygen/html/class_singleton_destroyer.js @@ -0,0 +1,6 @@ +var class_singleton_destroyer = +[ + [ "~SingletonDestroyer", "class_singleton_destroyer.html#a8ac3166871f4c5411edfdb13594dee15", null ], + [ "initialize", "class_singleton_destroyer.html#abcaf525b6af81fbb5717c7dae73af8ec", null ], + [ "p_instance", "class_singleton_destroyer.html#a66a75552c83eb8515e6d458d7a6b0178", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/class_singleton_destroyer__coll__graph.dot b/docs/doxygen/html/class_singleton_destroyer__coll__graph.dot new file mode 100644 index 0000000..c4aed58 --- /dev/null +++ b/docs/doxygen/html/class_singleton_destroyer__coll__graph.dot @@ -0,0 +1,12 @@ +digraph "SingletonDestroyer" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="SingletonDestroyer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс для разрушения экземпляра Singleton."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node2 [id="Node000002",label="DataBaseSingleton",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_data_base_singleton.html",tooltip="Класс для работы с базой данных."]; + Node2 -> Node2 [id="edge2_Node000002_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node1 -> Node2 [id="edge3_Node000002_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" destroyer",fontcolor="grey" ]; +} diff --git a/docs/doxygen/html/class_singleton_destroyer__coll__graph.map b/docs/doxygen/html/class_singleton_destroyer__coll__graph.map new file mode 100644 index 0000000..b1eec0b --- /dev/null +++ b/docs/doxygen/html/class_singleton_destroyer__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/doxygen/html/class_singleton_destroyer__coll__graph.md5 b/docs/doxygen/html/class_singleton_destroyer__coll__graph.md5 new file mode 100644 index 0000000..8e94c1f --- /dev/null +++ b/docs/doxygen/html/class_singleton_destroyer__coll__graph.md5 @@ -0,0 +1 @@ +1993e478c3735cf5441f97cd207bd4be \ No newline at end of file diff --git a/docs/doxygen/html/class_singleton_destroyer__coll__graph.png b/docs/doxygen/html/class_singleton_destroyer__coll__graph.png new file mode 100644 index 0000000..c569cc1 Binary files /dev/null and b/docs/doxygen/html/class_singleton_destroyer__coll__graph.png differ diff --git a/docs/doxygen/html/classes.html b/docs/doxygen/html/classes.html new file mode 100644 index 0000000..7bf4635 --- /dev/null +++ b/docs/doxygen/html/classes.html @@ -0,0 +1,139 @@ + + + + + + + +My Project: Class Index + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Index
+
+ +
+ + + + diff --git a/docs/doxygen/html/classmenu_card-members.html b/docs/doxygen/html/classmenu_card-members.html new file mode 100644 index 0000000..91d2ca7 --- /dev/null +++ b/docs/doxygen/html/classmenu_card-members.html @@ -0,0 +1,124 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
menuCard Member List
+
+
+ +

This is the complete list of members for menuCard, including all inherited members.

+ + + + +
menuCard(QString day, QStringList products, int calories, QVector< int > &pfc, int weight, int price, QWidget *parent=nullptr)menuCardexplicit
uimenuCardprivate
~menuCard()menuCard
+
+ + + + diff --git a/docs/doxygen/html/classmenu_card.html b/docs/doxygen/html/classmenu_card.html new file mode 100644 index 0000000..5be6dbc --- /dev/null +++ b/docs/doxygen/html/classmenu_card.html @@ -0,0 +1,327 @@ + + + + + + + +My Project: menuCard Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
menuCard Class Reference
+
+
+ +

Виджет отображения информации о рационе питания. + More...

+ +

#include <menuCard.h>

+
+Inheritance diagram for menuCard:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for menuCard:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + + + + +

+Public Member Functions

 menuCard (QString day, QStringList products, int calories, QVector< int > &pfc, int weight, int price, QWidget *parent=nullptr)
 Конструктор виджета menuCard.
 
 ~menuCard ()
 Деструктор.
 
+ + + + +

+Private Attributes

Ui::menuCard * ui
 UI-компоненты, сгенерированные Qt Designer.
 
+

Detailed Description

+

Виджет отображения информации о рационе питания.

+

Показывает данные за определённый день: список продуктов, калорийность, содержание БЖУ, вес и цену.

+

Constructor & Destructor Documentation

+ +

◆ menuCard()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
menuCard::menuCard (QString day,
QStringList products,
int calories,
QVector< int > & pfc,
int weight,
int price,
QWidget * parent = nullptr )
+
+explicit
+
+ +

Конструктор виджета menuCard.

+
Parameters
+ + + + + + + + +
dayДень недели или дата.
productsСписок продуктов в рационе.
caloriesОбщее количество калорий.
pfcВектор, содержащий значения белков, жиров и углеводов.
weightОбщий вес рациона.
priceОбщая стоимость рациона.
parentРодительский виджет.
+
+
+
11 : QWidget(parent)
+
12 , ui(new Ui::menuCard)
+
13 {
+
14 ui->setupUi(this);
+
15
+
16
+
17 ui->dayLabel->setText(day);
+
18
+
19
+
20 // 1. Добавляем продукты в menuVerticalLayout
+
21 for(const QString& product : products) {
+
22 QLabel* productLabel = new QLabel(product, this);
+
23 productLabel->setStyleSheet("font-size: 16px; font-weight: bold");
+
24 ui->menuVerticalLayout->addWidget(productLabel);
+
25 }
+
26
+
27 // 2. Добавляем параметры в paramsVerticalLayout
+
28 QLabel* caloriesLabel = new QLabel(QString("Калории: %1").arg(calories), this);
+
29 QLabel* pfcLabel = new QLabel(QString("БЖУ: %1-%2-%3").arg(pfc[0]).arg(pfc[1]).arg(pfc[2]), this);
+
30 QLabel* weightLabel = new QLabel(QString("Вес: %1 г").arg(weight), this);
+
31 QLabel* priceLabel = new QLabel(QString("Цена: %1 руб.").arg(price), this);
+
32
+
33 // Настройка стилей для параметров
+
34 QString paramStyle = "font-size: 14px; color: black; font-weight: bold";
+
35 caloriesLabel->setStyleSheet(paramStyle);
+
36 pfcLabel->setStyleSheet(paramStyle);
+
37 weightLabel->setStyleSheet(paramStyle);
+
38 priceLabel->setStyleSheet(paramStyle);
+
39
+
40 // Добавление в layout
+
41 ui->paramsVerticalLayout->addWidget(caloriesLabel);
+
42 ui->paramsVerticalLayout->addWidget(pfcLabel);
+
43 ui->paramsVerticalLayout->addWidget(weightLabel);
+
44 ui->paramsVerticalLayout->addWidget(priceLabel);
+
45
+
46 // Добавляем растягивающийся элемент в конец
+
47 ui->menuVerticalLayout->addStretch();
+
48 ui->paramsVerticalLayout->addStretch();
+
49 }
+
Ui::menuCard * ui
UI-компоненты, сгенерированные Qt Designer.
Definition menuCard.h:39
+
+
+
+ +

◆ ~menuCard()

+ +
+
+ + + + + + + +
menuCard::~menuCard ()
+
+ +

Деструктор.

+
52{
+
53 delete ui;
+
54}
+
+
+
+

Member Data Documentation

+ +

◆ ui

+ +
+
+ + + + + +
+ + + + +
Ui::menuCard* menuCard::ui
+
+private
+
+ +

UI-компоненты, сгенерированные Qt Designer.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/classmenu_card.js b/docs/doxygen/html/classmenu_card.js new file mode 100644 index 0000000..0c4a52a --- /dev/null +++ b/docs/doxygen/html/classmenu_card.js @@ -0,0 +1,6 @@ +var classmenu_card = +[ + [ "menuCard", "classmenu_card.html#a2031e638510376289c988f8c9799ab5b", null ], + [ "~menuCard", "classmenu_card.html#af0a4efa29020e128e125a4693b989024", null ], + [ "ui", "classmenu_card.html#a71b7e60bf8f8341de5cd2631e8701e77", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/classmenu_card__coll__graph.dot b/docs/doxygen/html/classmenu_card__coll__graph.dot new file mode 100644 index 0000000..7cccc83 --- /dev/null +++ b/docs/doxygen/html/classmenu_card__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "menuCard" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="menuCard",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Виджет отображения информации о рационе питания."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/classmenu_card__coll__graph.map b/docs/doxygen/html/classmenu_card__coll__graph.map new file mode 100644 index 0000000..41f9ddd --- /dev/null +++ b/docs/doxygen/html/classmenu_card__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/classmenu_card__coll__graph.md5 b/docs/doxygen/html/classmenu_card__coll__graph.md5 new file mode 100644 index 0000000..5b74d26 --- /dev/null +++ b/docs/doxygen/html/classmenu_card__coll__graph.md5 @@ -0,0 +1 @@ +aea73e6811ec2decd7eae77694616d06 \ No newline at end of file diff --git a/docs/doxygen/html/classmenu_card__coll__graph.png b/docs/doxygen/html/classmenu_card__coll__graph.png new file mode 100644 index 0000000..f508e17 Binary files /dev/null and b/docs/doxygen/html/classmenu_card__coll__graph.png differ diff --git a/docs/doxygen/html/classmenu_card__inherit__graph.dot b/docs/doxygen/html/classmenu_card__inherit__graph.dot new file mode 100644 index 0000000..7cccc83 --- /dev/null +++ b/docs/doxygen/html/classmenu_card__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "menuCard" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="menuCard",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Виджет отображения информации о рационе питания."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/classmenu_card__inherit__graph.map b/docs/doxygen/html/classmenu_card__inherit__graph.map new file mode 100644 index 0000000..41f9ddd --- /dev/null +++ b/docs/doxygen/html/classmenu_card__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/classmenu_card__inherit__graph.md5 b/docs/doxygen/html/classmenu_card__inherit__graph.md5 new file mode 100644 index 0000000..5b74d26 --- /dev/null +++ b/docs/doxygen/html/classmenu_card__inherit__graph.md5 @@ -0,0 +1 @@ +aea73e6811ec2decd7eae77694616d06 \ No newline at end of file diff --git a/docs/doxygen/html/classmenu_card__inherit__graph.png b/docs/doxygen/html/classmenu_card__inherit__graph.png new file mode 100644 index 0000000..f508e17 Binary files /dev/null and b/docs/doxygen/html/classmenu_card__inherit__graph.png differ diff --git a/docs/doxygen/html/classproduct_card-members.html b/docs/doxygen/html/classproduct_card-members.html new file mode 100644 index 0000000..9439bae --- /dev/null +++ b/docs/doxygen/html/classproduct_card-members.html @@ -0,0 +1,122 @@ + + + + + + + +My Project: Member List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
productCard Member List
+
+
+ +

This is the complete list of members for productCard, including all inherited members.

+ + +
productCard(QString name, int price, int proteins, int fatness, int carbs, QWidget *parent=nullptr)productCardexplicit
+
+ + + + diff --git a/docs/doxygen/html/classproduct_card.html b/docs/doxygen/html/classproduct_card.html new file mode 100644 index 0000000..103eaad --- /dev/null +++ b/docs/doxygen/html/classproduct_card.html @@ -0,0 +1,293 @@ + + + + + + + +My Project: productCard Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
productCard Class Reference
+
+
+ +

Виджет карточки продукта. + More...

+ +

#include <productCard.h>

+
+Inheritance diagram for productCard:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for productCard:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + +

+Public Member Functions

 productCard (QString name, int price, int proteins, int fatness, int carbs, QWidget *parent=nullptr)
 Конструктор карточки продукта.
 
+

Detailed Description

+

Виджет карточки продукта.

+

Отображает информацию о продукте: название, цену и пищевую ценность (белки, жиры, углеводы).

+

Constructor & Destructor Documentation

+ +

◆ productCard()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
productCard::productCard (QString name,
int price,
int proteins,
int fatness,
int carbs,
QWidget * parent = nullptr )
+
+explicit
+
+ +

Конструктор карточки продукта.

+
Parameters
+ + + + + + + +
nameНазвание продукта.
priceСтоимость продукта.
proteinsКоличество белков.
fatnessКоличество жиров.
carbsКоличество углеводов.
parentРодительский виджет.
+
+
+
6 : QWidget(parent)
+
7{
+
8 // Устанавливаем оптимальный размер с минимальными и максимальными ограничениями
+
9 this->setMinimumSize(150, 200);
+
10 this->setMaximumSize(200, 250);
+
11 this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+
12
+
13 QVBoxLayout* mainLayout = new QVBoxLayout(this);
+
14 mainLayout->setContentsMargins(10, 10, 10, 10);
+
15 mainLayout->setSpacing(8);
+
16
+
17 // Стили для улучшения читаемости
+
18 QString labelStyle = "QLabel { font-size: 16px; color: black; }";
+
19 QString titleStyle = "QLabel { font-weight: bold; font-size: 18px; color: black; }";
+
20 QString priceStyle = "QLabel { font-weight: bold; font-size: 16px; color: green; }";
+
21
+
22 // Название продукта
+
23 QLabel* nameLabel = new QLabel(name);
+
24 nameLabel->setStyleSheet(titleStyle);
+
25 nameLabel->setWordWrap(true);
+
26 nameLabel->setAlignment(Qt::AlignCenter);
+
27 mainLayout->addWidget(nameLabel);
+
28
+
29 // Цена
+
30 QLabel* priceLabel = new QLabel("Цена: " + QString::number(price) + "₽");
+
31 priceLabel->setStyleSheet(priceStyle);
+
32 priceLabel->setAlignment(Qt::AlignCenter);
+
33 mainLayout->addWidget(priceLabel);
+
34
+
35 // Разделительная линия
+
36 QFrame* line = new QFrame();
+
37 line->setFrameShape(QFrame::HLine);
+
38 line->setFrameShadow(QFrame::Sunken);
+
39 line->setStyleSheet("color: black;");
+
40 mainLayout->addWidget(line);
+
41
+
42 // Панель с пищевой ценностью
+
43 QWidget* nutritionPanel = new QWidget();
+
44 QGridLayout* nutritionLayout = new QGridLayout(nutritionPanel);
+
45 nutritionLayout->setContentsMargins(5, 5, 5, 5);
+
46 nutritionLayout->setHorizontalSpacing(10);
+
47 nutritionLayout->setVerticalSpacing(5);
+
48
+
49 // Заголовки и значения БЖУ
+
50 QLabel* proteinTitle = new QLabel("Белки:");
+
51 QLabel* proteinValue = new QLabel(QString::number(proteins) + " г");
+
52 QLabel* fatTitle = new QLabel("Жиры:");
+
53 QLabel* fatValue = new QLabel(QString::number(fatness) + " г");
+
54 QLabel* carbsTitle = new QLabel("Углеводы:");
+
55 QLabel* carbsValue = new QLabel(QString::number(carbs) + " г");
+
56
+
57 // Применяем стили
+
58 proteinTitle->setStyleSheet(labelStyle);
+
59 proteinValue->setStyleSheet(labelStyle);
+
60 fatTitle->setStyleSheet(labelStyle);
+
61 fatValue->setStyleSheet(labelStyle);
+
62 carbsTitle->setStyleSheet(labelStyle);
+
63 carbsValue->setStyleSheet(labelStyle);
+
64
+
65 // Добавляем в layout
+
66 nutritionLayout->addWidget(proteinTitle, 0, 0);
+
67 nutritionLayout->addWidget(proteinValue, 0, 1);
+
68 nutritionLayout->addWidget(fatTitle, 1, 0);
+
69 nutritionLayout->addWidget(fatValue, 1, 1);
+
70 nutritionLayout->addWidget(carbsTitle, 2, 0);
+
71 nutritionLayout->addWidget(carbsValue, 2, 1);
+
72
+
73 mainLayout->addWidget(nutritionPanel);
+
74}
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/doxygen/html/classproduct_card.js b/docs/doxygen/html/classproduct_card.js new file mode 100644 index 0000000..43f2e2e --- /dev/null +++ b/docs/doxygen/html/classproduct_card.js @@ -0,0 +1,4 @@ +var classproduct_card = +[ + [ "productCard", "classproduct_card.html#a095d77b284258000ed61c1a7e41c84ab", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/classproduct_card__coll__graph.dot b/docs/doxygen/html/classproduct_card__coll__graph.dot new file mode 100644 index 0000000..60d8d0f --- /dev/null +++ b/docs/doxygen/html/classproduct_card__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "productCard" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="productCard",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Виджет карточки продукта."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/classproduct_card__coll__graph.map b/docs/doxygen/html/classproduct_card__coll__graph.map new file mode 100644 index 0000000..11b5f04 --- /dev/null +++ b/docs/doxygen/html/classproduct_card__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/classproduct_card__coll__graph.md5 b/docs/doxygen/html/classproduct_card__coll__graph.md5 new file mode 100644 index 0000000..dcddb7f --- /dev/null +++ b/docs/doxygen/html/classproduct_card__coll__graph.md5 @@ -0,0 +1 @@ +d684f60390c446fa81760e247bd4dc15 \ No newline at end of file diff --git a/docs/doxygen/html/classproduct_card__coll__graph.png b/docs/doxygen/html/classproduct_card__coll__graph.png new file mode 100644 index 0000000..19fec1b Binary files /dev/null and b/docs/doxygen/html/classproduct_card__coll__graph.png differ diff --git a/docs/doxygen/html/classproduct_card__inherit__graph.dot b/docs/doxygen/html/classproduct_card__inherit__graph.dot new file mode 100644 index 0000000..60d8d0f --- /dev/null +++ b/docs/doxygen/html/classproduct_card__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "productCard" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="productCard",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Виджет карточки продукта."]; + Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/classproduct_card__inherit__graph.map b/docs/doxygen/html/classproduct_card__inherit__graph.map new file mode 100644 index 0000000..11b5f04 --- /dev/null +++ b/docs/doxygen/html/classproduct_card__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/classproduct_card__inherit__graph.md5 b/docs/doxygen/html/classproduct_card__inherit__graph.md5 new file mode 100644 index 0000000..dcddb7f --- /dev/null +++ b/docs/doxygen/html/classproduct_card__inherit__graph.md5 @@ -0,0 +1 @@ +d684f60390c446fa81760e247bd4dc15 \ No newline at end of file diff --git a/docs/doxygen/html/classproduct_card__inherit__graph.png b/docs/doxygen/html/classproduct_card__inherit__graph.png new file mode 100644 index 0000000..19fec1b Binary files /dev/null and b/docs/doxygen/html/classproduct_card__inherit__graph.png differ diff --git a/docs/doxygen/html/client_2main_8cpp.html b/docs/doxygen/html/client_2main_8cpp.html new file mode 100644 index 0000000..3fbfe7d --- /dev/null +++ b/docs/doxygen/html/client_2main_8cpp.html @@ -0,0 +1,213 @@ + + + + + + + +My Project: client/main.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
main.cpp File Reference
+
+
+
#include "managerforms.h"
+#include <QApplication>
+
+Include dependency graph for main.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +

+Functions

int main (int argc, char *argv[])
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + + + + +
int main (int argc,
char * argv[] )
+
+
6{
+
7
+
8 QApplication a(argc, argv);
+ + +
11 return a.exec();
+
12}
+
static ClientSingleton & getInstance()
Получить экземпляр Singleton.
Definition Singleton.cpp:13
+
Класс для управления окнами приложения.
Definition managerforms.h:21
+
+
+
+
+
+ + + + diff --git a/docs/doxygen/html/client_2main_8cpp.js b/docs/doxygen/html/client_2main_8cpp.js new file mode 100644 index 0000000..a8cdd60 --- /dev/null +++ b/docs/doxygen/html/client_2main_8cpp.js @@ -0,0 +1,4 @@ +var client_2main_8cpp = +[ + [ "main", "client_2main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/client_2main_8cpp__incl.dot b/docs/doxygen/html/client_2main_8cpp__incl.dot new file mode 100644 index 0000000..d83a87c --- /dev/null +++ b/docs/doxygen/html/client_2main_8cpp__incl.dot @@ -0,0 +1,53 @@ +digraph "client/main.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/main.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge5_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge6_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node7 -> Node3 [id="edge7_Node000007_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node7 -> Node8 [id="edge8_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node8 -> Node9 [id="edge9_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node10 [id="edge10_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node10 -> Node11 [id="edge11_Node000010_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node12 [id="edge12_Node000010_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node13 [id="edge13_Node000010_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node14 [id="edge14_Node000010_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node15 [id="edge15_Node000010_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node16 [id="edge16_Node000010_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node17 [id="edge17_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node17 -> Node3 [id="edge18_Node000017_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node8 [id="edge19_Node000017_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node18 [id="edge20_Node000017_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node18 -> Node5 [id="edge21_Node000018_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node19 [id="edge22_Node000017_Node000019",color="steelblue1",style="solid",tooltip=" "]; + Node19 [id="Node000019",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node19 -> Node5 [id="edge23_Node000019_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node6 [id="edge24_Node000017_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node2 -> Node10 [id="edge25_Node000002_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node20 [id="edge26_Node000001_Node000020",color="steelblue1",style="solid",tooltip=" "]; + Node20 [id="Node000020",label="QApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/client_2main_8cpp__incl.map b/docs/doxygen/html/client_2main_8cpp__incl.map new file mode 100644 index 0000000..dd8f0c1 --- /dev/null +++ b/docs/doxygen/html/client_2main_8cpp__incl.map @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/client_2main_8cpp__incl.md5 b/docs/doxygen/html/client_2main_8cpp__incl.md5 new file mode 100644 index 0000000..660c206 --- /dev/null +++ b/docs/doxygen/html/client_2main_8cpp__incl.md5 @@ -0,0 +1 @@ +cbd011e56cd5aa707a4ce40344c9144a \ No newline at end of file diff --git a/docs/doxygen/html/client_2main_8cpp__incl.png b/docs/doxygen/html/client_2main_8cpp__incl.png new file mode 100644 index 0000000..9934f45 Binary files /dev/null and b/docs/doxygen/html/client_2main_8cpp__incl.png differ diff --git a/docs/doxygen/html/clipboard.js b/docs/doxygen/html/clipboard.js new file mode 100644 index 0000000..9da9f3c --- /dev/null +++ b/docs/doxygen/html/clipboard.js @@ -0,0 +1,61 @@ +/** + +The code below is based on the Doxygen Awesome project, see +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +let clipboard_title = "Copy to clipboard" +let clipboard_icon = `` +let clipboard_successIcon = `` +let clipboard_successDuration = 1000 + +$(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const clipboard_div = document.createElement("div") + clipboard_div.classList.add("clipboard") + clipboard_div.innerHTML = clipboard_icon + clipboard_div.title = clipboard_title + $(clipboard_div).click(function() { + const content = this.parentNode.cloneNode(true) + // filter out line number and folded fragments from file listings + content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) + let text = content.textContent + // remove trailing newlines and trailing spaces from empty lines + text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') + navigator.clipboard.writeText(text); + this.classList.add("success") + this.innerHTML = clipboard_successIcon + window.setTimeout(() => { // switch back to normal icon after timeout + this.classList.remove("success") + this.innerHTML = clipboard_icon + }, clipboard_successDuration); + }) + fragment.insertBefore(clipboard_div, fragment.firstChild) + } + } +}) diff --git a/docs/doxygen/html/cookie.js b/docs/doxygen/html/cookie.js new file mode 100644 index 0000000..53ad21d --- /dev/null +++ b/docs/doxygen/html/cookie.js @@ -0,0 +1,58 @@ +/*! + Cookie helper functions + Copyright (c) 2023 Dimitri van Heesch + Released under MIT license. +*/ +let Cookie = { + cookie_namespace: 'doxygen_', + + readSetting(cookie,defVal) { + if (window.chrome) { + const val = localStorage.getItem(this.cookie_namespace+cookie) || + sessionStorage.getItem(this.cookie_namespace+cookie); + if (val) return val; + } else { + let myCookie = this.cookie_namespace+cookie+"="; + if (document.cookie) { + const index = document.cookie.indexOf(myCookie); + if (index != -1) { + const valStart = index + myCookie.length; + let valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + return document.cookie.substring(valStart, valEnd); + } + } + } + return defVal; + }, + + writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete + if (window.chrome) { + if (days==0) { + sessionStorage.setItem(this.cookie_namespace+cookie,val); + } else { + localStorage.setItem(this.cookie_namespace+cookie,val); + } + } else { + let date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; + document.cookie = this.cookie_namespace + cookie + "=" + + val + "; SameSite=Lax;" + expiration + "path=/"; + } + }, + + eraseSetting(cookie) { + if (window.chrome) { + if (localStorage.getItem(this.cookie_namespace+cookie)) { + localStorage.removeItem(this.cookie_namespace+cookie); + } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { + sessionStorage.removeItem(this.cookie_namespace+cookie); + } + } else { + this.writeSetting(cookie,'',-1); + } + }, +} diff --git a/docs/doxygen/html/databasesingleton_8cpp.html b/docs/doxygen/html/databasesingleton_8cpp.html new file mode 100644 index 0000000..f7c6e67 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8cpp.html @@ -0,0 +1,142 @@ + + + + + + + +My Project: server/databasesingleton.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
databasesingleton.cpp File Reference
+
+
+
#include "databasesingleton.h"
+
+Include dependency graph for databasesingleton.cpp:
+
+
+ + + + + + + + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/databasesingleton_8cpp__incl.dot b/docs/doxygen/html/databasesingleton_8cpp__incl.dot new file mode 100644 index 0000000..3a6e95f --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8cpp__incl.dot @@ -0,0 +1,22 @@ +digraph "server/databasesingleton.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/databasesingleton.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="databasesingleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node5 [id="edge4_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node6 [id="edge5_Node000002_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge6_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node8 [id="edge7_Node000002_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/databasesingleton_8cpp__incl.map b/docs/doxygen/html/databasesingleton_8cpp__incl.map new file mode 100644 index 0000000..56210a4 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8cpp__incl.map @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/databasesingleton_8cpp__incl.md5 b/docs/doxygen/html/databasesingleton_8cpp__incl.md5 new file mode 100644 index 0000000..0d34180 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8cpp__incl.md5 @@ -0,0 +1 @@ +fadf06f05eaec8e7270b251abf5b030a \ No newline at end of file diff --git a/docs/doxygen/html/databasesingleton_8cpp__incl.png b/docs/doxygen/html/databasesingleton_8cpp__incl.png new file mode 100644 index 0000000..63aa4f6 Binary files /dev/null and b/docs/doxygen/html/databasesingleton_8cpp__incl.png differ diff --git a/docs/doxygen/html/databasesingleton_8h.html b/docs/doxygen/html/databasesingleton_8h.html new file mode 100644 index 0000000..5980ab4 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h.html @@ -0,0 +1,173 @@ + + + + + + + +My Project: server/databasesingleton.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
databasesingleton.h File Reference
+
+
+
#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QSqlError>
+#include <QDebug>
+#include <QVariantMap>
+#include <QVector>
+
+Include dependency graph for databasesingleton.h:
+
+
+ + + + + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + + + + +

+Classes

class  SingletonDestroyer
 Класс для разрушения экземпляра Singleton. More...
 
class  DataBaseSingleton
 Класс для работы с базой данных. More...
 
+
+
+ + + + diff --git a/docs/doxygen/html/databasesingleton_8h.js b/docs/doxygen/html/databasesingleton_8h.js new file mode 100644 index 0000000..90d4ab9 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h.js @@ -0,0 +1,5 @@ +var databasesingleton_8h = +[ + [ "SingletonDestroyer", "class_singleton_destroyer.html", "class_singleton_destroyer" ], + [ "DataBaseSingleton", "class_data_base_singleton.html", "class_data_base_singleton" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/databasesingleton_8h__dep__incl.dot b/docs/doxygen/html/databasesingleton_8h__dep__incl.dot new file mode 100644 index 0000000..f3044d7 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h__dep__incl.dot @@ -0,0 +1,14 @@ +digraph "server/databasesingleton.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/databasesingleton.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="server/databasesingleton.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="server/func2serv.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$func2serv_8cpp.html",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="server/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$server_2main_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/databasesingleton_8h__dep__incl.map b/docs/doxygen/html/databasesingleton_8h__dep__incl.map new file mode 100644 index 0000000..e6ce4a7 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h__dep__incl.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/doxygen/html/databasesingleton_8h__dep__incl.md5 b/docs/doxygen/html/databasesingleton_8h__dep__incl.md5 new file mode 100644 index 0000000..c1c07c8 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h__dep__incl.md5 @@ -0,0 +1 @@ +37fc10c040e9d2abffcbe54d3fd86d6f \ No newline at end of file diff --git a/docs/doxygen/html/databasesingleton_8h__dep__incl.png b/docs/doxygen/html/databasesingleton_8h__dep__incl.png new file mode 100644 index 0000000..4932896 Binary files /dev/null and b/docs/doxygen/html/databasesingleton_8h__dep__incl.png differ diff --git a/docs/doxygen/html/databasesingleton_8h__incl.dot b/docs/doxygen/html/databasesingleton_8h__incl.dot new file mode 100644 index 0000000..9dc65ef --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h__incl.dot @@ -0,0 +1,20 @@ +digraph "server/databasesingleton.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/databasesingleton.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge6_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/databasesingleton_8h__incl.map b/docs/doxygen/html/databasesingleton_8h__incl.map new file mode 100644 index 0000000..ae89088 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h__incl.map @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/databasesingleton_8h__incl.md5 b/docs/doxygen/html/databasesingleton_8h__incl.md5 new file mode 100644 index 0000000..0a7bff7 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h__incl.md5 @@ -0,0 +1 @@ +101d676215380d9a5c0315f93c82dba3 \ No newline at end of file diff --git a/docs/doxygen/html/databasesingleton_8h__incl.png b/docs/doxygen/html/databasesingleton_8h__incl.png new file mode 100644 index 0000000..3ee6779 Binary files /dev/null and b/docs/doxygen/html/databasesingleton_8h__incl.png differ diff --git a/docs/doxygen/html/databasesingleton_8h_source.html b/docs/doxygen/html/databasesingleton_8h_source.html new file mode 100644 index 0000000..d541203 --- /dev/null +++ b/docs/doxygen/html/databasesingleton_8h_source.html @@ -0,0 +1,208 @@ + + + + + + + +My Project: server/databasesingleton.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
databasesingleton.h
+
+
+Go to the documentation of this file.
1#ifndef DATABASESINGLETON_H
+
2#define DATABASESINGLETON_H
+
3
+
4#include <QSqlDatabase>
+
5#include <QSqlQuery>
+
6#include <QSqlError>
+
7#include <QDebug>
+
8#include <QVariantMap>
+
9#include <QVector>
+
10
+ +
12
+
+ +
19private:
+ +
21public:
+ +
28
+ +
35};
+
+
36
+
+ +
44private:
+ + +
47 QSqlDatabase db;
+
48
+ +
55
+ + +
58
+
64 ~DataBaseSingleton() = default;
+
65
+
66 friend class SingletonDestroyer;
+
67
+
68public:
+ +
75
+
84 bool initialize(const QString& databaseName);
+
85
+
93 QSqlQuery executeQuery(const QString& query, const QVariantMap& params = QVariantMap());
+
94
+
102 bool checkUserCredentials(const QString& login, const QString& password);
+
103
+
113 bool addUser(const QString& name, const QString& email, const QString& password, bool isAdmin = false);
+
114
+
128 bool addProduct(int userId, const QString& name, int proteins, int fatness, int carbs, int weight, int cost, int type);
+
129
+
136 QVector<QVariantMap> getProductsByUser(int userId);
+
137
+
148 bool addFavoriteRation(int userId, const QVector<int>& productIds, int calories, int allCost, int allWeight);
+
149
+
156 QVector<QVariantMap> getFavoritesByUser(int userId);
+
157
+
166 bool updateStatistics(int registrations, int visits, int generations);
+
167
+
173 QVariantMap getStatistics();
+
174};
+
+
175
+
176#endif // DATABASESINGLETON_H
+
Класс для работы с базой данных.
Definition databasesingleton.h:43
+
bool addProduct(int userId, const QString &name, int proteins, int fatness, int carbs, int weight, int cost, int type)
Добавление продукта в базу данных.
Definition databasesingleton.cpp:114
+
static SingletonDestroyer destroyer
Объект-разрушитель
Definition databasesingleton.h:46
+
QSqlQuery executeQuery(const QString &query, const QVariantMap &params=QVariantMap())
Выполнение SQL-запроса с параметрами.
Definition databasesingleton.cpp:78
+
bool addFavoriteRation(int userId, const QVector< int > &productIds, int calories, int allCost, int allWeight)
Добавление рациона в избранное.
Definition databasesingleton.cpp:154
+
bool checkUserCredentials(const QString &login, const QString &password)
Проверка учетных данных пользователя.
Definition databasesingleton.cpp:92
+
bool initialize(const QString &databaseName)
Инициализация базы данных.
Definition databasesingleton.cpp:18
+
QVector< QVariantMap > getProductsByUser(int userId)
Получение продуктов для конкретного пользователя.
Definition databasesingleton.cpp:132
+
QSqlDatabase db
Объект базы данных
Definition databasesingleton.h:47
+
~DataBaseSingleton()=default
Приватный деструктор.
+
DataBaseSingleton()
Приватный конструктор.
Definition databasesingleton.cpp:6
+
friend class SingletonDestroyer
Дружественный класс для доступа к деструктору
Definition databasesingleton.h:66
+
QVariantMap getStatistics()
Получение статистики.
Definition databasesingleton.cpp:199
+
bool updateStatistics(int registrations, int visits, int generations)
Обновление статистики.
Definition databasesingleton.cpp:191
+
DataBaseSingleton(const DataBaseSingleton &)=delete
Запрещает копирование экземпляра
+
static DataBaseSingleton * p_instance
Единственный экземпляр класса
Definition databasesingleton.h:45
+
static DataBaseSingleton * getInstance()
Получение единственного экземпляра Singleton.
Definition databasesingleton.cpp:10
+
bool addUser(const QString &name, const QString &email, const QString &password, bool isAdmin=false)
Добавление нового пользователя в базу данных.
Definition databasesingleton.cpp:100
+
DataBaseSingleton & operator=(const DataBaseSingleton &)=delete
Запрещает присваивание
+
QVector< QVariantMap > getFavoritesByUser(int userId)
Получение избранных рационов пользователя.
Definition databasesingleton.cpp:173
+
Класс для разрушения экземпляра Singleton.
Definition databasesingleton.h:18
+
DataBaseSingleton * p_instance
Указатель на экземпляр Singleton.
Definition databasesingleton.h:20
+
~SingletonDestroyer()
Деструктор для удаления Singleton.
Definition databasesingleton.cpp:211
+
void initialize(DataBaseSingleton *p)
Инициализация указателя на экземпляр Singleton.
Definition databasesingleton.cpp:212
+
+
+ + + + diff --git a/docs/doxygen/html/dir_41e1742e44e2de38b3bc91f993fed282.html b/docs/doxygen/html/dir_41e1742e44e2de38b3bc91f993fed282.html new file mode 100644 index 0000000..550a988 --- /dev/null +++ b/docs/doxygen/html/dir_41e1742e44e2de38b3bc91f993fed282.html @@ -0,0 +1,137 @@ + + + + + + + +My Project: server Directory Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
server Directory Reference
+
+
+ + + + + + + + + + + + + + + + +

+Files

 databasesingleton.cpp
 
 databasesingleton.h
 
 func2serv.cpp
 
 func2serv.h
 
 main.cpp
 
 mytcpserver.cpp
 
 mytcpserver.h
 
+
+
+ + + + diff --git a/docs/doxygen/html/dir_41e1742e44e2de38b3bc91f993fed282.js b/docs/doxygen/html/dir_41e1742e44e2de38b3bc91f993fed282.js new file mode 100644 index 0000000..689553e --- /dev/null +++ b/docs/doxygen/html/dir_41e1742e44e2de38b3bc91f993fed282.js @@ -0,0 +1,10 @@ +var dir_41e1742e44e2de38b3bc91f993fed282 = +[ + [ "databasesingleton.cpp", "databasesingleton_8cpp.html", null ], + [ "databasesingleton.h", "databasesingleton_8h.html", "databasesingleton_8h" ], + [ "func2serv.cpp", "func2serv_8cpp.html", "func2serv_8cpp" ], + [ "func2serv.h", "func2serv_8h.html", "func2serv_8h" ], + [ "main.cpp", "server_2main_8cpp.html", "server_2main_8cpp" ], + [ "mytcpserver.cpp", "mytcpserver_8cpp.html", null ], + [ "mytcpserver.h", "mytcpserver_8h.html", "mytcpserver_8h" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/dir_db3a54907829b36871118d03417739cd.html b/docs/doxygen/html/dir_db3a54907829b36871118d03417739cd.html new file mode 100644 index 0000000..a58f514 --- /dev/null +++ b/docs/doxygen/html/dir_db3a54907829b36871118d03417739cd.html @@ -0,0 +1,157 @@ + + + + + + + +My Project: client Directory Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
client Directory Reference
+
+ +
+ + + + diff --git a/docs/doxygen/html/dir_db3a54907829b36871118d03417739cd.js b/docs/doxygen/html/dir_db3a54907829b36871118d03417739cd.js new file mode 100644 index 0000000..2f12364 --- /dev/null +++ b/docs/doxygen/html/dir_db3a54907829b36871118d03417739cd.js @@ -0,0 +1,20 @@ +var dir_db3a54907829b36871118d03417739cd = +[ + [ "add_product.cpp", "add__product_8cpp.html", null ], + [ "add_product.h", "add__product_8h.html", "add__product_8h" ], + [ "authregwindow.cpp", "authregwindow_8cpp.html", null ], + [ "authregwindow.h", "authregwindow_8h.html", "authregwindow_8h" ], + [ "functions_for_client.cpp", "functions__for__client_8cpp.html", "functions__for__client_8cpp" ], + [ "functions_for_client.h", "functions__for__client_8h.html", "functions__for__client_8h" ], + [ "main.cpp", "client_2main_8cpp.html", "client_2main_8cpp" ], + [ "mainwindow.cpp", "mainwindow_8cpp.html", null ], + [ "mainwindow.h", "mainwindow_8h.html", "mainwindow_8h" ], + [ "managerforms.cpp", "managerforms_8cpp.html", null ], + [ "managerforms.h", "managerforms_8h.html", "managerforms_8h" ], + [ "menucard.cpp", "menucard_8cpp.html", null ], + [ "menuCard.h", "menu_card_8h.html", "menu_card_8h" ], + [ "productCard.cpp", "product_card_8cpp.html", null ], + [ "productCard.h", "product_card_8h.html", "product_card_8h" ], + [ "Singleton.cpp", "_singleton_8cpp.html", null ], + [ "Singleton.h", "_singleton_8h.html", "_singleton_8h" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/doc.svg b/docs/doxygen/html/doc.svg new file mode 100644 index 0000000..0b928a5 --- /dev/null +++ b/docs/doxygen/html/doc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/docs/doxygen/html/docd.svg b/docs/doxygen/html/docd.svg new file mode 100644 index 0000000..ac18b27 --- /dev/null +++ b/docs/doxygen/html/docd.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/docs/doxygen/html/doxygen.css b/docs/doxygen/html/doxygen.css new file mode 100644 index 0000000..4947e24 --- /dev/null +++ b/docs/doxygen/html/doxygen.css @@ -0,0 +1,2255 @@ +/* The standard CSS for doxygen 1.13.2*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #3D578C; +--page-visited-link-color: #4665A2; + +/* index */ +--index-odd-item-bg-color: #F8F9FC; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F9FAFC; +--header-separator-color: #C4CFE5; +--header-gradient-image: url('nav_h.png'); +--group-header-separator-color: #879ECB; +--group-header-color: #354C7B; +--inherit-header-color: gray; + +--footer-foreground-color: #2A3D61; +--footer-logo-width: 104px; +--citation-label-color: #334975; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #5373B4; +--directory-separator-color: #9CAFD4; +--separator-color: #4A6AAA; + +--blockquote-background-color: #F7F8FB; +--blockquote-border-color: #9CAFD4; + +--scrollbar-thumb-color: #9CAFD4; +--scrollbar-background-color: #F9FAFC; + +--icon-background-color: #728DC1; +--icon-foreground-color: white; +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #F9FAFC; +--memdecl-separator-color: #DEE4F0; +--memdecl-foreground-color: #555; +--memdecl-template-color: #4665A2; + +/* detailed member list */ +--memdef-border-color: #A8B8D9; +--memdef-title-background-color: #E2E8F2; +--memdef-title-gradient-image: url('nav_f.png'); +--memdef-proto-background-color: #DFE5F1; +--memdef-proto-text-color: #253555; +--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #4665A2; + +/* tables */ +--table-cell-border-color: #2D4068; +--table-header-background-color: #374F7F; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #728DC1; +--label-left-top-border-color: #5373B4; +--label-right-bottom-border-color: #C4CFE5; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F9FAFC; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_b.png'); +--nav-gradient-hover-image: url('tab_h.png'); +--nav-gradient-active-image: url('tab_a.png'); +--nav-gradient-active-image-parent: url("../tab_a.png"); +--nav-separator-image: url('tab_s.png'); +--nav-breadcrumb-image: url('bc_s.png'); +--nav-breadcrumb-border-color: #C2CDE4; +--nav-splitbar-image: url('splitbar.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #283A5D; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #364D7C; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #9CAFD4; +--nav-arrow-selected-color: #9CAFD4; + +/* table of contents */ +--toc-background-color: #F4F6FA; +--toc-border-color: #D8DFEE; +--toc-header-color: #4665A2; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-magnification-image: url('mag.svg'); +--search-magnification-select-image: url('mag_sel.svg'); +--search-active-color: black; +--search-filter-background-color: #F9FAFC; +--search-filter-foreground-color: black; +--search-filter-border-color: #90A5CE; +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #3D578C; +--search-results-foreground-color: #425E97; +--search-results-background-color: #EEF1F7; +--search-results-border-color: black; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #555; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-xml-cdata-color: black; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #4665A2; +--code-external-link-color: #4665A2; +--fragment-foreground-color: black; +--fragment-background-color: #FBFCFD; +--fragment-border-color: #C4CFE5; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #4665A2; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #4665A2; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--fragment-copy-ok-color: #2EC82E; +--tooltip-foreground-color: black; +--tooltip-background-color: white; +--tooltip-border-color: gray; +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #4665A2; +--tooltip-shadow: 1px 1px 7px gray; +--fold-line-color: #808080; +--fold-minus-image: url('minus.svg'); +--fold-plus-image: url('plus.svg'); +--fold-minus-image-relpath: url('../../minus.svg'); +--fold-plus-image-relpath: url('../../plus.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #f8d1cc; +--warning-color-hl: #b61825; +--warning-color-text: #75070f; +--note-color-bg: #faf3d8; +--note-color-hl: #f3a600; +--note-color-text: #5f4204; +--todo-color-bg: #e4f3ff; +--todo-color-hl: #1879C4; +--todo-color-text: #274a5c; +--test-color-bg: #e8e8ff; +--test-color-hl: #3939C4; +--test-color-text: #1a1a5c; +--deprecated-color-bg: #ecf0f3; +--deprecated-color-hl: #5b6269; +--deprecated-color-text: #43454a; +--bug-color-bg: #e4dafd; +--bug-color-hl: #5b2bdd; +--bug-color-text: #2a0d72; +--invariant-color-bg: #d8f1e3; +--invariant-color-hl: #44b86f; +--invariant-color-text: #265532; +} + +@media (prefers-color-scheme: dark) { + html:not(.dark-mode) { + color-scheme: dark; + +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #90A5CE; +--page-visited-link-color: #A3B4D7; + +/* index */ +--index-odd-item-bg-color: #0B101A; +--index-even-item-bg-color: black; +--index-header-color: #C4CFE5; +--index-separator-color: #334975; + +/* header */ +--header-background-color: #070B11; +--header-separator-color: #141C2E; +--header-gradient-image: url('nav_hd.png'); +--group-header-separator-color: #283A5D; +--group-header-color: #90A5CE; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #5B7AB7; +--footer-logo-width: 60px; +--citation-label-color: #90A5CE; +--glow-color: cyan; + +--title-background-color: #090D16; +--title-separator-color: #354C79; +--directory-separator-color: #283A5D; +--separator-color: #283A5D; + +--blockquote-background-color: #101826; +--blockquote-border-color: #283A5D; + +--scrollbar-thumb-color: #283A5D; +--scrollbar-background-color: #070B11; + +--icon-background-color: #334975; +--icon-foreground-color: #C4CFE5; +--icon-doc-image: url('docd.svg'); +--icon-folder-open-image: url('folderopend.svg'); +--icon-folder-closed-image: url('folderclosedd.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #0B101A; +--memdecl-separator-color: #2C3F65; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #7C95C6; + +/* detailed member list */ +--memdef-border-color: #233250; +--memdef-title-background-color: #1B2840; +--memdef-title-gradient-image: url('nav_fd.png'); +--memdef-proto-background-color: #19243A; +--memdef-proto-text-color: #9DB0D4; +--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #7C95C6; + +/* tables */ +--table-cell-border-color: #283A5D; +--table-header-background-color: #283A5D; +--table-header-foreground-color: #C4CFE5; + +/* labels */ +--label-background-color: #354C7B; +--label-left-top-border-color: #4665A2; +--label-right-bottom-border-color: #283A5D; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #101826; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_bd.png'); +--nav-gradient-hover-image: url('tab_hd.png'); +--nav-gradient-active-image: url('tab_ad.png'); +--nav-gradient-active-image-parent: url("../tab_ad.png"); +--nav-separator-image: url('tab_sd.png'); +--nav-breadcrumb-image: url('bc_sd.png'); +--nav-breadcrumb-border-color: #2A3D61; +--nav-splitbar-image: url('splitbard.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #B6C4DF; +--nav-text-hover-color: #DCE2EF; +--nav-text-active-color: #DCE2EF; +--nav-text-normal-shadow: 0px 1px 1px black; +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #B6C4DF; +--nav-menu-background-color: #05070C; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #334975; +--nav-arrow-selected-color: #90A5CE; + +/* table of contents */ +--toc-background-color: #151E30; +--toc-border-color: #202E4A; +--toc-header-color: #A3B4D7; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-magnification-image: url('mag_d.svg'); +--search-magnification-select-image: url('mag_seld.svg'); +--search-active-color: #C5C5C5; +--search-filter-background-color: #101826; +--search-filter-foreground-color: #90A5CE; +--search-filter-border-color: #7C95C6; +--search-filter-highlight-text-color: #BCC9E2; +--search-filter-highlight-bg-color: #283A5D; +--search-results-background-color: #101826; +--search-results-foreground-color: #90A5CE; +--search-results-border-color: #7C95C6; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: #090D16; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--fragment-copy-ok-color: #0EA80E; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; +--fold-line-color: #808080; +--fold-minus-image: url('minusd.svg'); +--fold-plus-image: url('plusd.svg'); +--fold-minus-image-relpath: url('../../minusd.svg'); +--fold-plus-image-relpath: url('../../plusd.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #2e1917; +--warning-color-hl: #ad2617; +--warning-color-text: #f5b1aa; +--note-color-bg: #3b2e04; +--note-color-hl: #f1b602; +--note-color-text: #ceb670; +--todo-color-bg: #163750; +--todo-color-hl: #1982D2; +--todo-color-text: #dcf0fa; +--test-color-bg: #121258; +--test-color-hl: #4242cf; +--test-color-text: #c0c0da; +--deprecated-color-bg: #2e323b; +--deprecated-color-hl: #738396; +--deprecated-color-text: #abb0bd; +--bug-color-bg: #2a2536; +--bug-color-hl: #7661b3; +--bug-color-text: #ae9ed6; +--invariant-color-bg: #303a35; +--invariant-color-hl: #76ce96; +--invariant-color-text: #cceed5; +}} +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; +} + +/* @group Heading Levels */ + +.title { + font-family: var(--font-family-normal); + line-height: 28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h1.groupheader { + font-size: 150%; +} + +h2.groupheader { + border-bottom: 1px solid var(--group-header-separator-color); + color: var(--group-header-color); + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--glow-color); +} + +dt { + font-weight: bold; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL { + background-image: var(--nav-gradient-active-image); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: var(--index-separator-color); +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: var(--index-header-color); +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.even { + background-color: var(--index-even-item-bg-color); +} + +.classindex dl.odd { + background-color: var(--index-odd-item-bg-color); +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: var(--page-link-color); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: var(--page-visited-link-color); +} + +a:hover { + text-decoration: none; + background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); +} + +a:hover > span.arrow { + text-decoration: none; + background : var(--nav-background-color); +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: var(--code-link-color); +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: var(--code-external-link-color); +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul.check { + list-style:none; + text-indent: -16px; + padding-left: 38px; +} +li.unchecked:before { + content: "\2610\A0"; +} +li.checked:before { + content: "\2611\A0"; +} + +ol { + text-indent: 0px; +} + +ul { + text-indent: 0px; + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; + overflow-y: hidden; + position: relative; + min-height: 12px; + margin: 10px 0px; + padding: 10px 10px; + border: 1px solid var(--fragment-border-color); + border-radius: 4px; + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); +} + +pre.fragment { + word-wrap: break-word; + font-size: 10pt; + line-height: 125%; + font-family: var(--font-family-monospace); +} + +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; + overflow: hidden; + justify-content: center; + align-items: center; + cursor: pointer; +} + +.clipboard.success { + border: 1px solid var(--fragment-foreground-color); + border-radius: 4px; +} + +.fragment:hover .clipboard, .clipboard.success { + opacity: .4; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: var(--fragment-copy-ok-color); +} + +.clipboard.success { + border-color: var(--fragment-copy-ok-color); +} + +div.line { + font-family: var(--font-family-monospace); + font-size: 13px; + min-height: 13px; + line-height: 1.2; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); +} + +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); + white-space: pre; +} +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); +} + +span.lineno a:hover { + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + color: var(--page-foreground-color); + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +p.formulaDsp { + text-align: center; +} + +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: var(--code-keyword-color); +} + +span.keywordtype { + color: var(--code-type-keyword-color); +} + +span.keywordflow { + color: var(--code-flow-keyword-color); +} + +span.comment { + color: var(--code-comment-color); +} + +span.preprocessor { + color: var(--code-preprocessor-color); +} + +span.stringliteral { + color: var(--code-string-literal-color); +} + +span.charliteral { + color: var(--code-char-literal-color); +} + +span.xmlcdata { + color: var(--code-xml-cdata-color); +} + +span.vhdldigit { + color: var(--code-vhdl-digit-color); +} + +span.vhdlchar { + color: var(--code-vhdl-char-color); +} + +span.vhdlkeyword { + color: var(--code-vhdl-keyword-color); +} + +span.vhdllogic { + color: var(--code-vhdl-logic-color); +} + +blockquote { + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid var(--table-cell-border-color); +} + +th.dirtab { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid var(--separator-color); +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: var(--memdecl-background-color); + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: var(--memdecl-foreground-color); +} + +.memSeparator { + border-bottom: 1px solid var(--memdecl-separator-color); + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: var(--memdecl-template-color); + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: var(--memdef-title-gradient-image); + background-repeat: repeat-x; + background-color: var(--memdef-title-background-color); + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: var(--memdef-template-color); + font-weight: normal; + margin-left: 9px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px var(--glow-color); +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 0px 6px 0px; + color: var(--memdef-proto-text-color); + font-weight: bold; + text-shadow: var(--memdef-proto-text-shadow); + background-color: var(--memdef-proto-background-color); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; +} + +.overload { + font-family: var(--font-family-monospace); + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 10px 2px 10px; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: var(--memdef-doc-background-color); + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; + padding: 0px; + padding-bottom: 1px; +} + +.paramname { + white-space: nowrap; + padding: 0px; + padding-bottom: 1px; + margin-left: 2px; +} + +.paramname em { + color: var(--memdef-param-name-color); + font-style: normal; + margin-right: 1px; +} + +.paramname .paramdefval { + font-family: var(--font-family-monospace); +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: var(--font-family-monospace); + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); + text-shadow: none; + color: var(--label-foreground-color); + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid var(--directory-separator-color); + border-bottom: 1px solid var(--directory-separator-color); + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + +.directory tr.even { + padding-left: 6px; + background-color: var(--index-even-item-bg-color); +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: var(--page-link-color); +} + +.arrow { + color: var(--nav-arrow-color); + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: var(--font-family-icon); + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-open-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-closed-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-doc-image); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: var(--footer-foreground-color); +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + margin-bottom: 10px; + border: 1px solid var(--memdef-border-color); + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname, .fieldtable td.fieldinit { + white-space: nowrap; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fieldinit { + padding-top: 3px; + text-align: right; +} + + +.fieldtable td.fielddoc { + border-bottom: 1px solid var(--memdef-border-color); +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image: var(--memdef-title-gradient-image); + background-repeat:repeat-x; + background-color: var(--memdef-title-background-color); + font-size: 90%; + color: var(--memdef-proto-text-color); + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: var(--nav-gradient-image); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image: var(--nav-gradient-image); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:var(--nav-text-normal-color); + border:solid 1px var(--nav-breadcrumb-border-color); + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:var(--nav-breadcrumb-image); + background-repeat:no-repeat; + background-position:right; + color: var(--nav-foreground-color); +} + +.navpath li.navelem a +{ + height:32px; + display:block; + outline: none; + color: var(--nav-text-normal-color); + font-family: var(--font-family-nav); + text-shadow: var(--nav-text-normal-shadow); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color: var(--footer-foreground-color); + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image: var(--header-gradient-image); + background-repeat:repeat-x; + background-color: var(--header-background-color); + margin: 0px; + border-bottom: 1px solid var(--header-separator-color); +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* + +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention, dl.important { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +*/ + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.important, dl.note, dl.deprecated, dl.bug, +dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; + border-radius: 4px; +} + +dl.section dd { + margin-bottom: 2px; +} + +dl.warning, dl.attention, dl.important { + background: var(--warning-color-bg); + border-left: 8px solid var(--warning-color-hl); + color: var(--warning-color-text); +} + +dl.warning dt, dl.attention dt, dl.important dt { + color: var(--warning-color-hl); +} + +dl.note, dl.remark { + background: var(--note-color-bg); + border-left: 8px solid var(--note-color-hl); + color: var(--note-color-text); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-hl); +} + +dl.todo { + background: var(--todo-color-bg); + border-left: 8px solid var(--todo-color-hl); + color: var(--todo-color-text); +} + +dl.todo dt { + color: var(--todo-color-hl); +} + +dl.test { + background: var(--test-color-bg); + border-left: 8px solid var(--test-color-hl); + color: var(--test-color-text); +} + +dl.test dt { + color: var(--test-color-hl); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.bug { + background: var(--bug-color-bg); + border-left: 8px solid var(--bug-color-hl); + color: var(--bug-color-text); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.deprecated { + background: var(--deprecated-color-bg); + border-left: 8px solid var(--deprecated-color-hl); + color: var(--deprecated-color-text); +} + +dl.deprecated dt a { + color: var(--deprecated-color-hl) !important; +} + +dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, +dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, +dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color-bg); + border-left: 8px solid var(--invariant-color-hl); + color: var(--invariant-color-text); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-hl); +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font-size: 200%; + font-family: var(--font-family-title); + margin: 0px; + padding: 2px 0px; +} + +#side-nav #projectname +{ + font-size: 130%; +} + +#projectbrief +{ + font-size: 90%; + font-family: var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font-size: 50%; + font-family: 50% var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:var(--citation-label-color); + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li[class^='level'] { + margin-left: 15px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.empty { + background-image: none; + margin-top: 0px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.inherit_header { + font-weight: bold; + color: var(--inherit-header-color); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + border: 1px solid var(--tooltip-border-color); + border-radius: 4px 4px 4px 4px; + box-shadow: var(--tooltip-shadow); + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: var(--tooltip-doc-color); + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip a { + color: var(--tooltip-link-color); +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: var(--tooltip-declaration-color); +} + +#powerTip div { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +tt, code, kbd +{ + display: inline-block; +} +tt, code, kbd +{ + vertical-align: top; +} +/* @end */ + +u { + text-decoration: underline; +} + +details>summary { + list-style-type: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; +} + +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; +} + +body { + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +} + +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 12px; + width: 12px; +} +::-webkit-scrollbar-thumb { + border-radius: 6px; + box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); + border: solid 2px transparent; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); +} + diff --git a/docs/doxygen/html/doxygen.svg b/docs/doxygen/html/doxygen.svg new file mode 100644 index 0000000..79a7635 --- /dev/null +++ b/docs/doxygen/html/doxygen.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/doxygen_crawl.html b/docs/doxygen/html/doxygen_crawl.html new file mode 100644 index 0000000..603b7cf --- /dev/null +++ b/docs/doxygen/html/doxygen_crawl.html @@ -0,0 +1,237 @@ + + + +Validator / crawler helper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/dynsections.js b/docs/doxygen/html/dynsections.js new file mode 100644 index 0000000..b05f4c8 --- /dev/null +++ b/docs/doxygen/html/dynsections.js @@ -0,0 +1,198 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function toggleVisibility(linkObj) { + return dynsection.toggleVisibility(linkObj); +} + +let dynsection = { + + // helper function + updateStripes : function() { + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); + }, + + toggleVisibility : function(linkObj) { + const base = $(linkObj).attr('id'); + const summary = $('#'+base+'-summary'); + const content = $('#'+base+'-content'); + const trigger = $('#'+base+'-trigger'); + const src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; + }, + + toggleLevel : function(level) { + $('table.directory tr').each(function() { + const l = this.id.split('_').length-1; + const i = $('#img'+this.id.substring(3)); + const a = $('#arr'+this.id.substring(3)); + if (l'); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + const id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + const start = $(this).attr('data-start'); + const end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + const line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); + }, +}; +/* @license-end */ diff --git a/docs/doxygen/html/files.html b/docs/doxygen/html/files.html new file mode 100644 index 0000000..5247e7a --- /dev/null +++ b/docs/doxygen/html/files.html @@ -0,0 +1,148 @@ + + + + + + + +My Project: File List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
File List
+
+ +
+ + + + diff --git a/docs/doxygen/html/files_dup.js b/docs/doxygen/html/files_dup.js new file mode 100644 index 0000000..0492113 --- /dev/null +++ b/docs/doxygen/html/files_dup.js @@ -0,0 +1,5 @@ +var files_dup = +[ + [ "client", "dir_db3a54907829b36871118d03417739cd.html", "dir_db3a54907829b36871118d03417739cd" ], + [ "server", "dir_41e1742e44e2de38b3bc91f993fed282.html", "dir_41e1742e44e2de38b3bc91f993fed282" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/folderclosed.svg b/docs/doxygen/html/folderclosed.svg new file mode 100644 index 0000000..b04bed2 --- /dev/null +++ b/docs/doxygen/html/folderclosed.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/docs/doxygen/html/folderclosedd.svg b/docs/doxygen/html/folderclosedd.svg new file mode 100644 index 0000000..52f0166 --- /dev/null +++ b/docs/doxygen/html/folderclosedd.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/docs/doxygen/html/folderopen.svg b/docs/doxygen/html/folderopen.svg new file mode 100644 index 0000000..f6896dd --- /dev/null +++ b/docs/doxygen/html/folderopen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/docs/doxygen/html/folderopend.svg b/docs/doxygen/html/folderopend.svg new file mode 100644 index 0000000..2d1f06e --- /dev/null +++ b/docs/doxygen/html/folderopend.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/docs/doxygen/html/func2serv_8cpp.html b/docs/doxygen/html/func2serv_8cpp.html new file mode 100644 index 0000000..dd6e3e7 --- /dev/null +++ b/docs/doxygen/html/func2serv_8cpp.html @@ -0,0 +1,980 @@ + + + + + + + +My Project: server/func2serv.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
func2serv.cpp File Reference
+
+
+
#include "func2serv.h"
+#include <QString>
+#include <QStringList>
+#include <QMap>
+#include <QDebug>
+#include <databasesingleton.h>
+#include <QJsonArray>
+#include <QJsonObject>
+#include <QJsonDocument>
+
+Include dependency graph for func2serv.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

QByteArray parsing (QString input, int socdes)
 Парсинг входных данных.
 
QByteArray auth (QStringList log)
 Авторизация пользователя.
 
QByteArray reg (QStringList params)
 Регистрация пользователя.
 
QByteArray add_product (QStringList params)
 Добавление продукта.
 
QByteArray get_stat ()
 Получение статистики.
 
QByteArray check_task ()
 Проверка задания.
 
QByteArray menu_export ()
 Экспорт меню.
 
void fetch_products_from_db (const QString &userId, QStringList &products)
 
QByteArray get_products (QString userId)
 Получение списка продуктов.
 
QByteArray get_all_users ()
 Получение всех пользователей.
 
int get_user_count ()
 Получение количества пользователей.
 
int get_product_count ()
 Получение количества продуктов.
 
QByteArray get_stable_stat ()
 Получение стабильной статистики.
 
int get_weekly_logins ()
 Получение количества входов за неделю.
 
int get_monthly_logins ()
 Получение количества входов за месяц.
 
QByteArray get_dynamic_stat ()
 Получение динамической статистики.
 
QByteArray add_favorite_ration (const QStringList &container)
 Добавление рациона в избранное.
 
bool add_ration_to_favorites (const QString &userId, const QString &rationId)
 Добавление рациона в избранное для пользователя.
 
+ + + +

+Variables

QMap< QString, QList< QString > > mockDatabase
 
+

Function Documentation

+ +

◆ add_favorite_ration()

+ +
+
+ + + + + + + +
QByteArray add_favorite_ration (const QStringList & container)
+
+ +

Добавление рациона в избранное.

+
Parameters
+ + +
containerСписок данных.
+
+
+
Returns
Результат добавления в избранное в виде QByteArray.
+
293 {
+
294 QString userId = container[1]; // ID пользователя
+
295 QString rationId = container[2]; // ID рациона
+
296
+
297 bool success = add_ration_to_favorites(userId, rationId); // Вызов функции-заглушки
+
298
+
299 if (success) {
+
300 return "Ration successfully added to favorites\r\n";
+
301 } else {
+
302 return "Error: failed to add ration to favorites\r\n";
+
303 }
+
304}
+
bool add_ration_to_favorites(const QString &userId, const QString &rationId)
Добавление рациона в избранное для пользователя.
Definition func2serv.cpp:305
+
+
+
+ +

◆ add_product()

+ +
+
+ + + + + + + +
QByteArray add_product (QStringList params)
+
+ +

Добавление продукта.

+
Parameters
+ + +
Входнойсписок данных.
+
+
+
Returns
Результат добавления продукта в виде QByteArray.
+
165 {
+
166 if (params.size() != 9) {
+
167 return "add_product//failed//Неверные аргументы\r\n";
+
168 }
+
169
+ +
171 int userId = params[1].toInt();
+
172 QString name = params[2];
+
173/*
+
174 // Проверяем, существует ли уже такой продукт
+
175 QSqlQuery checkQuery = db->executeQuery(
+
176 "SELECT id FROM products WHERE id_user = :id_user AND name = :name",
+
177 {{":id_user", userId}, {":name", name}}
+
178 );
+
179
+
180 if (checkQuery.next()) {
+
181 return "add_product//failed//Продукт уже существует\r\n";
+
182 }
+
183*/
+
184 // Добавляем продукт
+
185 bool success = db->addProduct(
+
186 userId,
+
187 name,
+
188 params[3].toInt(), // proteins
+
189 params[4].toInt(), // fatness
+
190 params[5].toInt(), // carbs
+
191 params[6].toInt(), // weight
+
192 params[7].toInt(), // cost
+
193 params[8].toInt() // type
+
194 );
+
195
+
196 return success ? "add_product//success\r\n" : "add_product//failed//Ошибка БД\r\n";
+
197}
+
Класс для работы с базой данных.
Definition databasesingleton.h:43
+
bool addProduct(int userId, const QString &name, int proteins, int fatness, int carbs, int weight, int cost, int type)
Добавление продукта в базу данных.
Definition databasesingleton.cpp:114
+
static DataBaseSingleton * getInstance()
Получение единственного экземпляра Singleton.
Definition databasesingleton.cpp:10
+
+
+
+ +

◆ add_ration_to_favorites()

+ +
+
+ + + + + + + + + + + +
bool add_ration_to_favorites (const QString & userId,
const QString & rationId )
+
+ +

Добавление рациона в избранное для пользователя.

+

Добавление существующего рациона в избранное.

+
Parameters
+ + + +
userIdИдентификатор пользователя.
rationIdИдентификатор рациона.
+
+
+
Returns
Результат добавления в избранное.
+
305 {
+
306 qDebug() << "Adding ration for user:" << userId << ", ration ID:" << rationId;
+
307 return true; // Заглушка, потом заменить на SQL-запрос
+
308}
+
+
+
+ +

◆ auth()

+ +
+
+ + + + + + + +
QByteArray auth (QStringList log)
+
+ +

Авторизация пользователя.

+
Parameters
+ + +
Входнойсписок данных.
+
+
+
Returns
Результат авторизации в виде QByteArray.
+
77 {
+
78 // Проверяем количество параметров
+
79 if (log.size() < 3) {
+
80 return "auth_failed//Недостаточно параметров для авторизации\r\n";
+
81 }
+
82
+ +
84 bool authSuccess = db->checkUserCredentials(log[1], log[2]);
+
85
+
86 if (!authSuccess) {
+
87 return "auth_failed//Неверный логин или пароль\r\n";
+
88 }
+
89
+
90
+
91
+
92 QSqlQuery query = db->executeQuery(
+
93 "SELECT id, name, email, pass FROM users WHERE (email = :login OR name = :login) AND pass = :pass",
+
94 {
+
95 {":login", log[1]}, // логин
+
96 {":pass", log[2]} // пароль
+
97 }
+
98 );
+
99
+
100
+
101 if (!query.next()) {
+
102 return "auth_failed//Ошибка при получении данных пользователя\r\n";
+
103 }
+
104
+
105 QString userId = query.value("id").toString();
+
106 QString userLogin = query.value("name").toString();
+
107 QString userEmail = query.value("email").toString();
+
108
+
109 QString response = QString("auth_success//%1//%2//%3\r\n")
+
110 .arg(userId)
+
111 .arg(userLogin)
+
112 .arg(userEmail);
+
113
+
114 return response.toUtf8();
+
115}
+
QSqlQuery executeQuery(const QString &query, const QVariantMap &params=QVariantMap())
Выполнение SQL-запроса с параметрами.
Definition databasesingleton.cpp:78
+
bool checkUserCredentials(const QString &login, const QString &password)
Проверка учетных данных пользователя.
Definition databasesingleton.cpp:92
+
+
+
+ +

◆ check_task()

+ +
+
+ + + + + + + +
QByteArray check_task ()
+
+ +

Проверка задания.

+

Проверка задачи (рациона).

+
Returns
Результат проверки задания в виде QByteArray.
+
203 {
+
204 return "Task was succesful completed\r\n";
+
205}
+
+
+
+ +

◆ fetch_products_from_db()

+ +
+
+ + + + + + + + + + + +
void fetch_products_from_db (const QString & userId,
QStringList & products )
+
+
210 {
+
211
+
212 if (mockDatabase.contains(userId)) {
+
213 products = mockDatabase[userId];
+
214 }
+
215}
+
QMap< QString, QList< QString > > mockDatabase
Definition func2serv.cpp:12
+
+
+
+ +

◆ get_all_users()

+ +
+
+ + + + + + + +
QByteArray get_all_users ()
+
+ +

Получение всех пользователей.

+

Получение списка всех пользователей.

+
Returns
Список всех пользователей в виде QByteArray.
+
235 {
+
236 QStringList users;
+
237
+
238 // fetch_users_from_db(users);
+
239
+
240 QString response;
+
241 for (const QString& user : users) {
+
242 response += user + "\r\n";
+
243 }
+
244
+
245 return response.toUtf8();
+
246}
+
+
+
+ +

◆ get_dynamic_stat()

+ +
+
+ + + + + + + +
QByteArray get_dynamic_stat ()
+
+ +

Получение динамической статистики.

+
Returns
Динамическая статистика в виде QByteArray.
+
279 {
+
280 int weeklyLogins = 0;
+
281 int monthlyLogins = 0;
+
282
+
283 // Получаем данные из БД (пока заглушки)
+
284 weeklyLogins = get_weekly_logins();
+
285 monthlyLogins = get_monthly_logins();
+
286
+
287 // Формируем строку ответа
+
288 QString response = "Logins per week: " + QString::number(weeklyLogins) + "\r\n" +
+
289 "Logins per month: " + QString::number(monthlyLogins) + "\r\n";
+
290
+
291 return response.toUtf8();
+
292}
+
int get_monthly_logins()
Получение количества входов за месяц.
Definition func2serv.cpp:275
+
int get_weekly_logins()
Получение количества входов за неделю.
Definition func2serv.cpp:270
+
+
+
+ +

◆ get_monthly_logins()

+ +
+
+ + + + + + + +
int get_monthly_logins ()
+
+ +

Получение количества входов за месяц.

+
Returns
Количество входов за месяц.
+
275 {
+
276 // Заглушка, пока без БД
+
277 return 312; // Примерное значение
+
278}
+
+
+
+ +

◆ get_product_count()

+ +
+
+ + + + + + + +
int get_product_count ()
+
+ +

Получение количества продуктов.

+

Получение общего количества продуктов.

+
Returns
Количество продуктов.
+
252 {
+
253 // Здесь будет SQL-запрос, пока заглушка
+
254 return 732; // Примерное значение
+
255}
+
+
+
+ +

◆ get_products()

+ +
+
+ + + + + + + +
QByteArray get_products (QString UserId)
+
+ +

Получение списка продуктов.

+

Получение всех продуктов пользователя.

+
Parameters
+ + +
UserIdИдентификатор пользователя.
+
+
+
Returns
Список продуктов в виде QByteArray.
+
216 {
+ +
218 int userIdInt = userId.toInt();
+
219 QVector<QVariantMap> products = db->getProductsByUser(userIdInt);
+
220
+
221 QJsonArray jsonArray;
+
222 for (const QVariantMap& product : products) {
+
223 QJsonObject obj = QJsonObject::fromVariantMap(product);
+
224 jsonArray.append(obj);
+
225 }
+
226
+
227 QJsonDocument doc(jsonArray);
+
228 QByteArray jsonBytes = doc.toJson(QJsonDocument::Compact);
+
229
+
230 qDebug() << "Отправляем продукты в виде JSON:" << jsonBytes;
+
231
+
232 return jsonBytes;
+
233}
+
QVector< QVariantMap > getProductsByUser(int userId)
Получение продуктов для конкретного пользователя.
Definition databasesingleton.cpp:132
+
+
+
+ +

◆ get_stable_stat()

+ +
+
+ + + + + + + +
QByteArray get_stable_stat ()
+
+ +

Получение стабильной статистики.

+
Returns
Стабильная статистика в виде QByteArray.
+
256 {
+
257
+
258 int userCount = 0;
+
259 int productCount = 0;
+
260
+
261 userCount = get_user_count();
+
262 productCount = get_product_count();
+
263
+
264 // Формируем строку ответа
+
265 QString response = "Users: " + QString::number(userCount) + "\r\n" +
+
266 "Products: " + QString::number(productCount) + "\r\n";
+
267
+
268 return response.toUtf8();
+
269}
+
int get_product_count()
Получение количества продуктов.
Definition func2serv.cpp:252
+
int get_user_count()
Получение количества пользователей.
Definition func2serv.cpp:247
+
+
+
+ +

◆ get_stat()

+ +
+
+ + + + + + + +
QByteArray get_stat ()
+
+ +

Получение статистики.

+
Returns
Статистика в виде QByteArray.
+
199 {
+
200 return "Your Statistic: null\r\n";
+
201}
+
+
+
+ +

◆ get_user_count()

+ +
+
+ + + + + + + +
int get_user_count ()
+
+ +

Получение количества пользователей.

+

Получение общего количества пользователей.

+
Returns
Количество пользователей.
+
247 {
+
248 // Здесь будет SQL-запрос, пока заглушка
+
249 return 152; // Примерное значение
+
250}
+
+
+
+ +

◆ get_weekly_logins()

+ +
+
+ + + + + + + +
int get_weekly_logins ()
+
+ +

Получение количества входов за неделю.

+
Returns
Количество входов за неделю.
+
270 {
+
271 // Заглушка, пока без БД
+
272 return 78; // Примерное значение
+
273}
+
+
+
+ +

◆ menu_export()

+ +
+
+ + + + + + + +
QByteArray menu_export ()
+
+ +

Экспорт меню.

+
Returns
Результат экспорта меню в виде QByteArray.
+
206 {
+
207 return "Меню успешно экспортировано!\r\n";
+
208}
+
+
+
+ +

◆ parsing()

+ +
+
+ + + + + + + + + + + +
QByteArray parsing (QString input,
int socdes )
+
+ +

Парсинг входных данных.

+
Parameters
+ + + +
inputВходная строка.
socdesДескриптор сокета.
+
+
+
Returns
Обработанная строка данных.
+
19{
+
20
+
21 QStringList container = input.remove("\r\n").split("//"); //пример входящих данных reg//login_user//password_user
+
22
+
23 if (container.isEmpty()) {
+
24 return "server error: empty command\\n";
+
25 }
+
26
+
27
+
28 qDebug() << socdes << " user command: " << container[0];
+
29 QString var = container[0];
+
30 if (var == "check_task")
+
31 {
+
32 return check_task();
+
33 }
+
34 else if (var =="auth")
+
35 {
+
36 return auth(container);
+
37 }
+
38 else if (var == "add_product")
+
39 {
+
40 return add_product(container);
+
41 }
+
42 else if (var == "user" && container[2] == "get_products") {
+
43 return get_products(container[1]);
+
44 }
+
45 else if (var =="reg")
+
46 {
+
47 return reg(container);
+
48 }
+
49 else if (var == "get_stat")
+
50 {
+
51 return(get_stat());
+
52 }
+
53 else if (var == "admin" && container[1] == "dynamic_stat") {
+
54 return get_dynamic_stat();
+
55 }
+
56 else if (var == "menu_export")
+
57 {
+
58 return menu_export();
+
59 }
+
60 else if (var == "user" && container[2] == "add_favorite_ration") {
+
61 return add_favorite_ration(container);
+
62 }
+
63 else if (var == "admin" && container[1] == "get_all_users") {
+
64 return get_all_users();
+
65 }
+
66 else if (var == "admin" && container[1] == "stable_stat") {
+
67 return get_stable_stat();
+
68 }
+
69 else
+
70 {
+
71 return "server error: unknow command\r\n";
+
72 }
+
73}
+
QByteArray get_stat()
Получение статистики.
Definition func2serv.cpp:199
+
QByteArray auth(QStringList log)
Авторизация пользователя.
Definition func2serv.cpp:77
+
QByteArray add_product(QStringList params)
Добавление продукта.
Definition func2serv.cpp:165
+
QByteArray get_stable_stat()
Получение стабильной статистики.
Definition func2serv.cpp:256
+
QByteArray add_favorite_ration(const QStringList &container)
Добавление рациона в избранное.
Definition func2serv.cpp:293
+
QByteArray check_task()
Проверка задания.
Definition func2serv.cpp:203
+
QByteArray get_products(QString userId)
Получение списка продуктов.
Definition func2serv.cpp:216
+
QByteArray get_dynamic_stat()
Получение динамической статистики.
Definition func2serv.cpp:279
+
QByteArray menu_export()
Экспорт меню.
Definition func2serv.cpp:206
+
QByteArray get_all_users()
Получение всех пользователей.
Definition func2serv.cpp:235
+
QByteArray reg(QStringList params)
Регистрация пользователя.
Definition func2serv.cpp:118
+
+
+
+ +

◆ reg()

+ +
+
+ + + + + + + +
QByteArray reg (QStringList params)
+
+ +

Регистрация пользователя.

+
Parameters
+ + +
Входнойсписок данных.
+
+
+
Returns
Результат регистрации в виде QByteArray.
+
118 {
+
119 // 1️⃣ Проверка количества параметров
+
120 if (params.size() != 4) {
+
121 return "reg_failed//Недостаточно параметров для регистрации\r\n";
+
122 }
+
123
+
124 // 2️⃣ Извлечение данных из запроса
+
125 QString name = params[1]; // Имя пользователя
+
126 QString email = params[2]; // Email (должен быть уникальным)
+
127 QString password = params[3]; // Пароль
+
128
+ +
130
+
131 // 3️⃣ Проверка, не занят ли email
+
132 QSqlQuery checkQuery = db->executeQuery(
+
133 "SELECT id FROM users WHERE email = :email",
+
134 {{":email", email}}
+
135 );
+
136
+
137 // Если запрос не выполнился (ошибка БД)
+
138 if (!checkQuery.exec()) {
+
139 return "reg_failed//Ошибка при проверке email\r\n";
+
140 }
+
141
+
142 // Если email уже существует (найдена запись)
+
143 if (checkQuery.next()) {
+
144 return "reg_failed//Пользователь с таким email уже зарегистрирован\r\n";
+
145 }
+
146
+
147 // 4️⃣ Попытка добавить пользователя
+
148 bool success = db->addUser(name, email, password, false);
+
149
+
150 if (success) {
+
151 // 5️⃣ Обновление статистики (увеличиваем счетчик регистраций)
+
152 QVariantMap stats = db->getStatistics();
+ +
154 stats["registrations"].toInt() + 1, // +1 новая регистрация
+
155 stats["visits"].toInt(), // Визиты без изменений
+
156 stats["generations"].toInt() // Генерации без изменений
+
157 );
+
158 return "reg_success//Регистрация прошла успешно\r\n";
+
159 } else {
+
160 // Если INSERT не сработал (например, из-за UNIQUE INDEX)
+
161 return "reg_failed//Ошибка при регистрации (возможно, email уже занят)\r\n";
+
162 }
+
163}
+
QVariantMap getStatistics()
Получение статистики.
Definition databasesingleton.cpp:199
+
bool updateStatistics(int registrations, int visits, int generations)
Обновление статистики.
Definition databasesingleton.cpp:191
+
bool addUser(const QString &name, const QString &email, const QString &password, bool isAdmin=false)
Добавление нового пользователя в базу данных.
Definition databasesingleton.cpp:100
+
+
+
+

Variable Documentation

+ +

◆ mockDatabase

+ +
+
+ + + + +
QMap<QString, QList<QString> > mockDatabase
+
+Initial value:
= {
+
{"1", {"orange_11_45_12_24", "banana_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24"}},
+
{"2", {"apple_11_45_12_24", "grape_11_45_12_24"}}
+
}
+
12 {
+
13 {"1", {"orange_11_45_12_24", "banana_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24"}},
+
14 {"2", {"apple_11_45_12_24", "grape_11_45_12_24"}}
+
15 };
+
+
+
+
+
+ + + + diff --git a/docs/doxygen/html/func2serv_8cpp.js b/docs/doxygen/html/func2serv_8cpp.js new file mode 100644 index 0000000..09ac7db --- /dev/null +++ b/docs/doxygen/html/func2serv_8cpp.js @@ -0,0 +1,22 @@ +var func2serv_8cpp = +[ + [ "add_favorite_ration", "func2serv_8cpp.html#a6496e445a644cca89c6252f6e7adecb0", null ], + [ "add_product", "func2serv_8cpp.html#a27ffe3af29c8442de4aa94a5e48d2345", null ], + [ "add_ration_to_favorites", "func2serv_8cpp.html#a064e99d59eaa1d8cccef20b3192df015", null ], + [ "auth", "func2serv_8cpp.html#a173db167f59671d56b49f5d7d11ef531", null ], + [ "check_task", "func2serv_8cpp.html#a6d4386c36a7ed61c61cf3d1bad354f27", null ], + [ "fetch_products_from_db", "func2serv_8cpp.html#af1b6a57c9eed96cee280cce58342bed5", null ], + [ "get_all_users", "func2serv_8cpp.html#ab8bda875989629df9b683e881296b32d", null ], + [ "get_dynamic_stat", "func2serv_8cpp.html#a8a2ae0ff8263d70f4e0f30d6b0d89af7", null ], + [ "get_monthly_logins", "func2serv_8cpp.html#a2d6f70d14e474616a4a16a72485c2f0e", null ], + [ "get_product_count", "func2serv_8cpp.html#a4ddd067c5a29f76aead93c977a05113a", null ], + [ "get_products", "func2serv_8cpp.html#a73b3ae758a8cf3621318d27cd1a17722", null ], + [ "get_stable_stat", "func2serv_8cpp.html#a2d521723770cde0e28bb41544394917b", null ], + [ "get_stat", "func2serv_8cpp.html#a0a88fbccc63c8cc890ded3a20fb71e72", null ], + [ "get_user_count", "func2serv_8cpp.html#a8ebcc70a2024aab70883f094fc35849e", null ], + [ "get_weekly_logins", "func2serv_8cpp.html#a4d269e13002c5cded37bee9ade854d93", null ], + [ "menu_export", "func2serv_8cpp.html#aa70831eddff4b8ed7a04647778a35747", null ], + [ "parsing", "func2serv_8cpp.html#a99bd96103155e73697cc47518a5559a4", null ], + [ "reg", "func2serv_8cpp.html#ac87f1fa2fd8c6ee1a48c3a56a99b3275", null ], + [ "mockDatabase", "func2serv_8cpp.html#aa13aef29ff8f58936aa8f2bd99f70253", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/func2serv_8cpp__incl.dot b/docs/doxygen/html/func2serv_8cpp__incl.dot new file mode 100644 index 0000000..3e553f3 --- /dev/null +++ b/docs/doxygen/html/func2serv_8cpp__incl.dot @@ -0,0 +1,40 @@ +digraph "server/func2serv.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/func2serv.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="func2serv.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$func2serv_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge6_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge7_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node8 [id="edge8_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="databasesingleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8h.html",tooltip=" "]; + Node8 -> Node9 [id="edge9_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node10 [id="edge10_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node11 [id="edge11_Node000008_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node4 [id="edge12_Node000008_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node8 -> Node12 [id="edge13_Node000008_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node13 [id="edge14_Node000008_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node14 [id="edge15_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QJsonArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node15 [id="edge16_Node000001_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QJsonObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node16 [id="edge17_Node000001_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QJsonDocument",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/func2serv_8cpp__incl.map b/docs/doxygen/html/func2serv_8cpp__incl.map new file mode 100644 index 0000000..73a3ae2 --- /dev/null +++ b/docs/doxygen/html/func2serv_8cpp__incl.map @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/func2serv_8cpp__incl.md5 b/docs/doxygen/html/func2serv_8cpp__incl.md5 new file mode 100644 index 0000000..f59a1ea --- /dev/null +++ b/docs/doxygen/html/func2serv_8cpp__incl.md5 @@ -0,0 +1 @@ +e5514a775297da7fa7a4d34d7f819be3 \ No newline at end of file diff --git a/docs/doxygen/html/func2serv_8cpp__incl.png b/docs/doxygen/html/func2serv_8cpp__incl.png new file mode 100644 index 0000000..94ac8c8 Binary files /dev/null and b/docs/doxygen/html/func2serv_8cpp__incl.png differ diff --git a/docs/doxygen/html/func2serv_8h.html b/docs/doxygen/html/func2serv_8h.html new file mode 100644 index 0000000..bcb8cc4 --- /dev/null +++ b/docs/doxygen/html/func2serv_8h.html @@ -0,0 +1,894 @@ + + + + + + + +My Project: server/func2serv.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
func2serv.h File Reference
+
+
+
#include <QByteArray>
+#include <QDebug>
+
+Include dependency graph for func2serv.h:
+
+
+ + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + +
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

QByteArray parsing (QString input, int socdes)
 Парсинг входных данных.
 
QByteArray auth (QStringList)
 Авторизация пользователя.
 
QByteArray reg (QStringList)
 Регистрация пользователя.
 
QByteArray add_product (QStringList)
 Добавление продукта.
 
QByteArray get_stat ()
 Получение статистики.
 
QByteArray check_task ()
 Проверка задания.
 
QByteArray menu_export ()
 Экспорт меню.
 
QByteArray get_products (QString UserId)
 Получение списка продуктов.
 
QByteArray get_all_users ()
 Получение всех пользователей.
 
QByteArray get_stable_stat ()
 Получение стабильной статистики.
 
int get_user_count ()
 Получение количества пользователей.
 
int get_product_count ()
 Получение количества продуктов.
 
QByteArray get_dynamic_stat ()
 Получение динамической статистики.
 
int get_weekly_logins ()
 Получение количества входов за неделю.
 
int get_monthly_logins ()
 Получение количества входов за месяц.
 
QByteArray add_favorite_ration (const QStringList &container)
 Добавление рациона в избранное.
 
bool add_ration_to_favorites (const QString &userId, const QString &rationId)
 Добавление рациона в избранное для пользователя.
 
+

Function Documentation

+ +

◆ add_favorite_ration()

+ +
+
+ + + + + + + +
QByteArray add_favorite_ration (const QStringList & container)
+
+ +

Добавление рациона в избранное.

+
Parameters
+ + +
containerСписок данных.
+
+
+
Returns
Результат добавления в избранное в виде QByteArray.
+
293 {
+
294 QString userId = container[1]; // ID пользователя
+
295 QString rationId = container[2]; // ID рациона
+
296
+
297 bool success = add_ration_to_favorites(userId, rationId); // Вызов функции-заглушки
+
298
+
299 if (success) {
+
300 return "Ration successfully added to favorites\r\n";
+
301 } else {
+
302 return "Error: failed to add ration to favorites\r\n";
+
303 }
+
304}
+
bool add_ration_to_favorites(const QString &userId, const QString &rationId)
Добавление рациона в избранное для пользователя.
Definition func2serv.cpp:305
+
+
+
+ +

◆ add_product()

+ +
+
+ + + + + + + +
QByteArray add_product (QStringList params)
+
+ +

Добавление продукта.

+
Parameters
+ + +
Входнойсписок данных.
+
+
+
Returns
Результат добавления продукта в виде QByteArray.
+
165 {
+
166 if (params.size() != 9) {
+
167 return "add_product//failed//Неверные аргументы\r\n";
+
168 }
+
169
+ +
171 int userId = params[1].toInt();
+
172 QString name = params[2];
+
173/*
+
174 // Проверяем, существует ли уже такой продукт
+
175 QSqlQuery checkQuery = db->executeQuery(
+
176 "SELECT id FROM products WHERE id_user = :id_user AND name = :name",
+
177 {{":id_user", userId}, {":name", name}}
+
178 );
+
179
+
180 if (checkQuery.next()) {
+
181 return "add_product//failed//Продукт уже существует\r\n";
+
182 }
+
183*/
+
184 // Добавляем продукт
+
185 bool success = db->addProduct(
+
186 userId,
+
187 name,
+
188 params[3].toInt(), // proteins
+
189 params[4].toInt(), // fatness
+
190 params[5].toInt(), // carbs
+
191 params[6].toInt(), // weight
+
192 params[7].toInt(), // cost
+
193 params[8].toInt() // type
+
194 );
+
195
+
196 return success ? "add_product//success\r\n" : "add_product//failed//Ошибка БД\r\n";
+
197}
+
Класс для работы с базой данных.
Definition databasesingleton.h:43
+
bool addProduct(int userId, const QString &name, int proteins, int fatness, int carbs, int weight, int cost, int type)
Добавление продукта в базу данных.
Definition databasesingleton.cpp:114
+
static DataBaseSingleton * getInstance()
Получение единственного экземпляра Singleton.
Definition databasesingleton.cpp:10
+
+
+
+ +

◆ add_ration_to_favorites()

+ +
+
+ + + + + + + + + + + +
bool add_ration_to_favorites (const QString & userId,
const QString & rationId )
+
+ +

Добавление рациона в избранное для пользователя.

+
Parameters
+ + + +
userIdИдентификатор пользователя.
rationIdИдентификатор рациона.
+
+
+
Returns
Результат добавления в избранное.
+
305 {
+
306 qDebug() << "Adding ration for user:" << userId << ", ration ID:" << rationId;
+
307 return true; // Заглушка, потом заменить на SQL-запрос
+
308}
+
+
+
+ +

◆ auth()

+ +
+
+ + + + + + + +
QByteArray auth (QStringList log)
+
+ +

Авторизация пользователя.

+
Parameters
+ + +
Входнойсписок данных.
+
+
+
Returns
Результат авторизации в виде QByteArray.
+
77 {
+
78 // Проверяем количество параметров
+
79 if (log.size() < 3) {
+
80 return "auth_failed//Недостаточно параметров для авторизации\r\n";
+
81 }
+
82
+ +
84 bool authSuccess = db->checkUserCredentials(log[1], log[2]);
+
85
+
86 if (!authSuccess) {
+
87 return "auth_failed//Неверный логин или пароль\r\n";
+
88 }
+
89
+
90
+
91
+
92 QSqlQuery query = db->executeQuery(
+
93 "SELECT id, name, email, pass FROM users WHERE (email = :login OR name = :login) AND pass = :pass",
+
94 {
+
95 {":login", log[1]}, // логин
+
96 {":pass", log[2]} // пароль
+
97 }
+
98 );
+
99
+
100
+
101 if (!query.next()) {
+
102 return "auth_failed//Ошибка при получении данных пользователя\r\n";
+
103 }
+
104
+
105 QString userId = query.value("id").toString();
+
106 QString userLogin = query.value("name").toString();
+
107 QString userEmail = query.value("email").toString();
+
108
+
109 QString response = QString("auth_success//%1//%2//%3\r\n")
+
110 .arg(userId)
+
111 .arg(userLogin)
+
112 .arg(userEmail);
+
113
+
114 return response.toUtf8();
+
115}
+
QSqlQuery executeQuery(const QString &query, const QVariantMap &params=QVariantMap())
Выполнение SQL-запроса с параметрами.
Definition databasesingleton.cpp:78
+
bool checkUserCredentials(const QString &login, const QString &password)
Проверка учетных данных пользователя.
Definition databasesingleton.cpp:92
+
+
+
+ +

◆ check_task()

+ +
+
+ + + + + + + +
QByteArray check_task ()
+
+ +

Проверка задания.

+
Returns
Результат проверки задания в виде QByteArray.
+
203 {
+
204 return "Task was succesful completed\r\n";
+
205}
+
+
+
+ +

◆ get_all_users()

+ +
+
+ + + + + + + +
QByteArray get_all_users ()
+
+ +

Получение всех пользователей.

+
Returns
Список всех пользователей в виде QByteArray.
+
235 {
+
236 QStringList users;
+
237
+
238 // fetch_users_from_db(users);
+
239
+
240 QString response;
+
241 for (const QString& user : users) {
+
242 response += user + "\r\n";
+
243 }
+
244
+
245 return response.toUtf8();
+
246}
+
+
+
+ +

◆ get_dynamic_stat()

+ +
+
+ + + + + + + +
QByteArray get_dynamic_stat ()
+
+ +

Получение динамической статистики.

+
Returns
Динамическая статистика в виде QByteArray.
+
279 {
+
280 int weeklyLogins = 0;
+
281 int monthlyLogins = 0;
+
282
+
283 // Получаем данные из БД (пока заглушки)
+
284 weeklyLogins = get_weekly_logins();
+
285 monthlyLogins = get_monthly_logins();
+
286
+
287 // Формируем строку ответа
+
288 QString response = "Logins per week: " + QString::number(weeklyLogins) + "\r\n" +
+
289 "Logins per month: " + QString::number(monthlyLogins) + "\r\n";
+
290
+
291 return response.toUtf8();
+
292}
+
int get_monthly_logins()
Получение количества входов за месяц.
Definition func2serv.cpp:275
+
int get_weekly_logins()
Получение количества входов за неделю.
Definition func2serv.cpp:270
+
+
+
+ +

◆ get_monthly_logins()

+ +
+
+ + + + + + + +
int get_monthly_logins ()
+
+ +

Получение количества входов за месяц.

+
Returns
Количество входов за месяц.
+
275 {
+
276 // Заглушка, пока без БД
+
277 return 312; // Примерное значение
+
278}
+
+
+
+ +

◆ get_product_count()

+ +
+
+ + + + + + + +
int get_product_count ()
+
+ +

Получение количества продуктов.

+
Returns
Количество продуктов.
+
252 {
+
253 // Здесь будет SQL-запрос, пока заглушка
+
254 return 732; // Примерное значение
+
255}
+
+
+
+ +

◆ get_products()

+ +
+
+ + + + + + + +
QByteArray get_products (QString UserId)
+
+ +

Получение списка продуктов.

+
Parameters
+ + +
UserIdИдентификатор пользователя.
+
+
+
Returns
Список продуктов в виде QByteArray.
+
216 {
+ +
218 int userIdInt = userId.toInt();
+
219 QVector<QVariantMap> products = db->getProductsByUser(userIdInt);
+
220
+
221 QJsonArray jsonArray;
+
222 for (const QVariantMap& product : products) {
+
223 QJsonObject obj = QJsonObject::fromVariantMap(product);
+
224 jsonArray.append(obj);
+
225 }
+
226
+
227 QJsonDocument doc(jsonArray);
+
228 QByteArray jsonBytes = doc.toJson(QJsonDocument::Compact);
+
229
+
230 qDebug() << "Отправляем продукты в виде JSON:" << jsonBytes;
+
231
+
232 return jsonBytes;
+
233}
+
QVector< QVariantMap > getProductsByUser(int userId)
Получение продуктов для конкретного пользователя.
Definition databasesingleton.cpp:132
+
+
+
+ +

◆ get_stable_stat()

+ +
+
+ + + + + + + +
QByteArray get_stable_stat ()
+
+ +

Получение стабильной статистики.

+
Returns
Стабильная статистика в виде QByteArray.
+
256 {
+
257
+
258 int userCount = 0;
+
259 int productCount = 0;
+
260
+
261 userCount = get_user_count();
+
262 productCount = get_product_count();
+
263
+
264 // Формируем строку ответа
+
265 QString response = "Users: " + QString::number(userCount) + "\r\n" +
+
266 "Products: " + QString::number(productCount) + "\r\n";
+
267
+
268 return response.toUtf8();
+
269}
+
int get_product_count()
Получение количества продуктов.
Definition func2serv.cpp:252
+
int get_user_count()
Получение количества пользователей.
Definition func2serv.cpp:247
+
+
+
+ +

◆ get_stat()

+ +
+
+ + + + + + + +
QByteArray get_stat ()
+
+ +

Получение статистики.

+
Returns
Статистика в виде QByteArray.
+
199 {
+
200 return "Your Statistic: null\r\n";
+
201}
+
+
+
+ +

◆ get_user_count()

+ +
+
+ + + + + + + +
int get_user_count ()
+
+ +

Получение количества пользователей.

+
Returns
Количество пользователей.
+
247 {
+
248 // Здесь будет SQL-запрос, пока заглушка
+
249 return 152; // Примерное значение
+
250}
+
+
+
+ +

◆ get_weekly_logins()

+ +
+
+ + + + + + + +
int get_weekly_logins ()
+
+ +

Получение количества входов за неделю.

+
Returns
Количество входов за неделю.
+
270 {
+
271 // Заглушка, пока без БД
+
272 return 78; // Примерное значение
+
273}
+
+
+
+ +

◆ menu_export()

+ +
+
+ + + + + + + +
QByteArray menu_export ()
+
+ +

Экспорт меню.

+
Returns
Результат экспорта меню в виде QByteArray.
+
206 {
+
207 return "Меню успешно экспортировано!\r\n";
+
208}
+
+
+
+ +

◆ parsing()

+ +
+
+ + + + + + + + + + + +
QByteArray parsing (QString input,
int socdes )
+
+ +

Парсинг входных данных.

+
Parameters
+ + + +
inputВходная строка.
socdesДескриптор сокета.
+
+
+
Returns
Обработанная строка данных.
+
19{
+
20
+
21 QStringList container = input.remove("\r\n").split("//"); //пример входящих данных reg//login_user//password_user
+
22
+
23 if (container.isEmpty()) {
+
24 return "server error: empty command\\n";
+
25 }
+
26
+
27
+
28 qDebug() << socdes << " user command: " << container[0];
+
29 QString var = container[0];
+
30 if (var == "check_task")
+
31 {
+
32 return check_task();
+
33 }
+
34 else if (var =="auth")
+
35 {
+
36 return auth(container);
+
37 }
+
38 else if (var == "add_product")
+
39 {
+
40 return add_product(container);
+
41 }
+
42 else if (var == "user" && container[2] == "get_products") {
+
43 return get_products(container[1]);
+
44 }
+
45 else if (var =="reg")
+
46 {
+
47 return reg(container);
+
48 }
+
49 else if (var == "get_stat")
+
50 {
+
51 return(get_stat());
+
52 }
+
53 else if (var == "admin" && container[1] == "dynamic_stat") {
+
54 return get_dynamic_stat();
+
55 }
+
56 else if (var == "menu_export")
+
57 {
+
58 return menu_export();
+
59 }
+
60 else if (var == "user" && container[2] == "add_favorite_ration") {
+
61 return add_favorite_ration(container);
+
62 }
+
63 else if (var == "admin" && container[1] == "get_all_users") {
+
64 return get_all_users();
+
65 }
+
66 else if (var == "admin" && container[1] == "stable_stat") {
+
67 return get_stable_stat();
+
68 }
+
69 else
+
70 {
+
71 return "server error: unknow command\r\n";
+
72 }
+
73}
+
QByteArray get_stat()
Получение статистики.
Definition func2serv.cpp:199
+
QByteArray auth(QStringList log)
Авторизация пользователя.
Definition func2serv.cpp:77
+
QByteArray add_product(QStringList params)
Добавление продукта.
Definition func2serv.cpp:165
+
QByteArray get_stable_stat()
Получение стабильной статистики.
Definition func2serv.cpp:256
+
QByteArray add_favorite_ration(const QStringList &container)
Добавление рациона в избранное.
Definition func2serv.cpp:293
+
QByteArray check_task()
Проверка задания.
Definition func2serv.cpp:203
+
QByteArray get_products(QString userId)
Получение списка продуктов.
Definition func2serv.cpp:216
+
QByteArray get_dynamic_stat()
Получение динамической статистики.
Definition func2serv.cpp:279
+
QByteArray menu_export()
Экспорт меню.
Definition func2serv.cpp:206
+
QByteArray get_all_users()
Получение всех пользователей.
Definition func2serv.cpp:235
+
QByteArray reg(QStringList params)
Регистрация пользователя.
Definition func2serv.cpp:118
+
+
+
+ +

◆ reg()

+ +
+
+ + + + + + + +
QByteArray reg (QStringList params)
+
+ +

Регистрация пользователя.

+
Parameters
+ + +
Входнойсписок данных.
+
+
+
Returns
Результат регистрации в виде QByteArray.
+
118 {
+
119 // 1️⃣ Проверка количества параметров
+
120 if (params.size() != 4) {
+
121 return "reg_failed//Недостаточно параметров для регистрации\r\n";
+
122 }
+
123
+
124 // 2️⃣ Извлечение данных из запроса
+
125 QString name = params[1]; // Имя пользователя
+
126 QString email = params[2]; // Email (должен быть уникальным)
+
127 QString password = params[3]; // Пароль
+
128
+ +
130
+
131 // 3️⃣ Проверка, не занят ли email
+
132 QSqlQuery checkQuery = db->executeQuery(
+
133 "SELECT id FROM users WHERE email = :email",
+
134 {{":email", email}}
+
135 );
+
136
+
137 // Если запрос не выполнился (ошибка БД)
+
138 if (!checkQuery.exec()) {
+
139 return "reg_failed//Ошибка при проверке email\r\n";
+
140 }
+
141
+
142 // Если email уже существует (найдена запись)
+
143 if (checkQuery.next()) {
+
144 return "reg_failed//Пользователь с таким email уже зарегистрирован\r\n";
+
145 }
+
146
+
147 // 4️⃣ Попытка добавить пользователя
+
148 bool success = db->addUser(name, email, password, false);
+
149
+
150 if (success) {
+
151 // 5️⃣ Обновление статистики (увеличиваем счетчик регистраций)
+
152 QVariantMap stats = db->getStatistics();
+ +
154 stats["registrations"].toInt() + 1, // +1 новая регистрация
+
155 stats["visits"].toInt(), // Визиты без изменений
+
156 stats["generations"].toInt() // Генерации без изменений
+
157 );
+
158 return "reg_success//Регистрация прошла успешно\r\n";
+
159 } else {
+
160 // Если INSERT не сработал (например, из-за UNIQUE INDEX)
+
161 return "reg_failed//Ошибка при регистрации (возможно, email уже занят)\r\n";
+
162 }
+
163}
+
QVariantMap getStatistics()
Получение статистики.
Definition databasesingleton.cpp:199
+
bool updateStatistics(int registrations, int visits, int generations)
Обновление статистики.
Definition databasesingleton.cpp:191
+
bool addUser(const QString &name, const QString &email, const QString &password, bool isAdmin=false)
Добавление нового пользователя в базу данных.
Definition databasesingleton.cpp:100
+
+
+
+
+
+ + + + diff --git a/docs/doxygen/html/func2serv_8h.js b/docs/doxygen/html/func2serv_8h.js new file mode 100644 index 0000000..4af3b2a --- /dev/null +++ b/docs/doxygen/html/func2serv_8h.js @@ -0,0 +1,20 @@ +var func2serv_8h = +[ + [ "add_favorite_ration", "func2serv_8h.html#a6496e445a644cca89c6252f6e7adecb0", null ], + [ "add_product", "func2serv_8h.html#aea4bc93c1f84d34a05a2c25939dcfaac", null ], + [ "add_ration_to_favorites", "func2serv_8h.html#a064e99d59eaa1d8cccef20b3192df015", null ], + [ "auth", "func2serv_8h.html#acbd6ff747a2b100b8f8da4a9b99d43c7", null ], + [ "check_task", "func2serv_8h.html#a6d4386c36a7ed61c61cf3d1bad354f27", null ], + [ "get_all_users", "func2serv_8h.html#ab8bda875989629df9b683e881296b32d", null ], + [ "get_dynamic_stat", "func2serv_8h.html#a8a2ae0ff8263d70f4e0f30d6b0d89af7", null ], + [ "get_monthly_logins", "func2serv_8h.html#a2d6f70d14e474616a4a16a72485c2f0e", null ], + [ "get_product_count", "func2serv_8h.html#a4ddd067c5a29f76aead93c977a05113a", null ], + [ "get_products", "func2serv_8h.html#ab8096a94a4e4aaa7af0852f0ffc11c99", null ], + [ "get_stable_stat", "func2serv_8h.html#a2d521723770cde0e28bb41544394917b", null ], + [ "get_stat", "func2serv_8h.html#a0a88fbccc63c8cc890ded3a20fb71e72", null ], + [ "get_user_count", "func2serv_8h.html#a8ebcc70a2024aab70883f094fc35849e", null ], + [ "get_weekly_logins", "func2serv_8h.html#a4d269e13002c5cded37bee9ade854d93", null ], + [ "menu_export", "func2serv_8h.html#aa70831eddff4b8ed7a04647778a35747", null ], + [ "parsing", "func2serv_8h.html#a99bd96103155e73697cc47518a5559a4", null ], + [ "reg", "func2serv_8h.html#a202f69a507a4e282bb2916fea170686f", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/func2serv_8h__dep__incl.dot b/docs/doxygen/html/func2serv_8h__dep__incl.dot new file mode 100644 index 0000000..b9d30e2 --- /dev/null +++ b/docs/doxygen/html/func2serv_8h__dep__incl.dot @@ -0,0 +1,12 @@ +digraph "server/func2serv.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/func2serv.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="server/func2serv.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$func2serv_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="server/mytcpserver.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/func2serv_8h__dep__incl.map b/docs/doxygen/html/func2serv_8h__dep__incl.map new file mode 100644 index 0000000..02e7751 --- /dev/null +++ b/docs/doxygen/html/func2serv_8h__dep__incl.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/doxygen/html/func2serv_8h__dep__incl.md5 b/docs/doxygen/html/func2serv_8h__dep__incl.md5 new file mode 100644 index 0000000..13ac2c1 --- /dev/null +++ b/docs/doxygen/html/func2serv_8h__dep__incl.md5 @@ -0,0 +1 @@ +933213ff78d4998926050aca5ddfb661 \ No newline at end of file diff --git a/docs/doxygen/html/func2serv_8h__dep__incl.png b/docs/doxygen/html/func2serv_8h__dep__incl.png new file mode 100644 index 0000000..e7ec2e2 Binary files /dev/null and b/docs/doxygen/html/func2serv_8h__dep__incl.png differ diff --git a/docs/doxygen/html/func2serv_8h__incl.dot b/docs/doxygen/html/func2serv_8h__incl.dot new file mode 100644 index 0000000..c62c886 --- /dev/null +++ b/docs/doxygen/html/func2serv_8h__incl.dot @@ -0,0 +1,12 @@ +digraph "server/func2serv.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/func2serv.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/func2serv_8h__incl.map b/docs/doxygen/html/func2serv_8h__incl.map new file mode 100644 index 0000000..374b426 --- /dev/null +++ b/docs/doxygen/html/func2serv_8h__incl.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/doxygen/html/func2serv_8h__incl.md5 b/docs/doxygen/html/func2serv_8h__incl.md5 new file mode 100644 index 0000000..f5b57a6 --- /dev/null +++ b/docs/doxygen/html/func2serv_8h__incl.md5 @@ -0,0 +1 @@ +2c23d8acb0845db404eb554fcb508e08 \ No newline at end of file diff --git a/docs/doxygen/html/func2serv_8h__incl.png b/docs/doxygen/html/func2serv_8h__incl.png new file mode 100644 index 0000000..680eb55 Binary files /dev/null and b/docs/doxygen/html/func2serv_8h__incl.png differ diff --git a/docs/doxygen/html/func2serv_8h_source.html b/docs/doxygen/html/func2serv_8h_source.html new file mode 100644 index 0000000..14d0683 --- /dev/null +++ b/docs/doxygen/html/func2serv_8h_source.html @@ -0,0 +1,178 @@ + + + + + + + +My Project: server/func2serv.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
func2serv.h
+
+
+Go to the documentation of this file.
1#ifndef FUNC2SERV_H
+
2#define FUNC2SERV_H
+
3
+
4#include <QByteArray>
+
5
+
12QByteArray parsing(QString input, int socdes);
+
13
+
19QByteArray auth(QStringList );
+
20
+
26QByteArray reg(QStringList);
+
27
+
33QByteArray add_product(QStringList);
+
34
+
39QByteArray get_stat(/*QStringList*/);
+
40
+
45QByteArray check_task(/*QStringList*/);
+
46
+
51QByteArray menu_export(/*QStringList*/);
+
52
+
58QByteArray get_products(QString UserId);
+
59
+
64QByteArray get_all_users();
+
65
+
70QByteArray get_stable_stat();
+
71
+
76int get_user_count();
+
77
+ +
83
+
88QByteArray get_dynamic_stat();
+
89
+ +
95
+ +
101
+
107QByteArray add_favorite_ration(const QStringList& container);
+
108
+
115bool add_ration_to_favorites(const QString& userId, const QString& rationId);
+
116
+
117#include <QDebug>
+
118
+
119#endif // FUNC2SERV_H
+
bool add_ration_to_favorites(const QString &userId, const QString &rationId)
Добавление рациона в избранное для пользователя.
Definition func2serv.cpp:305
+
QByteArray get_stat()
Получение статистики.
Definition func2serv.cpp:199
+
QByteArray reg(QStringList)
Регистрация пользователя.
Definition func2serv.cpp:118
+
QByteArray get_stable_stat()
Получение стабильной статистики.
Definition func2serv.cpp:256
+
int get_monthly_logins()
Получение количества входов за месяц.
Definition func2serv.cpp:275
+
int get_weekly_logins()
Получение количества входов за неделю.
Definition func2serv.cpp:270
+
int get_product_count()
Получение количества продуктов.
Definition func2serv.cpp:252
+
QByteArray add_favorite_ration(const QStringList &container)
Добавление рациона в избранное.
Definition func2serv.cpp:293
+
QByteArray check_task()
Проверка задания.
Definition func2serv.cpp:203
+
QByteArray get_dynamic_stat()
Получение динамической статистики.
Definition func2serv.cpp:279
+
int get_user_count()
Получение количества пользователей.
Definition func2serv.cpp:247
+
QByteArray parsing(QString input, int socdes)
Парсинг входных данных.
Definition func2serv.cpp:18
+
QByteArray menu_export()
Экспорт меню.
Definition func2serv.cpp:206
+
QByteArray get_products(QString UserId)
Получение списка продуктов.
Definition func2serv.cpp:216
+
QByteArray get_all_users()
Получение всех пользователей.
Definition func2serv.cpp:235
+
QByteArray auth(QStringList)
Авторизация пользователя.
Definition func2serv.cpp:77
+
QByteArray add_product(QStringList)
Добавление продукта.
Definition func2serv.cpp:165
+
+
+ + + + diff --git a/docs/doxygen/html/functions.html b/docs/doxygen/html/functions.html new file mode 100644 index 0000000..2513ded --- /dev/null +++ b/docs/doxygen/html/functions.html @@ -0,0 +1,245 @@ + + + + + + + +My Project: Class Members + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- s -

+ + +

- u -

+ + +

- ~ -

+
+
+ + + + diff --git a/docs/doxygen/html/functions__for__client_8cpp.html b/docs/doxygen/html/functions__for__client_8cpp.html new file mode 100644 index 0000000..0c50247 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8cpp.html @@ -0,0 +1,511 @@ + + + + + + + +My Project: client/functions_for_client.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
functions_for_client.cpp File Reference
+
+
+
#include "functions_for_client.h"
+#include "mainwindow.h"
+#include "managerforms.h"
+#include <QDebug>
+#include <QByteArray>
+#include <QStringList>
+
+Include dependency graph for functions_for_client.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +

+Functions

QString auth (QString email, QString password)
 Авторизация пользователя.
 
bool reg (QString login, QString password, QString email)
 Регистрация нового пользователя.
 
QString get_stable_stat ()
 Получение стабильной статистики.
 
QString get_dynamic_stat ()
 Получение динамической статистики.
 
QByteArray get_all_users ()
 Получение всех пользователей.
 
QByteArray get_products (QString id)
 Получение списка продуктов.
 
QByteArray add_product (QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
 Добавление нового продукта.
 
+

Function Documentation

+ +

◆ add_product()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
QByteArray add_product (QString id,
QString name,
int proteins,
int fats,
int carbs,
int weight,
int cost,
int type )
+
+ +

Добавление нового продукта.

+
Parameters
+ + + + + + + + + +
idИдентификатор пользователя.
nameНазвание продукта.
proteinsКоличество белков.
fatsКоличество жиров.
carbsКоличество углеводов.
weightВес продукта.
costСтоимость продукта.
typeТип продукта.
+
+
+
Returns
Массив байтов с результатом операции.
+
77 {
+ +
79 QStringList params = {
+
80 "add_product",
+
81 id,
+
82 name,
+
83 QString::number(proteins),
+
84 QString::number(fats),
+
85 QString::number(carbs),
+
86 QString::number(weight),
+
87 QString::number(cost),
+
88 QString::number(type)
+
89 };
+
90 QByteArray response = client.send_msg(params);
+
91 return response;
+
92}
+
Сетевой клиент, реализующий паттерн Singleton.
Definition Singleton.h:36
+
static ClientSingleton & getInstance()
Получить экземпляр Singleton.
Definition Singleton.cpp:13
+
QByteArray send_msg(QStringList list)
Отправляет сообщение серверу.
Definition Singleton.cpp:54
+
+
+
+ +

◆ auth()

+ +
+
+ + + + + + + + + + + +
QString auth (QString login,
QString password )
+
+ +

Авторизация пользователя.

+
Parameters
+ + + +
loginЛогин пользователя.
passwordПароль пользователя.
+
+
+
Returns
Ответ от сервера.
+
9 {
+
10
+ +
12
+
13 QString response = client.send_msg(QStringList{"auth", email, password});
+
14
+
15 qDebug() << "Авторизация: " << response;
+
16
+
17 return response;
+
18};
+
+
+
+ +

◆ get_all_users()

+ +
+
+ + + + + + + +
QByteArray get_all_users ()
+
+ +

Получение всех пользователей.

+

Получение списка всех пользователей.

+
Returns
Список всех пользователей в виде QByteArray.
+
56 {
+
57
+ +
59
+
60 QByteArray stat = client.send_msg(QStringList{"admin", "get_all_users"});
+
61
+
62 return stat;
+
63};
+
+
+
+ +

◆ get_dynamic_stat()

+ +
+
+ + + + + + + +
QString get_dynamic_stat ()
+
+ +

Получение динамической статистики.

+
Returns
Динамическая статистика в виде QByteArray.
+
45 {
+
46
+ +
48
+
49 QString stat = client.send_msg(QStringList{"admin", "dynamic_stat"});
+
50
+
51 return stat;
+
52
+
53};
+
+
+
+ +

◆ get_products()

+ +
+
+ + + + + + + +
QByteArray get_products (QString UserId)
+
+ +

Получение списка продуктов.

+

Получение всех продуктов пользователя.

+
Parameters
+ + +
UserIdИдентификатор пользователя.
+
+
+
Returns
Список продуктов в виде QByteArray.
+
66 {
+ +
68
+
69 QStringList params = {"user", id, "get_products"};
+
70
+
71 QByteArray response = client.send_msg(params);
+
72 qDebug() << "Сырой ответ от сервера (JSON): " << response;
+
73
+
74 return response; // <-- просто возвращаем JSON байты, пусть парсинг делает кликер
+
75}
+
+
+
+ +

◆ get_stable_stat()

+ +
+
+ + + + + + + +
QString get_stable_stat ()
+
+ +

Получение стабильной статистики.

+
Returns
Стабильная статистика в виде QByteArray.
+
35 {
+
36
+ +
38
+
39 QString stat = client.send_msg(QStringList{"admin", "stable_stat"});
+
40
+
41 return stat;
+
42
+
43};
+
+
+
+ +

◆ reg()

+ +
+
+ + + + + + + + + + + + + + + + +
bool reg (QString login,
QString password,
QString email )
+
+ +

Регистрация нового пользователя.

+
Parameters
+ + + + +
loginЛогин пользователя.
passwordПароль.
emailЭлектронная почта.
+
+
+
Returns
true, если регистрация успешна; иначе — false.
+
20 {
+
21
+ +
23
+
24 QString response = client.send_msg(QStringList{"reg", login, email, password});
+
25
+
26 QStringList parts = response.split("//");
+
27
+
28 // проверка на успешность регистрации
+
29 if (parts[0] == "reg_success") {
+
30 return true;
+
31 }
+
32 return false;
+
33};
+
+
+
+
+
+ + + + diff --git a/docs/doxygen/html/functions__for__client_8cpp.js b/docs/doxygen/html/functions__for__client_8cpp.js new file mode 100644 index 0000000..af27d56 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8cpp.js @@ -0,0 +1,10 @@ +var functions__for__client_8cpp = +[ + [ "add_product", "functions__for__client_8cpp.html#a48a4f2da0c749370a70323e13422a698", null ], + [ "auth", "functions__for__client_8cpp.html#af65491b695e43e33df9105ec4d8702b4", null ], + [ "get_all_users", "functions__for__client_8cpp.html#ab8bda875989629df9b683e881296b32d", null ], + [ "get_dynamic_stat", "functions__for__client_8cpp.html#afa0e0e567062f87c4f78a1c848713dc3", null ], + [ "get_products", "functions__for__client_8cpp.html#a88bb6f910508e9101b193e736adf8385", null ], + [ "get_stable_stat", "functions__for__client_8cpp.html#a80d2dcf81ccda5494a09d546d287fbf5", null ], + [ "reg", "functions__for__client_8cpp.html#a9638764c61635aa7172dc25ef99ce281", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/functions__for__client_8cpp__incl.dot b/docs/doxygen/html/functions__for__client_8cpp__incl.dot new file mode 100644 index 0000000..1162b09 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8cpp__incl.dot @@ -0,0 +1,56 @@ +digraph "client/functions_for_client.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge5_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node7 [id="edge6_Node000004_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node8 [id="edge7_Node000004_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node9 [id="edge8_Node000004_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node10 [id="edge9_Node000004_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node11 [id="edge10_Node000001_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node11 -> Node12 [id="edge11_Node000011_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node11 -> Node2 [id="edge12_Node000011_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node11 -> Node13 [id="edge13_Node000011_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node13 -> Node14 [id="edge14_Node000013_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node11 -> Node15 [id="edge15_Node000011_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node15 -> Node14 [id="edge16_Node000015_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node11 -> Node16 [id="edge17_Node000011_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node17 [id="edge18_Node000001_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node17 -> Node12 [id="edge19_Node000017_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node18 [id="edge20_Node000017_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node18 -> Node14 [id="edge21_Node000018_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node18 -> Node16 [id="edge22_Node000018_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node19 [id="edge23_Node000017_Node000019",color="steelblue1",style="solid",tooltip=" "]; + Node19 [id="Node000019",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node19 -> Node12 [id="edge24_Node000019_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node19 -> Node2 [id="edge25_Node000019_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node11 [id="edge26_Node000017_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node4 [id="edge27_Node000017_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node9 [id="edge28_Node000001_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node8 [id="edge29_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node10 [id="edge30_Node000001_Node000010",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/html/functions__for__client_8cpp__incl.map b/docs/doxygen/html/functions__for__client_8cpp__incl.map new file mode 100644 index 0000000..ce10663 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8cpp__incl.map @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/functions__for__client_8cpp__incl.md5 b/docs/doxygen/html/functions__for__client_8cpp__incl.md5 new file mode 100644 index 0000000..af80ab5 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8cpp__incl.md5 @@ -0,0 +1 @@ +265b5bf9c29dbcecccfd199df97fa5ca \ No newline at end of file diff --git a/docs/doxygen/html/functions__for__client_8cpp__incl.png b/docs/doxygen/html/functions__for__client_8cpp__incl.png new file mode 100644 index 0000000..f7c265b Binary files /dev/null and b/docs/doxygen/html/functions__for__client_8cpp__incl.png differ diff --git a/docs/doxygen/html/functions__for__client_8h.html b/docs/doxygen/html/functions__for__client_8h.html new file mode 100644 index 0000000..50941ca --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h.html @@ -0,0 +1,813 @@ + + + + + + + +My Project: client/functions_for_client.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
functions_for_client.h File Reference
+
+
+
#include <QString>
+#include "Singleton.h"
+
+Include dependency graph for functions_for_client.h:
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

QString auth (QString login, QString password)
 Авторизация пользователя.
 
bool reg (QString login, QString password, QString email)
 Регистрация нового пользователя.
 
QString get_stable_stat ()
 Получение стабильной статистики.
 
QString get_dynamic_stat ()
 Получение динамической статистики.
 
QByteArray get_all_users ()
 Получение списка всех пользователей.
 
QByteArray check_task ()
 Проверка задачи (рациона).
 
QByteArray menu_export ()
 Экспорт меню.
 
QByteArray get_products (QString userId)
 Получение всех продуктов пользователя.
 
QByteArray add_product (QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
 Добавление нового продукта.
 
int get_user_count ()
 Получение общего количества пользователей.
 
int get_product_count ()
 Получение общего количества продуктов.
 
int get_weekly_logins ()
 Получение количества входов за неделю.
 
int get_monthly_logins ()
 Получение количества входов за месяц.
 
QByteArray add_favorite_ration (const QStringList &container)
 Добавление рациона в избранное.
 
bool add_ration_to_favorites (const QString &userId, const QString &rationId)
 Добавление существующего рациона в избранное.
 
+

Function Documentation

+ +

◆ add_favorite_ration()

+ +
+
+ + + + + + + +
QByteArray add_favorite_ration (const QStringList & container)
+
+ +

Добавление рациона в избранное.

+
Parameters
+ + +
containerКонтейнер с параметрами рациона.
+
+
+
Returns
Массив байтов с результатом добавления.
+
Parameters
+ + +
containerСписок данных.
+
+
+
Returns
Результат добавления в избранное в виде QByteArray.
+
293 {
+
294 QString userId = container[1]; // ID пользователя
+
295 QString rationId = container[2]; // ID рациона
+
296
+
297 bool success = add_ration_to_favorites(userId, rationId); // Вызов функции-заглушки
+
298
+
299 if (success) {
+
300 return "Ration successfully added to favorites\r\n";
+
301 } else {
+
302 return "Error: failed to add ration to favorites\r\n";
+
303 }
+
304}
+
bool add_ration_to_favorites(const QString &userId, const QString &rationId)
Добавление рациона в избранное для пользователя.
Definition func2serv.cpp:305
+
+
+
+ +

◆ add_product()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
QByteArray add_product (QString id,
QString name,
int proteins,
int fats,
int carbs,
int weight,
int cost,
int type )
+
+ +

Добавление нового продукта.

+
Parameters
+ + + + + + + + + +
idИдентификатор пользователя.
nameНазвание продукта.
proteinsКоличество белков.
fatsКоличество жиров.
carbsКоличество углеводов.
weightВес продукта.
costСтоимость продукта.
typeТип продукта.
+
+
+
Returns
Массив байтов с результатом операции.
+
77 {
+ +
79 QStringList params = {
+
80 "add_product",
+
81 id,
+
82 name,
+
83 QString::number(proteins),
+
84 QString::number(fats),
+
85 QString::number(carbs),
+
86 QString::number(weight),
+
87 QString::number(cost),
+
88 QString::number(type)
+
89 };
+
90 QByteArray response = client.send_msg(params);
+
91 return response;
+
92}
+
Сетевой клиент, реализующий паттерн Singleton.
Definition Singleton.h:36
+
static ClientSingleton & getInstance()
Получить экземпляр Singleton.
Definition Singleton.cpp:13
+
QByteArray send_msg(QStringList list)
Отправляет сообщение серверу.
Definition Singleton.cpp:54
+
+
+
+ +

◆ add_ration_to_favorites()

+ +
+
+ + + + + + + + + + + +
bool add_ration_to_favorites (const QString & userId,
const QString & rationId )
+
+ +

Добавление существующего рациона в избранное.

+
Parameters
+ + + +
userIdИдентификатор пользователя.
rationIdИдентификатор рациона.
+
+
+
Returns
true, если успешно; иначе — false.
+

Добавление существующего рациона в избранное.

+
Parameters
+ + + +
userIdИдентификатор пользователя.
rationIdИдентификатор рациона.
+
+
+
Returns
Результат добавления в избранное.
+
305 {
+
306 qDebug() << "Adding ration for user:" << userId << ", ration ID:" << rationId;
+
307 return true; // Заглушка, потом заменить на SQL-запрос
+
308}
+
+
+
+ +

◆ auth()

+ +
+
+ + + + + + + + + + + +
QString auth (QString login,
QString password )
+
+ +

Авторизация пользователя.

+
Parameters
+ + + +
loginЛогин пользователя.
passwordПароль пользователя.
+
+
+
Returns
Ответ от сервера.
+
9 {
+
10
+ +
12
+
13 QString response = client.send_msg(QStringList{"auth", email, password});
+
14
+
15 qDebug() << "Авторизация: " << response;
+
16
+
17 return response;
+
18};
+
+
+
+ +

◆ check_task()

+ +
+
+ + + + + + + +
QByteArray check_task ()
+
+ +

Проверка задачи (рациона).

+
Returns
Массив байтов с результатом проверки.
+

Проверка задачи (рациона).

+
Returns
Результат проверки задания в виде QByteArray.
+
203 {
+
204 return "Task was succesful completed\r\n";
+
205}
+
+
+
+ +

◆ get_all_users()

+ +
+
+ + + + + + + +
QByteArray get_all_users ()
+
+ +

Получение списка всех пользователей.

+
Returns
Массив байтов с данными пользователей.
+

Получение списка всех пользователей.

+
Returns
Список всех пользователей в виде QByteArray.
+
235 {
+
236 QStringList users;
+
237
+
238 // fetch_users_from_db(users);
+
239
+
240 QString response;
+
241 for (const QString& user : users) {
+
242 response += user + "\r\n";
+
243 }
+
244
+
245 return response.toUtf8();
+
246}
+
+
+
+ +

◆ get_dynamic_stat()

+ +
+
+ + + + + + + +
QString get_dynamic_stat ()
+
+ +

Получение динамической статистики.

+
Returns
JSON-строка с данными статистики.
+
+Динамическая статистика в виде QByteArray.
+
279 {
+
280 int weeklyLogins = 0;
+
281 int monthlyLogins = 0;
+
282
+
283 // Получаем данные из БД (пока заглушки)
+
284 weeklyLogins = get_weekly_logins();
+
285 monthlyLogins = get_monthly_logins();
+
286
+
287 // Формируем строку ответа
+
288 QString response = "Logins per week: " + QString::number(weeklyLogins) + "\r\n" +
+
289 "Logins per month: " + QString::number(monthlyLogins) + "\r\n";
+
290
+
291 return response.toUtf8();
+
292}
+
int get_monthly_logins()
Получение количества входов за месяц.
Definition func2serv.cpp:275
+
int get_weekly_logins()
Получение количества входов за неделю.
Definition func2serv.cpp:270
+
+
+
+ +

◆ get_monthly_logins()

+ +
+
+ + + + + + + +
int get_monthly_logins ()
+
+ +

Получение количества входов за месяц.

+
Returns
Количество входов.
+
+Количество входов за месяц.
+
275 {
+
276 // Заглушка, пока без БД
+
277 return 312; // Примерное значение
+
278}
+
+
+
+ +

◆ get_product_count()

+ +
+
+ + + + + + + +
int get_product_count ()
+
+ +

Получение общего количества продуктов.

+
Returns
Количество продуктов.
+

Получение общего количества продуктов.

+
Returns
Количество продуктов.
+
252 {
+
253 // Здесь будет SQL-запрос, пока заглушка
+
254 return 732; // Примерное значение
+
255}
+
+
+
+ +

◆ get_products()

+ +
+
+ + + + + + + +
QByteArray get_products (QString userId)
+
+ +

Получение всех продуктов пользователя.

+
Parameters
+ + +
userIdИдентификатор пользователя.
+
+
+
Returns
Массив байтов с продуктами.
+

Получение всех продуктов пользователя.

+
Parameters
+ + +
UserIdИдентификатор пользователя.
+
+
+
Returns
Список продуктов в виде QByteArray.
+
216 {
+ +
218 int userIdInt = userId.toInt();
+
219 QVector<QVariantMap> products = db->getProductsByUser(userIdInt);
+
220
+
221 QJsonArray jsonArray;
+
222 for (const QVariantMap& product : products) {
+
223 QJsonObject obj = QJsonObject::fromVariantMap(product);
+
224 jsonArray.append(obj);
+
225 }
+
226
+
227 QJsonDocument doc(jsonArray);
+
228 QByteArray jsonBytes = doc.toJson(QJsonDocument::Compact);
+
229
+
230 qDebug() << "Отправляем продукты в виде JSON:" << jsonBytes;
+
231
+
232 return jsonBytes;
+
233}
+
Класс для работы с базой данных.
Definition databasesingleton.h:43
+
QVector< QVariantMap > getProductsByUser(int userId)
Получение продуктов для конкретного пользователя.
Definition databasesingleton.cpp:132
+
static DataBaseSingleton * getInstance()
Получение единственного экземпляра Singleton.
Definition databasesingleton.cpp:10
+
+
+
+ +

◆ get_stable_stat()

+ +
+
+ + + + + + + +
QString get_stable_stat ()
+
+ +

Получение стабильной статистики.

+
Returns
JSON-строка с данными статистики.
+
+Стабильная статистика в виде QByteArray.
+
256 {
+
257
+
258 int userCount = 0;
+
259 int productCount = 0;
+
260
+
261 userCount = get_user_count();
+
262 productCount = get_product_count();
+
263
+
264 // Формируем строку ответа
+
265 QString response = "Users: " + QString::number(userCount) + "\r\n" +
+
266 "Products: " + QString::number(productCount) + "\r\n";
+
267
+
268 return response.toUtf8();
+
269}
+
int get_product_count()
Получение количества продуктов.
Definition func2serv.cpp:252
+
int get_user_count()
Получение количества пользователей.
Definition func2serv.cpp:247
+
+
+
+ +

◆ get_user_count()

+ +
+
+ + + + + + + +
int get_user_count ()
+
+ +

Получение общего количества пользователей.

+
Returns
Количество пользователей.
+

Получение общего количества пользователей.

+
Returns
Количество пользователей.
+
247 {
+
248 // Здесь будет SQL-запрос, пока заглушка
+
249 return 152; // Примерное значение
+
250}
+
+
+
+ +

◆ get_weekly_logins()

+ +
+
+ + + + + + + +
int get_weekly_logins ()
+
+ +

Получение количества входов за неделю.

+
Returns
Количество входов.
+
+Количество входов за неделю.
+
270 {
+
271 // Заглушка, пока без БД
+
272 return 78; // Примерное значение
+
273}
+
+
+
+ +

◆ menu_export()

+ +
+
+ + + + + + + +
QByteArray menu_export ()
+
+ +

Экспорт меню.

+
Returns
Массив байтов с экспортированными данными.
+
+Результат экспорта меню в виде QByteArray.
+
206 {
+
207 return "Меню успешно экспортировано!\r\n";
+
208}
+
+
+
+ +

◆ reg()

+ +
+
+ + + + + + + + + + + + + + + + +
bool reg (QString login,
QString password,
QString email )
+
+ +

Регистрация нового пользователя.

+
Parameters
+ + + + +
loginЛогин пользователя.
passwordПароль.
emailЭлектронная почта.
+
+
+
Returns
true, если регистрация успешна; иначе — false.
+
20 {
+
21
+ +
23
+
24 QString response = client.send_msg(QStringList{"reg", login, email, password});
+
25
+
26 QStringList parts = response.split("//");
+
27
+
28 // проверка на успешность регистрации
+
29 if (parts[0] == "reg_success") {
+
30 return true;
+
31 }
+
32 return false;
+
33};
+
+
+
+
+
+ + + + diff --git a/docs/doxygen/html/functions__for__client_8h.js b/docs/doxygen/html/functions__for__client_8h.js new file mode 100644 index 0000000..7ff58c8 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h.js @@ -0,0 +1,18 @@ +var functions__for__client_8h = +[ + [ "add_favorite_ration", "functions__for__client_8h.html#a6496e445a644cca89c6252f6e7adecb0", null ], + [ "add_product", "functions__for__client_8h.html#a48a4f2da0c749370a70323e13422a698", null ], + [ "add_ration_to_favorites", "functions__for__client_8h.html#a064e99d59eaa1d8cccef20b3192df015", null ], + [ "auth", "functions__for__client_8h.html#aaeef61cff0ff956865a7521c007e41cc", null ], + [ "check_task", "functions__for__client_8h.html#a6d4386c36a7ed61c61cf3d1bad354f27", null ], + [ "get_all_users", "functions__for__client_8h.html#ab8bda875989629df9b683e881296b32d", null ], + [ "get_dynamic_stat", "functions__for__client_8h.html#afa0e0e567062f87c4f78a1c848713dc3", null ], + [ "get_monthly_logins", "functions__for__client_8h.html#a2d6f70d14e474616a4a16a72485c2f0e", null ], + [ "get_product_count", "functions__for__client_8h.html#a4ddd067c5a29f76aead93c977a05113a", null ], + [ "get_products", "functions__for__client_8h.html#a73b3ae758a8cf3621318d27cd1a17722", null ], + [ "get_stable_stat", "functions__for__client_8h.html#a80d2dcf81ccda5494a09d546d287fbf5", null ], + [ "get_user_count", "functions__for__client_8h.html#a8ebcc70a2024aab70883f094fc35849e", null ], + [ "get_weekly_logins", "functions__for__client_8h.html#a4d269e13002c5cded37bee9ade854d93", null ], + [ "menu_export", "functions__for__client_8h.html#aa70831eddff4b8ed7a04647778a35747", null ], + [ "reg", "functions__for__client_8h.html#a9638764c61635aa7172dc25ef99ce281", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/functions__for__client_8h__dep__incl.dot b/docs/doxygen/html/functions__for__client_8h__dep__incl.dot new file mode 100644 index 0000000..d3f85c0 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h__dep__incl.dot @@ -0,0 +1,27 @@ +digraph "client/functions_for_client.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/functions_for\l_client.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/authregwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8cpp.html",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge4_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node4 -> Node6 [id="edge5_Node000004_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node4 -> Node7 [id="edge6_Node000004_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; + Node1 -> Node5 [id="edge7_Node000001_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node8 [id="edge8_Node000001_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="client/mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node8 -> Node5 [id="edge9_Node000008_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 -> Node9 [id="edge10_Node000008_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node8 -> Node4 [id="edge11_Node000008_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/html/functions__for__client_8h__dep__incl.map b/docs/doxygen/html/functions__for__client_8h__dep__incl.map new file mode 100644 index 0000000..edd0649 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h__dep__incl.map @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/functions__for__client_8h__dep__incl.md5 b/docs/doxygen/html/functions__for__client_8h__dep__incl.md5 new file mode 100644 index 0000000..f38d263 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h__dep__incl.md5 @@ -0,0 +1 @@ +f7ec455b6f491768f1722822a741e002 \ No newline at end of file diff --git a/docs/doxygen/html/functions__for__client_8h__dep__incl.png b/docs/doxygen/html/functions__for__client_8h__dep__incl.png new file mode 100644 index 0000000..9b539be Binary files /dev/null and b/docs/doxygen/html/functions__for__client_8h__dep__incl.png differ diff --git a/docs/doxygen/html/functions__for__client_8h__incl.dot b/docs/doxygen/html/functions__for__client_8h__incl.dot new file mode 100644 index 0000000..207337a --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h__incl.dot @@ -0,0 +1,24 @@ +digraph "client/functions_for_client.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/functions_for\l_client.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge3_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node5 [id="edge4_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node6 [id="edge5_Node000003_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node7 [id="edge6_Node000003_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node8 [id="edge7_Node000003_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node9 [id="edge8_Node000003_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/functions__for__client_8h__incl.map b/docs/doxygen/html/functions__for__client_8h__incl.map new file mode 100644 index 0000000..960656e --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h__incl.map @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/functions__for__client_8h__incl.md5 b/docs/doxygen/html/functions__for__client_8h__incl.md5 new file mode 100644 index 0000000..eac311f --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h__incl.md5 @@ -0,0 +1 @@ +c6883eec08dc13993a56bb29d35a4f05 \ No newline at end of file diff --git a/docs/doxygen/html/functions__for__client_8h__incl.png b/docs/doxygen/html/functions__for__client_8h__incl.png new file mode 100644 index 0000000..e978e45 Binary files /dev/null and b/docs/doxygen/html/functions__for__client_8h__incl.png differ diff --git a/docs/doxygen/html/functions__for__client_8h_source.html b/docs/doxygen/html/functions__for__client_8h_source.html new file mode 100644 index 0000000..9d71d30 --- /dev/null +++ b/docs/doxygen/html/functions__for__client_8h_source.html @@ -0,0 +1,172 @@ + + + + + + + +My Project: client/functions_for_client.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
functions_for_client.h
+
+
+Go to the documentation of this file.
1#ifndef FUNCTIONS_FOR_CLIENT_H
+
2#define FUNCTIONS_FOR_CLIENT_H
+
3
+
4#include <QString>
+
5#include "Singleton.h"
+
6
+
13QString auth(QString login, QString password);
+
14
+
22bool reg(QString login, QString password, QString email);
+
23
+
28QString get_stable_stat();
+
29
+
34QString get_dynamic_stat();
+
35
+
40QByteArray get_all_users();
+
41
+
46QByteArray check_task();
+
47
+
52QByteArray menu_export();
+
53
+
59QByteArray get_products(QString userId);
+
60
+
73QByteArray add_product(QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type);
+
74
+
79int get_user_count();
+
80
+ +
86
+ +
92
+ +
98
+
104QByteArray add_favorite_ration(const QStringList& container);
+
105
+
112bool add_ration_to_favorites(const QString& userId, const QString& rationId);
+
113
+
114#endif // FUNCTIONS_FOR_CLIENT_H
+ +
bool add_ration_to_favorites(const QString &userId, const QString &rationId)
Добавление существующего рациона в избранное.
Definition func2serv.cpp:305
+
int get_monthly_logins()
Получение количества входов за месяц.
Definition func2serv.cpp:275
+
QByteArray add_product(QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
Добавление нового продукта.
Definition functions_for_client.cpp:77
+
int get_weekly_logins()
Получение количества входов за неделю.
Definition func2serv.cpp:270
+
int get_product_count()
Получение общего количества продуктов.
Definition func2serv.cpp:252
+
QByteArray add_favorite_ration(const QStringList &container)
Добавление рациона в избранное.
Definition func2serv.cpp:293
+
QByteArray check_task()
Проверка задачи (рациона).
Definition func2serv.cpp:203
+
QByteArray get_products(QString userId)
Получение всех продуктов пользователя.
Definition func2serv.cpp:216
+
QString get_stable_stat()
Получение стабильной статистики.
Definition func2serv.cpp:256
+
int get_user_count()
Получение общего количества пользователей.
Definition func2serv.cpp:247
+
bool reg(QString login, QString password, QString email)
Регистрация нового пользователя.
Definition functions_for_client.cpp:20
+
QByteArray menu_export()
Экспорт меню.
Definition func2serv.cpp:206
+
QString auth(QString login, QString password)
Авторизация пользователя.
Definition functions_for_client.cpp:9
+
QByteArray get_all_users()
Получение списка всех пользователей.
Definition func2serv.cpp:235
+
QString get_dynamic_stat()
Получение динамической статистики.
Definition func2serv.cpp:279
+
+
+ + + + diff --git a/docs/doxygen/html/functions_func.html b/docs/doxygen/html/functions_func.html new file mode 100644 index 0000000..d5226d1 --- /dev/null +++ b/docs/doxygen/html/functions_func.html @@ -0,0 +1,223 @@ + + + + + + + +My Project: Class Members - Functions + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all functions with links to the classes they belong to:
+ +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- s -

+ + +

- u -

+ + +

- ~ -

+
+
+ + + + diff --git a/docs/doxygen/html/functions_rela.html b/docs/doxygen/html/functions_rela.html new file mode 100644 index 0000000..d625f59 --- /dev/null +++ b/docs/doxygen/html/functions_rela.html @@ -0,0 +1,119 @@ + + + + + + + +My Project: Class Members - Related Symbols + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all related symbols with links to the classes they belong to:
+
+
+ + + + diff --git a/docs/doxygen/html/functions_vars.html b/docs/doxygen/html/functions_vars.html new file mode 100644 index 0000000..b0a49c4 --- /dev/null +++ b/docs/doxygen/html/functions_vars.html @@ -0,0 +1,133 @@ + + + + + + + +My Project: Class Members - Variables + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+
+
+ + + + diff --git a/docs/doxygen/html/globals.html b/docs/doxygen/html/globals.html new file mode 100644 index 0000000..6369e6c --- /dev/null +++ b/docs/doxygen/html/globals.html @@ -0,0 +1,163 @@ + + + + + + + +My Project: File Members + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- a -

+ + +

- c -

+ + +

- f -

+ + +

- g -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+
+
+ + + + diff --git a/docs/doxygen/html/globals_func.html b/docs/doxygen/html/globals_func.html new file mode 100644 index 0000000..034b7bd --- /dev/null +++ b/docs/doxygen/html/globals_func.html @@ -0,0 +1,162 @@ + + + + + + + +My Project: File Members + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all functions with links to the files they belong to:
+ +

- a -

+ + +

- c -

+ + +

- f -

+ + +

- g -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+
+
+ + + + diff --git a/docs/doxygen/html/globals_vars.html b/docs/doxygen/html/globals_vars.html new file mode 100644 index 0000000..e9c5fab --- /dev/null +++ b/docs/doxygen/html/globals_vars.html @@ -0,0 +1,118 @@ + + + + + + + +My Project: File Members + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the files they belong to:
+
+
+ + + + diff --git a/docs/doxygen/html/graph_legend.dot b/docs/doxygen/html/graph_legend.dot new file mode 100644 index 0000000..97a6d61 --- /dev/null +++ b/docs/doxygen/html/graph_legend.dot @@ -0,0 +1,24 @@ +digraph "Graph Legend" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node9 [id="Node000009",label="Inherited",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node10 -> Node9 [dir="back",color="steelblue1",style="solid" tooltip=" "]; + Node10 [id="Node000010",label="PublicBase",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",tooltip=" "]; + Node11 -> Node10 [dir="back",color="steelblue1",style="solid" tooltip=" "]; + Node11 [id="Node000011",label="Truncated",height=0.2,width=0.4,color="red", fillcolor="#FFF0F0", style="filled",tooltip=" "]; + Node13 -> Node9 [dir="back",color="darkgreen",style="solid" tooltip=" "]; + Node13 [label="ProtectedBase",color="gray40",fillcolor="white",style="filled" tooltip=" "]; + Node14 -> Node9 [dir="back",color="firebrick4",style="solid" tooltip=" "]; + Node14 [label="PrivateBase",color="gray40",fillcolor="white",style="filled" tooltip=" "]; + Node15 -> Node9 [dir="back",color="steelblue1",style="solid" tooltip=" "]; + Node15 [id="Node000015",label="Undocumented",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node16 -> Node9 [dir="back",color="steelblue1",style="solid" tooltip=" "]; + Node16 [label="Templ\< int \>",color="gray40",fillcolor="white",style="filled" tooltip=" "]; + Node17 -> Node16 [dir="back",color="orange",style="dashed",label="< int >",fontcolor="grey" tooltip=" "]; + Node17 [label="Templ\< T \>",color="gray40",fillcolor="white",style="filled" tooltip=" "]; + Node18 -> Node9 [dir="back",color="darkorchid3",style="dashed",label="m_usedClass",fontcolor="grey" tooltip=" "]; + Node18 [label="Used",color="gray40",fillcolor="white",style="filled" tooltip=" "]; +} diff --git a/docs/doxygen/html/graph_legend.html b/docs/doxygen/html/graph_legend.html new file mode 100644 index 0000000..7528b9b --- /dev/null +++ b/docs/doxygen/html/graph_legend.html @@ -0,0 +1,178 @@ + + + + + + + +My Project: Graph Legend + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Graph Legend
+
+
+

This page explains how to interpret the graphs that are generated by doxygen.

+

Consider the following example:

/*! Invisible class because of truncation */
+
class Invisible { };
+
+
/*! Truncated class, inheritance relation is hidden */
+
class Truncated : public Invisible { };
+
+
/* Class not documented with doxygen comments */
+
class Undocumented { };
+
+
/*! Class that is inherited using public inheritance */
+
class PublicBase : public Truncated { };
+
+
/*! A template class */
+
template<class T> class Templ { };
+
+
/*! Class that is inherited using protected inheritance */
+
class ProtectedBase { };
+
+
/*! Class that is inherited using private inheritance */
+
class PrivateBase { };
+
+
/*! Class that is used by the Inherited class */
+
class Used { };
+
+
/*! Super class that inherits a number of other classes */
+
class Inherited : public PublicBase,
+
protected ProtectedBase,
+
private PrivateBase,
+
public Undocumented,
+
public Templ<int>
+
{
+
private:
+
Used *m_usedClass;
+
};
+

This will result in the following graph:

+

The boxes in the above graph have the following meaning:

+
    +
  • +A filled gray box represents the struct or class for which the graph is generated.
  • +
  • +A box with a black border denotes a documented struct or class.
  • +
  • +A box with a gray border denotes an undocumented struct or class.
  • +
  • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • +
+

The arrows have the following meaning:

+
    +
  • +A blue arrow is used to visualize a public inheritance relation between two classes.
  • +
  • +A dark green arrow is used for protected inheritance.
  • +
  • +A dark red arrow is used for private inheritance.
  • +
  • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • +
  • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • +
+
+
+ + + + diff --git a/docs/doxygen/html/graph_legend.md5 b/docs/doxygen/html/graph_legend.md5 new file mode 100644 index 0000000..da515da --- /dev/null +++ b/docs/doxygen/html/graph_legend.md5 @@ -0,0 +1 @@ +f74606a252eb303675caf37987d0b7af \ No newline at end of file diff --git a/docs/doxygen/html/graph_legend.png b/docs/doxygen/html/graph_legend.png new file mode 100644 index 0000000..feea22a Binary files /dev/null and b/docs/doxygen/html/graph_legend.png differ diff --git a/docs/doxygen/html/hierarchy.html b/docs/doxygen/html/hierarchy.html new file mode 100644 index 0000000..457251f --- /dev/null +++ b/docs/doxygen/html/hierarchy.html @@ -0,0 +1,138 @@ + + + + + + + +My Project: Class Hierarchy + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Hierarchy
+
+
+
+

Go to the graphical class hierarchy

+This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 12]
+ + + + + + + + + + + + + + +
 CClientSingletonDestroyerРазрушитель Singleton для корректного удаления ClientSingleton
 CDataBaseSingletonКласс для работы с базой данных
 CQMainWindow
 CAuthRegWindowКласс окна авторизации и регистрации
 CMainWindowГлавное окно клиента
 CManagerFormsКласс для управления окнами приложения
 CQObject
 CClientSingletonСетевой клиент, реализующий паттерн Singleton
 CMyTcpServer
 CQWidget
 CAddProductWindowКласс окна для добавления нового продукта
 CmenuCardВиджет отображения информации о рационе питания
 CproductCardВиджет карточки продукта
 CSingletonDestroyerКласс для разрушения экземпляра Singleton
+
+
+
+ + + + diff --git a/docs/doxygen/html/hierarchy.js b/docs/doxygen/html/hierarchy.js new file mode 100644 index 0000000..90513ed --- /dev/null +++ b/docs/doxygen/html/hierarchy.js @@ -0,0 +1,20 @@ +var hierarchy = +[ + [ "ClientSingletonDestroyer", "class_client_singleton_destroyer.html", null ], + [ "DataBaseSingleton", "class_data_base_singleton.html", null ], + [ "QMainWindow", null, [ + [ "AuthRegWindow", "class_auth_reg_window.html", null ], + [ "MainWindow", "class_main_window.html", null ], + [ "ManagerForms", "class_manager_forms.html", null ] + ] ], + [ "QObject", null, [ + [ "ClientSingleton", "class_client_singleton.html", null ], + [ "MyTcpServer", "class_my_tcp_server.html", null ] + ] ], + [ "QWidget", null, [ + [ "AddProductWindow", "class_add_product_window.html", null ], + [ "menuCard", "classmenu_card.html", null ], + [ "productCard", "classproduct_card.html", null ] + ] ], + [ "SingletonDestroyer", "class_singleton_destroyer.html", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/index.html b/docs/doxygen/html/index.html new file mode 100644 index 0000000..0ba1dcf --- /dev/null +++ b/docs/doxygen/html/index.html @@ -0,0 +1,119 @@ + + + + + + + +My Project: Main Page + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
My Project Documentation
+
+
+ +
+
+ + + + diff --git a/docs/doxygen/html/inherit_graph_0.dot b/docs/doxygen/html/inherit_graph_0.dot new file mode 100644 index 0000000..4b82e41 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_0.dot @@ -0,0 +1,9 @@ +digraph "Graphical Class Hierarchy" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + rankdir="LR"; + Node0 [id="Node000000",label="ClientSingletonDestroyer",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_client_singleton_destroyer.html",tooltip="Разрушитель Singleton для корректного удаления ClientSingleton."]; +} diff --git a/docs/doxygen/html/inherit_graph_0.map b/docs/doxygen/html/inherit_graph_0.map new file mode 100644 index 0000000..62ab502 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_0.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/doxygen/html/inherit_graph_0.md5 b/docs/doxygen/html/inherit_graph_0.md5 new file mode 100644 index 0000000..5f93b29 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_0.md5 @@ -0,0 +1 @@ +213abd5642065ab8a1b7298658667bce \ No newline at end of file diff --git a/docs/doxygen/html/inherit_graph_0.png b/docs/doxygen/html/inherit_graph_0.png new file mode 100644 index 0000000..fcb2114 Binary files /dev/null and b/docs/doxygen/html/inherit_graph_0.png differ diff --git a/docs/doxygen/html/inherit_graph_1.dot b/docs/doxygen/html/inherit_graph_1.dot new file mode 100644 index 0000000..320fdd4 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_1.dot @@ -0,0 +1,9 @@ +digraph "Graphical Class Hierarchy" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + rankdir="LR"; + Node0 [id="Node000000",label="DataBaseSingleton",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_data_base_singleton.html",tooltip="Класс для работы с базой данных."]; +} diff --git a/docs/doxygen/html/inherit_graph_1.map b/docs/doxygen/html/inherit_graph_1.map new file mode 100644 index 0000000..866df6a --- /dev/null +++ b/docs/doxygen/html/inherit_graph_1.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/doxygen/html/inherit_graph_1.md5 b/docs/doxygen/html/inherit_graph_1.md5 new file mode 100644 index 0000000..19418ff --- /dev/null +++ b/docs/doxygen/html/inherit_graph_1.md5 @@ -0,0 +1 @@ +46dd13a91d58f7b8d02db6987dd2c88b \ No newline at end of file diff --git a/docs/doxygen/html/inherit_graph_1.png b/docs/doxygen/html/inherit_graph_1.png new file mode 100644 index 0000000..b7a0675 Binary files /dev/null and b/docs/doxygen/html/inherit_graph_1.png differ diff --git a/docs/doxygen/html/inherit_graph_2.dot b/docs/doxygen/html/inherit_graph_2.dot new file mode 100644 index 0000000..64c9217 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_2.dot @@ -0,0 +1,15 @@ +digraph "Graphical Class Hierarchy" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + rankdir="LR"; + Node0 [id="Node000000",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node0 -> Node1 [id="edge1_Node000000_Node000001",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node1 [id="Node000001",label="AuthRegWindow",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_auth_reg_window.html",tooltip="Класс окна авторизации и регистрации."]; + Node0 -> Node2 [id="edge2_Node000000_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="MainWindow",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_main_window.html",tooltip="Главное окно клиента."]; + Node0 -> Node3 [id="edge3_Node000000_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="ManagerForms",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_manager_forms.html",tooltip="Класс для управления окнами приложения."]; +} diff --git a/docs/doxygen/html/inherit_graph_2.map b/docs/doxygen/html/inherit_graph_2.map new file mode 100644 index 0000000..d365e93 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_2.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/doxygen/html/inherit_graph_2.md5 b/docs/doxygen/html/inherit_graph_2.md5 new file mode 100644 index 0000000..ea80b0c --- /dev/null +++ b/docs/doxygen/html/inherit_graph_2.md5 @@ -0,0 +1 @@ +9ed580bf8f2d7c156ce2af4072fc3673 \ No newline at end of file diff --git a/docs/doxygen/html/inherit_graph_2.png b/docs/doxygen/html/inherit_graph_2.png new file mode 100644 index 0000000..0af5134 Binary files /dev/null and b/docs/doxygen/html/inherit_graph_2.png differ diff --git a/docs/doxygen/html/inherit_graph_3.dot b/docs/doxygen/html/inherit_graph_3.dot new file mode 100644 index 0000000..194071f --- /dev/null +++ b/docs/doxygen/html/inherit_graph_3.dot @@ -0,0 +1,13 @@ +digraph "Graphical Class Hierarchy" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + rankdir="LR"; + Node0 [id="Node000000",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node0 -> Node1 [id="edge4_Node000000_Node000001",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node1 [id="Node000001",label="ClientSingleton",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_client_singleton.html",tooltip="Сетевой клиент, реализующий паттерн Singleton."]; + Node0 -> Node2 [id="edge5_Node000000_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="MyTcpServer",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_my_tcp_server.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/inherit_graph_3.map b/docs/doxygen/html/inherit_graph_3.map new file mode 100644 index 0000000..6fe97a2 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_3.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/doxygen/html/inherit_graph_3.md5 b/docs/doxygen/html/inherit_graph_3.md5 new file mode 100644 index 0000000..dcba030 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_3.md5 @@ -0,0 +1 @@ +f94814f73d1b6bf12aebd0ec9043a8fe \ No newline at end of file diff --git a/docs/doxygen/html/inherit_graph_3.png b/docs/doxygen/html/inherit_graph_3.png new file mode 100644 index 0000000..3ff1168 Binary files /dev/null and b/docs/doxygen/html/inherit_graph_3.png differ diff --git a/docs/doxygen/html/inherit_graph_4.dot b/docs/doxygen/html/inherit_graph_4.dot new file mode 100644 index 0000000..681cc19 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_4.dot @@ -0,0 +1,15 @@ +digraph "Graphical Class Hierarchy" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + rankdir="LR"; + Node0 [id="Node000000",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node0 -> Node1 [id="edge6_Node000000_Node000001",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node1 [id="Node000001",label="AddProductWindow",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_add_product_window.html",tooltip="Класс окна для добавления нового продукта."]; + Node0 -> Node2 [id="edge7_Node000000_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="menuCard",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classmenu_card.html",tooltip="Виджет отображения информации о рационе питания."]; + Node0 -> Node3 [id="edge8_Node000000_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="productCard",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classproduct_card.html",tooltip="Виджет карточки продукта."]; +} diff --git a/docs/doxygen/html/inherit_graph_4.map b/docs/doxygen/html/inherit_graph_4.map new file mode 100644 index 0000000..9fdee77 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_4.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/doxygen/html/inherit_graph_4.md5 b/docs/doxygen/html/inherit_graph_4.md5 new file mode 100644 index 0000000..8f418d6 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_4.md5 @@ -0,0 +1 @@ +f82cf8e3749f55f87f58fbba5bee1822 \ No newline at end of file diff --git a/docs/doxygen/html/inherit_graph_4.png b/docs/doxygen/html/inherit_graph_4.png new file mode 100644 index 0000000..c4af3e0 Binary files /dev/null and b/docs/doxygen/html/inherit_graph_4.png differ diff --git a/docs/doxygen/html/inherit_graph_5.dot b/docs/doxygen/html/inherit_graph_5.dot new file mode 100644 index 0000000..d331a60 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_5.dot @@ -0,0 +1,9 @@ +digraph "Graphical Class Hierarchy" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + rankdir="LR"; + Node0 [id="Node000000",label="SingletonDestroyer",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$class_singleton_destroyer.html",tooltip="Класс для разрушения экземпляра Singleton."]; +} diff --git a/docs/doxygen/html/inherit_graph_5.map b/docs/doxygen/html/inherit_graph_5.map new file mode 100644 index 0000000..83ecd10 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_5.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/doxygen/html/inherit_graph_5.md5 b/docs/doxygen/html/inherit_graph_5.md5 new file mode 100644 index 0000000..25466e1 --- /dev/null +++ b/docs/doxygen/html/inherit_graph_5.md5 @@ -0,0 +1 @@ +e30c74526f09d45e3f936ffa233a00d5 \ No newline at end of file diff --git a/docs/doxygen/html/inherit_graph_5.png b/docs/doxygen/html/inherit_graph_5.png new file mode 100644 index 0000000..f031b05 Binary files /dev/null and b/docs/doxygen/html/inherit_graph_5.png differ diff --git a/docs/doxygen/html/inherits.html b/docs/doxygen/html/inherits.html new file mode 100644 index 0000000..fbcf603 --- /dev/null +++ b/docs/doxygen/html/inherits.html @@ -0,0 +1,168 @@ + + + + + + + +My Project: Class Hierarchy + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Hierarchy
+
+
+ + + + + + + +
+ + + +
+ + + +
+ + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+
+
+ + + + diff --git a/docs/doxygen/html/jquery.js b/docs/doxygen/html/jquery.js new file mode 100644 index 0000000..875ada7 --- /dev/null +++ b/docs/doxygen/html/jquery.js @@ -0,0 +1,204 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e} +var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp( +"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType +}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c +)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){ +return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll( +":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id") +)&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push( +"\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test( +a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null, +null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne +).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for( +var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n; +return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0, +r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r] +,C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each( +function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r, +"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})} +),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each( +"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t +){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t +]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i}, +getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within, +s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})), +this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t +).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split( +","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add( +this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{ +width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(), +!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){ +this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height +,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e, +i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left +)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e +){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0), +i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth( +)-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e, +function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0 +]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){ +targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se", +"n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if( +session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)} +closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if( +session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE, +function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset); +tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList, +finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight())); +return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")} +function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(), +elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight, +viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b, +"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); +/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)), +mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend( +$.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy( +this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData( +"smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id" +).indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?( +this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for( +var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){ +return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if(( +!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&( +this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0 +]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass( +"highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){ +t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]" +)||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){ +t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"), +a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i, +downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2) +)&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t +)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0), +canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}}, +rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})} +return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1, +bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); diff --git a/docs/doxygen/html/main_8cpp.html b/docs/doxygen/html/main_8cpp.html new file mode 100644 index 0000000..cea038f --- /dev/null +++ b/docs/doxygen/html/main_8cpp.html @@ -0,0 +1,217 @@ + + + + + + + +My Project: server/main.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
main.cpp File Reference
+
+
+
#include <QCoreApplication>
+#include <QObject>
+#include <QVariant>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include "mytcpserver.h"
+#include "databasesingleton.h"
+
+Include dependency graph for main.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +

+Functions

int main (int argc, char *argv[])
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + + + + +
int main (int argc,
char * argv[] )
+
+
11 {
+
12 QCoreApplication a(argc, argv);
+
13
+
14 // Инициализация БД
+ +
16 if (!db->initialize("Easyweek.db")) {
+
17 qFatal("Failed to initialize database");
+
18 }
+
19
+
20
+
21 MyTcpServer myserv;
+
22 return a.exec();
+
23}
+
Класс для работы с базой данных.
Definition databasesingleton.h:43
+
bool initialize(const QString &databaseName)
Инициализация базы данных.
Definition databasesingleton.cpp:18
+
static DataBaseSingleton * getInstance()
Получение единственного экземпляра Singleton.
Definition databasesingleton.cpp:10
+
Definition mytcpserver.h:12
+
+
+
+
+
+ + + + diff --git a/docs/doxygen/html/main_8cpp.js b/docs/doxygen/html/main_8cpp.js new file mode 100644 index 0000000..783c492 --- /dev/null +++ b/docs/doxygen/html/main_8cpp.js @@ -0,0 +1,4 @@ +var main_8cpp = +[ + [ "main", "main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/main_8cpp__incl.dot b/docs/doxygen/html/main_8cpp__incl.dot new file mode 100644 index 0000000..71a0ab6 --- /dev/null +++ b/docs/doxygen/html/main_8cpp__incl.dot @@ -0,0 +1,44 @@ +digraph "server/main.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/main.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QCoreApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QVariant",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge6_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="mytcpserver.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8h.html",tooltip=" "]; + Node7 -> Node3 [id="edge7_Node000007_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node7 -> Node8 [id="edge8_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QTcpServer",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node9 [id="edge9_Node000007_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node10 [id="edge10_Node000007_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node11 [id="edge11_Node000007_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node12 [id="edge12_Node000007_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node13 [id="edge13_Node000007_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node14 [id="edge14_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="databasesingleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8h.html",tooltip=" "]; + Node14 -> Node5 [id="edge15_Node000014_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node6 [id="edge16_Node000014_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node15 [id="edge17_Node000014_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node14 -> Node12 [id="edge18_Node000014_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node16 [id="edge19_Node000014_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node14 -> Node17 [id="edge20_Node000014_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/main_8cpp__incl.map b/docs/doxygen/html/main_8cpp__incl.map new file mode 100644 index 0000000..bf2fbf9 --- /dev/null +++ b/docs/doxygen/html/main_8cpp__incl.map @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/main_8cpp__incl.md5 b/docs/doxygen/html/main_8cpp__incl.md5 new file mode 100644 index 0000000..a48ca6e --- /dev/null +++ b/docs/doxygen/html/main_8cpp__incl.md5 @@ -0,0 +1 @@ +4faa68d62b86d4930b0b92d3536355e2 \ No newline at end of file diff --git a/docs/doxygen/html/main_8cpp__incl.png b/docs/doxygen/html/main_8cpp__incl.png new file mode 100644 index 0000000..ade234d Binary files /dev/null and b/docs/doxygen/html/main_8cpp__incl.png differ diff --git a/docs/doxygen/html/mainwindow_8cpp.html b/docs/doxygen/html/mainwindow_8cpp.html new file mode 100644 index 0000000..7e09355 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8cpp.html @@ -0,0 +1,179 @@ + + + + + + + +My Project: client/mainwindow.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mainwindow.cpp File Reference
+
+
+
#include "mainwindow.h"
+#include "ui_mainwindow.h"
+#include <QGridLayout>
+#include <QScrollArea>
+#include <QDebug>
+#include <QProcess>
+#include <QApplication>
+#include <QPushButton>
+
+Include dependency graph for mainwindow.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/mainwindow_8cpp__incl.dot b/docs/doxygen/html/mainwindow_8cpp__incl.dot new file mode 100644 index 0000000..d5493d9 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8cpp__incl.dot @@ -0,0 +1,52 @@ +digraph "client/mainwindow.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/mainwindow.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge5_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node6 -> Node7 [id="edge6_Node000006_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node8 [id="edge7_Node000006_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node9 [id="edge8_Node000006_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node10 [id="edge9_Node000006_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node11 [id="edge10_Node000006_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node12 [id="edge11_Node000006_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node13 [id="edge12_Node000002_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node13 -> Node14 [id="edge13_Node000013_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node15 [id="edge14_Node000002_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node15 -> Node14 [id="edge15_Node000015_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node2 -> Node16 [id="edge16_Node000002_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node17 [id="edge17_Node000001_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="ui_mainwindow.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node18 [id="edge18_Node000001_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="QGridLayout",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node19 [id="edge19_Node000001_Node000019",color="steelblue1",style="solid",tooltip=" "]; + Node19 [id="Node000019",label="QScrollArea",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node11 [id="edge20_Node000001_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node20 [id="edge21_Node000001_Node000020",color="steelblue1",style="solid",tooltip=" "]; + Node20 [id="Node000020",label="QProcess",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node21 [id="edge22_Node000001_Node000021",color="steelblue1",style="solid",tooltip=" "]; + Node21 [id="Node000021",label="QApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node22 [id="edge23_Node000001_Node000022",color="steelblue1",style="solid",tooltip=" "]; + Node22 [id="Node000022",label="QPushButton",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/mainwindow_8cpp__incl.map b/docs/doxygen/html/mainwindow_8cpp__incl.map new file mode 100644 index 0000000..1d58fb4 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8cpp__incl.map @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/mainwindow_8cpp__incl.md5 b/docs/doxygen/html/mainwindow_8cpp__incl.md5 new file mode 100644 index 0000000..3dce626 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8cpp__incl.md5 @@ -0,0 +1 @@ +3d9834be359733dddcfa7d8d0722228d \ No newline at end of file diff --git a/docs/doxygen/html/mainwindow_8cpp__incl.png b/docs/doxygen/html/mainwindow_8cpp__incl.png new file mode 100644 index 0000000..8908462 Binary files /dev/null and b/docs/doxygen/html/mainwindow_8cpp__incl.png differ diff --git a/docs/doxygen/html/mainwindow_8h.html b/docs/doxygen/html/mainwindow_8h.html new file mode 100644 index 0000000..2827a80 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h.html @@ -0,0 +1,197 @@ + + + + + + + +My Project: client/mainwindow.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
mainwindow.h File Reference
+
+
+
#include <QMainWindow>
+#include "functions_for_client.h"
+#include "productCard.h"
+#include "menuCard.h"
+#include <QMessageBox>
+
+Include dependency graph for mainwindow.h:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  MainWindow
 Главное окно клиента. More...
 
+ + + +

+Namespaces

namespace  Ui
 
+
+
+ + + + diff --git a/docs/doxygen/html/mainwindow_8h.js b/docs/doxygen/html/mainwindow_8h.js new file mode 100644 index 0000000..d490c28 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h.js @@ -0,0 +1,4 @@ +var mainwindow_8h = +[ + [ "MainWindow", "class_main_window.html", "class_main_window" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/mainwindow_8h__dep__incl.dot b/docs/doxygen/html/mainwindow_8h__dep__incl.dot new file mode 100644 index 0000000..29c5282 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h__dep__incl.dot @@ -0,0 +1,19 @@ +digraph "client/mainwindow.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/mainwindow.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node4 -> Node2 [id="edge4_Node000004_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 -> Node5 [id="edge5_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node4 -> Node6 [id="edge6_Node000004_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/mainwindow_8h__dep__incl.map b/docs/doxygen/html/mainwindow_8h__dep__incl.map new file mode 100644 index 0000000..4ea6ec5 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h__dep__incl.map @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/mainwindow_8h__dep__incl.md5 b/docs/doxygen/html/mainwindow_8h__dep__incl.md5 new file mode 100644 index 0000000..63a1c80 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h__dep__incl.md5 @@ -0,0 +1 @@ +a729fe8d36b876b0923fb773a23ccaa6 \ No newline at end of file diff --git a/docs/doxygen/html/mainwindow_8h__dep__incl.png b/docs/doxygen/html/mainwindow_8h__dep__incl.png new file mode 100644 index 0000000..6fd6175 Binary files /dev/null and b/docs/doxygen/html/mainwindow_8h__dep__incl.png differ diff --git a/docs/doxygen/html/mainwindow_8h__incl.dot b/docs/doxygen/html/mainwindow_8h__incl.dot new file mode 100644 index 0000000..7502c11 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h__incl.dot @@ -0,0 +1,37 @@ +digraph "client/mainwindow.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/mainwindow.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge3_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node5 [id="edge4_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node7 [id="edge6_Node000005_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node8 [id="edge7_Node000005_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node9 [id="edge8_Node000005_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node10 [id="edge9_Node000005_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node11 [id="edge10_Node000005_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node12 [id="edge11_Node000001_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node12 -> Node13 [id="edge12_Node000012_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node14 [id="edge13_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node14 -> Node13 [id="edge14_Node000014_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node15 [id="edge15_Node000001_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/mainwindow_8h__incl.map b/docs/doxygen/html/mainwindow_8h__incl.map new file mode 100644 index 0000000..60cd3fd --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h__incl.map @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/mainwindow_8h__incl.md5 b/docs/doxygen/html/mainwindow_8h__incl.md5 new file mode 100644 index 0000000..5e79917 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h__incl.md5 @@ -0,0 +1 @@ +211427cab77308f67cb9ccc957ad9d98 \ No newline at end of file diff --git a/docs/doxygen/html/mainwindow_8h__incl.png b/docs/doxygen/html/mainwindow_8h__incl.png new file mode 100644 index 0000000..8b3a1c0 Binary files /dev/null and b/docs/doxygen/html/mainwindow_8h__incl.png differ diff --git a/docs/doxygen/html/mainwindow_8h_source.html b/docs/doxygen/html/mainwindow_8h_source.html new file mode 100644 index 0000000..8997271 --- /dev/null +++ b/docs/doxygen/html/mainwindow_8h_source.html @@ -0,0 +1,200 @@ + + + + + + + +My Project: client/mainwindow.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mainwindow.h
+
+
+Go to the documentation of this file.
1#ifndef MAINWINDOW_H
+
2#define MAINWINDOW_H
+
3
+
4#include <QMainWindow>
+ +
6#include "productCard.h"
+
7#include "menuCard.h"
+
8#include <QMessageBox>
+
9
+
10namespace Ui {
+
11class MainWindow;
+
12}
+
13
+
+
20class MainWindow : public QMainWindow
+
21{
+
22 Q_OBJECT
+
23
+
24public:
+
29 explicit MainWindow(QWidget *parent = nullptr);
+
30
+ +
35
+
36 QString id;
+
37 QString login;
+
38 QString password;
+
39 QString email;
+
40
+
41public slots:
+
45 void slot_show();
+
46
+
53 void set_current_user(QString id, QString login, QString email);
+
54
+
65 void handleProductAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type);
+
66
+
67private:
+
68 Ui::MainWindow *ui;
+
69
+
70private slots:
+ +
75
+ +
80
+ +
85
+ +
90
+ +
95
+ +
100
+ +
105
+
106signals:
+ +
111};
+
+
112
+
113#endif // MAINWINDOW_H
+
void on_addProductButton_clicked()
Обработчик нажатия на кнопку "Добавить продукт".
Definition mainwindow.cpp:172
+
void on_dynamicStatButton_clicked()
Обработчик нажатия на кнопку "Динамическая статистика".
Definition mainwindow.cpp:47
+
void on_productListButton_clicked()
Обработчик нажатия на кнопку "Список продуктов".
Definition mainwindow.cpp:62
+
QString password
Пароль пользователя.
Definition mainwindow.h:38
+
void on_tableUsersButton_clicked()
Обработчик нажатия на кнопку "Список пользователей".
Definition mainwindow.cpp:55
+
Ui::MainWindow * ui
Указатель на UI-элементы окна.
Definition mainwindow.h:68
+
QString login
Логин пользователя.
Definition mainwindow.h:37
+
QString email
Электронная почта пользователя.
Definition mainwindow.h:39
+
void set_current_user(QString id, QString login, QString email)
Устанавливает данные текущего пользователя.
Definition mainwindow.cpp:28
+
MainWindow(QWidget *parent=nullptr)
Конструктор класса MainWindow.
Definition mainwindow.cpp:11
+
void slot_show()
Показывает главное окно.
Definition mainwindow.cpp:23
+
QString id
Идентификатор текущего пользователя.
Definition mainwindow.h:36
+
void on_stableStatButton_clicked()
Обработчик нажатия на кнопку "Стабильная статистика".
Definition mainwindow.cpp:40
+
void handleProductAdded(QString name, int proteins, int fats, int carbs, int weight, int cost, int type)
Обрабатывает добавление нового продукта.
Definition mainwindow.cpp:178
+
void on_createMenButton_clicked()
Обработчик нажатия на кнопку "Создать рацион".
Definition mainwindow.cpp:130
+
~MainWindow()
Деструктор.
Definition mainwindow.cpp:18
+
void add_product()
Сигнал, указывающий на необходимость открыть окно добавления продукта.
+
void on_exitButton_clicked()
Обработчик нажатия на кнопку "Выход".
Definition mainwindow.cpp:191
+ + +
Definition add_product.h:7
+ +
+
+ + + + diff --git a/docs/doxygen/html/managerforms_8cpp.html b/docs/doxygen/html/managerforms_8cpp.html new file mode 100644 index 0000000..5494519 --- /dev/null +++ b/docs/doxygen/html/managerforms_8cpp.html @@ -0,0 +1,171 @@ + + + + + + + +My Project: client/managerforms.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
managerforms.cpp File Reference
+
+
+
#include "managerforms.h"
+
+Include dependency graph for managerforms.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/managerforms_8cpp__incl.dot b/docs/doxygen/html/managerforms_8cpp__incl.dot new file mode 100644 index 0000000..c2487fa --- /dev/null +++ b/docs/doxygen/html/managerforms_8cpp__incl.dot @@ -0,0 +1,51 @@ +digraph "client/managerforms.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/managerforms.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge5_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge6_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node7 -> Node3 [id="edge7_Node000007_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node7 -> Node8 [id="edge8_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node8 -> Node9 [id="edge9_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node10 [id="edge10_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node10 -> Node11 [id="edge11_Node000010_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node12 [id="edge12_Node000010_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node13 [id="edge13_Node000010_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node14 [id="edge14_Node000010_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node15 [id="edge15_Node000010_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node16 [id="edge16_Node000010_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node17 [id="edge17_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node17 -> Node3 [id="edge18_Node000017_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node8 [id="edge19_Node000017_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node18 [id="edge20_Node000017_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node18 -> Node5 [id="edge21_Node000018_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node19 [id="edge22_Node000017_Node000019",color="steelblue1",style="solid",tooltip=" "]; + Node19 [id="Node000019",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node19 -> Node5 [id="edge23_Node000019_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node6 [id="edge24_Node000017_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node2 -> Node10 [id="edge25_Node000002_Node000010",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/html/managerforms_8cpp__incl.map b/docs/doxygen/html/managerforms_8cpp__incl.map new file mode 100644 index 0000000..4e86299 --- /dev/null +++ b/docs/doxygen/html/managerforms_8cpp__incl.map @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/managerforms_8cpp__incl.md5 b/docs/doxygen/html/managerforms_8cpp__incl.md5 new file mode 100644 index 0000000..9bf83bf --- /dev/null +++ b/docs/doxygen/html/managerforms_8cpp__incl.md5 @@ -0,0 +1 @@ +749e86fbd151d54a326c25e508f82302 \ No newline at end of file diff --git a/docs/doxygen/html/managerforms_8cpp__incl.png b/docs/doxygen/html/managerforms_8cpp__incl.png new file mode 100644 index 0000000..1d63b4e Binary files /dev/null and b/docs/doxygen/html/managerforms_8cpp__incl.png differ diff --git a/docs/doxygen/html/managerforms_8h.html b/docs/doxygen/html/managerforms_8h.html new file mode 100644 index 0000000..9303e82 --- /dev/null +++ b/docs/doxygen/html/managerforms_8h.html @@ -0,0 +1,204 @@ + + + + + + + +My Project: client/managerforms.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
managerforms.h File Reference
+
+
+
#include <QMainWindow>
+#include "add_product.h"
+#include "authregwindow.h"
+#include "mainwindow.h"
+#include "Singleton.h"
+
+Include dependency graph for managerforms.h:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  ManagerForms
 Класс для управления окнами приложения. More...
 
+ + + +

+Namespaces

namespace  Ui
 
+
+
+ + + + diff --git a/docs/doxygen/html/managerforms_8h.js b/docs/doxygen/html/managerforms_8h.js new file mode 100644 index 0000000..0ffb424 --- /dev/null +++ b/docs/doxygen/html/managerforms_8h.js @@ -0,0 +1,4 @@ +var managerforms_8h = +[ + [ "ManagerForms", "class_manager_forms.html", "class_manager_forms" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/managerforms_8h__dep__incl.dot b/docs/doxygen/html/managerforms_8h__dep__incl.dot new file mode 100644 index 0000000..9106aa6 --- /dev/null +++ b/docs/doxygen/html/managerforms_8h__dep__incl.dot @@ -0,0 +1,14 @@ +digraph "client/managerforms.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/managerforms.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/managerforms_8h__dep__incl.map b/docs/doxygen/html/managerforms_8h__dep__incl.map new file mode 100644 index 0000000..f900483 --- /dev/null +++ b/docs/doxygen/html/managerforms_8h__dep__incl.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/doxygen/html/managerforms_8h__dep__incl.md5 b/docs/doxygen/html/managerforms_8h__dep__incl.md5 new file mode 100644 index 0000000..ebd80ce --- /dev/null +++ b/docs/doxygen/html/managerforms_8h__dep__incl.md5 @@ -0,0 +1 @@ +e2fd053a89004d5cd867c4ec91aefc55 \ No newline at end of file diff --git a/docs/doxygen/html/managerforms_8h__dep__incl.png b/docs/doxygen/html/managerforms_8h__dep__incl.png new file mode 100644 index 0000000..e9156e2 Binary files /dev/null and b/docs/doxygen/html/managerforms_8h__dep__incl.png differ diff --git a/docs/doxygen/html/managerforms_8h__incl.dot b/docs/doxygen/html/managerforms_8h__incl.dot new file mode 100644 index 0000000..86d351d --- /dev/null +++ b/docs/doxygen/html/managerforms_8h__incl.dot @@ -0,0 +1,49 @@ +digraph "client/managerforms.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/managerforms.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge3_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node5 [id="edge4_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node6 -> Node2 [id="edge6_Node000006_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node6 -> Node7 [id="edge7_Node000006_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node7 -> Node8 [id="edge8_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node9 [id="edge9_Node000007_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node9 -> Node10 [id="edge10_Node000009_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node11 [id="edge11_Node000009_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node12 [id="edge12_Node000009_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node13 [id="edge13_Node000009_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node14 [id="edge14_Node000009_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node15 [id="edge15_Node000009_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node16 [id="edge16_Node000001_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node16 -> Node2 [id="edge17_Node000016_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node16 -> Node7 [id="edge18_Node000016_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node16 -> Node17 [id="edge19_Node000016_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node17 -> Node4 [id="edge20_Node000017_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node16 -> Node18 [id="edge21_Node000016_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node18 -> Node4 [id="edge22_Node000018_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node16 -> Node5 [id="edge23_Node000016_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node9 [id="edge24_Node000001_Node000009",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/html/managerforms_8h__incl.map b/docs/doxygen/html/managerforms_8h__incl.map new file mode 100644 index 0000000..1e74c69 --- /dev/null +++ b/docs/doxygen/html/managerforms_8h__incl.map @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/managerforms_8h__incl.md5 b/docs/doxygen/html/managerforms_8h__incl.md5 new file mode 100644 index 0000000..deec84e --- /dev/null +++ b/docs/doxygen/html/managerforms_8h__incl.md5 @@ -0,0 +1 @@ +96699feda4d5ae33d9e27981dae76a5e \ No newline at end of file diff --git a/docs/doxygen/html/managerforms_8h__incl.png b/docs/doxygen/html/managerforms_8h__incl.png new file mode 100644 index 0000000..f08e980 Binary files /dev/null and b/docs/doxygen/html/managerforms_8h__incl.png differ diff --git a/docs/doxygen/html/managerforms_8h_source.html b/docs/doxygen/html/managerforms_8h_source.html new file mode 100644 index 0000000..22ec4ce --- /dev/null +++ b/docs/doxygen/html/managerforms_8h_source.html @@ -0,0 +1,163 @@ + + + + + + + +My Project: client/managerforms.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
managerforms.h
+
+
+Go to the documentation of this file.
1#ifndef MANAGERFORMS_H
+
2#define MANAGERFORMS_H
+
3
+
4#include <QMainWindow>
+
5#include "add_product.h"
+
6#include "authregwindow.h"
+
7#include "mainwindow.h"
+
8#include "Singleton.h"
+
9
+
10namespace Ui {
+
11 class ManagerForms;
+
12}
+
13
+
+
20class ManagerForms : public QMainWindow
+
21{
+
22 Q_OBJECT
+
23
+
24public:
+
29 explicit ManagerForms(QWidget *parent = nullptr);
+
30
+ +
35
+
36private:
+ + + +
40};
+
+
41
+
42#endif // MANAGERFORMS_H
+ + + +
Класс окна для добавления нового продукта.
Definition add_product.h:18
+
Класс окна авторизации и регистрации.
Definition authregwindow.h:20
+
Главное окно клиента.
Definition mainwindow.h:21
+
ManagerForms(QWidget *parent=nullptr)
Конструктор класса ManagerForms.
Definition managerforms.cpp:3
+
AuthRegWindow * curr_auth
Указатель на окно авторизации и регистрации.
Definition managerforms.h:37
+
AddProductWindow * addProductWindow
Указатель на окно добавления продукта.
Definition managerforms.h:39
+
MainWindow * main
Указатель на главное окно приложения.
Definition managerforms.h:38
+
~ManagerForms()
Деструктор.
Definition managerforms.cpp:17
+ +
Definition add_product.h:7
+
+
+ + + + diff --git a/docs/doxygen/html/menu_card_8h.html b/docs/doxygen/html/menu_card_8h.html new file mode 100644 index 0000000..bd23649 --- /dev/null +++ b/docs/doxygen/html/menu_card_8h.html @@ -0,0 +1,170 @@ + + + + + + + +My Project: client/menuCard.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
menuCard.h File Reference
+
+
+
#include <QWidget>
+
+Include dependency graph for menuCard.h:
+
+
+ + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  menuCard
 Виджет отображения информации о рационе питания. More...
 
+ + + +

+Namespaces

namespace  Ui
 
+
+
+ + + + diff --git a/docs/doxygen/html/menu_card_8h.js b/docs/doxygen/html/menu_card_8h.js new file mode 100644 index 0000000..8a2ce11 --- /dev/null +++ b/docs/doxygen/html/menu_card_8h.js @@ -0,0 +1,4 @@ +var menu_card_8h = +[ + [ "menuCard", "classmenu_card.html", "classmenu_card" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/menu_card_8h__dep__incl.dot b/docs/doxygen/html/menu_card_8h__dep__incl.dot new file mode 100644 index 0000000..0970f25 --- /dev/null +++ b/docs/doxygen/html/menu_card_8h__dep__incl.dot @@ -0,0 +1,23 @@ +digraph "client/menuCard.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/menuCard.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node2 -> Node5 [id="edge4_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node5 -> Node3 [id="edge5_Node000005_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 -> Node6 [id="edge6_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node5 -> Node7 [id="edge7_Node000005_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; + Node1 -> Node8 [id="edge8_Node000001_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="client/menucard.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menucard_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/menu_card_8h__dep__incl.map b/docs/doxygen/html/menu_card_8h__dep__incl.map new file mode 100644 index 0000000..e1e90fc --- /dev/null +++ b/docs/doxygen/html/menu_card_8h__dep__incl.map @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/menu_card_8h__dep__incl.md5 b/docs/doxygen/html/menu_card_8h__dep__incl.md5 new file mode 100644 index 0000000..257eb4b --- /dev/null +++ b/docs/doxygen/html/menu_card_8h__dep__incl.md5 @@ -0,0 +1 @@ +cd0d0309c6ba4dde849d88cc6460d142 \ No newline at end of file diff --git a/docs/doxygen/html/menu_card_8h__dep__incl.png b/docs/doxygen/html/menu_card_8h__dep__incl.png new file mode 100644 index 0000000..00457b9 Binary files /dev/null and b/docs/doxygen/html/menu_card_8h__dep__incl.png differ diff --git a/docs/doxygen/html/menu_card_8h__incl.dot b/docs/doxygen/html/menu_card_8h__incl.dot new file mode 100644 index 0000000..fa52d7b --- /dev/null +++ b/docs/doxygen/html/menu_card_8h__incl.dot @@ -0,0 +1,10 @@ +digraph "client/menuCard.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/menuCard.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/menu_card_8h__incl.map b/docs/doxygen/html/menu_card_8h__incl.map new file mode 100644 index 0000000..b22fc91 --- /dev/null +++ b/docs/doxygen/html/menu_card_8h__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/menu_card_8h__incl.md5 b/docs/doxygen/html/menu_card_8h__incl.md5 new file mode 100644 index 0000000..f55a07d --- /dev/null +++ b/docs/doxygen/html/menu_card_8h__incl.md5 @@ -0,0 +1 @@ +89ed3be9883a248468aaa4976f6c2285 \ No newline at end of file diff --git a/docs/doxygen/html/menu_card_8h__incl.png b/docs/doxygen/html/menu_card_8h__incl.png new file mode 100644 index 0000000..b1f61da Binary files /dev/null and b/docs/doxygen/html/menu_card_8h__incl.png differ diff --git a/docs/doxygen/html/menu_card_8h_source.html b/docs/doxygen/html/menu_card_8h_source.html new file mode 100644 index 0000000..2a710fc --- /dev/null +++ b/docs/doxygen/html/menu_card_8h_source.html @@ -0,0 +1,148 @@ + + + + + + + +My Project: client/menuCard.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
menuCard.h
+
+
+Go to the documentation of this file.
1#ifndef MENUCARD_H
+
2#define MENUCARD_H
+
3
+
4#include <QWidget>
+
5
+
6namespace Ui {
+
7class menuCard;
+
8}
+
9
+
+
16class menuCard : public QWidget
+
17{
+
18 Q_OBJECT
+
19
+
20public:
+
31 explicit menuCard(QString day, QStringList products, int calories, QVector<int>& pfc, int weight, int price, QWidget *parent = nullptr);
+
32
+
36 ~menuCard();
+
37
+
38private:
+
39 Ui::menuCard *ui;
+
40};
+
+
41
+
42#endif // MENUCARD_H
+
menuCard(QString day, QStringList products, int calories, QVector< int > &pfc, int weight, int price, QWidget *parent=nullptr)
Конструктор виджета menuCard.
Definition menucard.cpp:10
+
Ui::menuCard * ui
UI-компоненты, сгенерированные Qt Designer.
Definition menuCard.h:39
+
~menuCard()
Деструктор.
Definition menucard.cpp:51
+
Definition add_product.h:7
+
+
+ + + + diff --git a/docs/doxygen/html/menucard_8cpp.html b/docs/doxygen/html/menucard_8cpp.html new file mode 100644 index 0000000..0058270 --- /dev/null +++ b/docs/doxygen/html/menucard_8cpp.html @@ -0,0 +1,135 @@ + + + + + + + +My Project: client/menucard.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
menucard.cpp File Reference
+
+
+
#include "menuCard.h"
+#include "ui_menuCard.h"
+
+Include dependency graph for menucard.cpp:
+
+
+ + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/menucard_8cpp__incl.dot b/docs/doxygen/html/menucard_8cpp__incl.dot new file mode 100644 index 0000000..976af1a --- /dev/null +++ b/docs/doxygen/html/menucard_8cpp__incl.dot @@ -0,0 +1,14 @@ +digraph "client/menucard.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/menucard.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="ui_menuCard.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/menucard_8cpp__incl.map b/docs/doxygen/html/menucard_8cpp__incl.map new file mode 100644 index 0000000..656672a --- /dev/null +++ b/docs/doxygen/html/menucard_8cpp__incl.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/doxygen/html/menucard_8cpp__incl.md5 b/docs/doxygen/html/menucard_8cpp__incl.md5 new file mode 100644 index 0000000..0ec9bcc --- /dev/null +++ b/docs/doxygen/html/menucard_8cpp__incl.md5 @@ -0,0 +1 @@ +9a5be55b7730ac8a4800e1f3dc34991e \ No newline at end of file diff --git a/docs/doxygen/html/menucard_8cpp__incl.png b/docs/doxygen/html/menucard_8cpp__incl.png new file mode 100644 index 0000000..2c9f712 Binary files /dev/null and b/docs/doxygen/html/menucard_8cpp__incl.png differ diff --git a/docs/doxygen/html/minus.svg b/docs/doxygen/html/minus.svg new file mode 100644 index 0000000..f70d0c1 --- /dev/null +++ b/docs/doxygen/html/minus.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/doxygen/html/minusd.svg b/docs/doxygen/html/minusd.svg new file mode 100644 index 0000000..5f8e879 --- /dev/null +++ b/docs/doxygen/html/minusd.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/doxygen/html/mytcpserver_8cpp.html b/docs/doxygen/html/mytcpserver_8cpp.html new file mode 100644 index 0000000..75b7629 --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8cpp.html @@ -0,0 +1,157 @@ + + + + + + + +My Project: server/mytcpserver.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mytcpserver.cpp File Reference
+
+
+
#include "mytcpserver.h"
+#include <QDebug>
+#include <QCoreApplication>
+#include <QString>
+#include "func2serv.h"
+
+Include dependency graph for mytcpserver.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/mytcpserver_8cpp__incl.dot b/docs/doxygen/html/mytcpserver_8cpp__incl.dot new file mode 100644 index 0000000..9986274 --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8cpp__incl.dot @@ -0,0 +1,33 @@ +digraph "server/mytcpserver.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/mytcpserver.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="mytcpserver.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QTcpServer",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node5 [id="edge4_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node6 [id="edge5_Node000002_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge6_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node8 [id="edge7_Node000002_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node9 [id="edge8_Node000002_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node8 [id="edge9_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node10 [id="edge10_Node000001_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QCoreApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node11 [id="edge11_Node000001_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node12 [id="edge12_Node000001_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="func2serv.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$func2serv_8h.html",tooltip=" "]; + Node12 -> Node7 [id="edge13_Node000012_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node12 -> Node8 [id="edge14_Node000012_Node000008",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/html/mytcpserver_8cpp__incl.map b/docs/doxygen/html/mytcpserver_8cpp__incl.map new file mode 100644 index 0000000..dddc42a --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8cpp__incl.map @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/mytcpserver_8cpp__incl.md5 b/docs/doxygen/html/mytcpserver_8cpp__incl.md5 new file mode 100644 index 0000000..8bb7f9a --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8cpp__incl.md5 @@ -0,0 +1 @@ +f22f3cd8041d540bced8b0973b81e53e \ No newline at end of file diff --git a/docs/doxygen/html/mytcpserver_8cpp__incl.png b/docs/doxygen/html/mytcpserver_8cpp__incl.png new file mode 100644 index 0000000..fb03fd6 Binary files /dev/null and b/docs/doxygen/html/mytcpserver_8cpp__incl.png differ diff --git a/docs/doxygen/html/mytcpserver_8h.html b/docs/doxygen/html/mytcpserver_8h.html new file mode 100644 index 0000000..ab4934b --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h.html @@ -0,0 +1,170 @@ + + + + + + + +My Project: server/mytcpserver.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
mytcpserver.h File Reference
+
+
+
#include <QObject>
+#include <QTcpServer>
+#include <QTcpSocket>
+#include <QtNetwork>
+#include <QByteArray>
+#include <QDebug>
+#include <QMap>
+
+Include dependency graph for mytcpserver.h:
+
+
+ + + + + + + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + +
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  MyTcpServer
 
+
+
+ + + + diff --git a/docs/doxygen/html/mytcpserver_8h.js b/docs/doxygen/html/mytcpserver_8h.js new file mode 100644 index 0000000..bf548a4 --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h.js @@ -0,0 +1,4 @@ +var mytcpserver_8h = +[ + [ "MyTcpServer", "class_my_tcp_server.html", "class_my_tcp_server" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/mytcpserver_8h__dep__incl.dot b/docs/doxygen/html/mytcpserver_8h__dep__incl.dot new file mode 100644 index 0000000..47a3c27 --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h__dep__incl.dot @@ -0,0 +1,12 @@ +digraph "server/mytcpserver.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/mytcpserver.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="server/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$server_2main_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="server/mytcpserver.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/mytcpserver_8h__dep__incl.map b/docs/doxygen/html/mytcpserver_8h__dep__incl.map new file mode 100644 index 0000000..9c450f5 --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h__dep__incl.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/doxygen/html/mytcpserver_8h__dep__incl.md5 b/docs/doxygen/html/mytcpserver_8h__dep__incl.md5 new file mode 100644 index 0000000..976d450 --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h__dep__incl.md5 @@ -0,0 +1 @@ +922bf26ecc48ba7fa3da309bc7839a4a \ No newline at end of file diff --git a/docs/doxygen/html/mytcpserver_8h__dep__incl.png b/docs/doxygen/html/mytcpserver_8h__dep__incl.png new file mode 100644 index 0000000..7f47353 Binary files /dev/null and b/docs/doxygen/html/mytcpserver_8h__dep__incl.png differ diff --git a/docs/doxygen/html/mytcpserver_8h__incl.dot b/docs/doxygen/html/mytcpserver_8h__incl.dot new file mode 100644 index 0000000..fe119db --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h__incl.dot @@ -0,0 +1,22 @@ +digraph "server/mytcpserver.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/mytcpserver.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QTcpServer",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge6_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node8 [id="edge7_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/mytcpserver_8h__incl.map b/docs/doxygen/html/mytcpserver_8h__incl.map new file mode 100644 index 0000000..f7f291f --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h__incl.map @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/mytcpserver_8h__incl.md5 b/docs/doxygen/html/mytcpserver_8h__incl.md5 new file mode 100644 index 0000000..f1edb9e --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h__incl.md5 @@ -0,0 +1 @@ +b3c7bd6c6d2471a43b651b34423c262c \ No newline at end of file diff --git a/docs/doxygen/html/mytcpserver_8h__incl.png b/docs/doxygen/html/mytcpserver_8h__incl.png new file mode 100644 index 0000000..b6849c8 Binary files /dev/null and b/docs/doxygen/html/mytcpserver_8h__incl.png differ diff --git a/docs/doxygen/html/mytcpserver_8h_source.html b/docs/doxygen/html/mytcpserver_8h_source.html new file mode 100644 index 0000000..fe2b0d3 --- /dev/null +++ b/docs/doxygen/html/mytcpserver_8h_source.html @@ -0,0 +1,162 @@ + + + + + + + +My Project: server/mytcpserver.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mytcpserver.h
+
+
+Go to the documentation of this file.
1#ifndef MYTCPSERVER_H
+
2#define MYTCPSERVER_H
+
3#include <QObject>
+
4#include <QTcpServer>
+
5#include <QTcpSocket>
+
6#include <QtNetwork>
+
7#include <QByteArray>
+
8#include <QDebug>
+
9#include <QMap>
+
10
+
+
11class MyTcpServer : public QObject
+
12{
+
13 Q_OBJECT
+
14public:
+
15 explicit MyTcpServer(QObject *parent = nullptr);
+
16 ~MyTcpServer();
+
17
+
18public slots:
+
22 void slotNewConnection();
+
23
+ +
28
+
32 void slotServerRead();
+
33
+
34private:
+
35 QTcpServer * mTcpServer;
+
36 QTcpSocket * mTcpSocket;
+ +
38 QMap<int, QTcpSocket*> mSocketDescriptors;
+
39};
+
+
40
+
41#endif // MYTCPSERVER_H
+
void slotNewConnection()
Слот для обработки нового подключения.
Definition mytcpserver.cpp:28
+
void slotClientDisconnected()
Слот для обработки отключения клиента.
Definition mytcpserver.cpp:61
+
QTcpServer * mTcpServer
Сервер для обработки TCP-соединений
Definition mytcpserver.h:35
+
QMap< int, QTcpSocket * > mSocketDescriptors
Хранение дескрипторов сокетов
Definition mytcpserver.h:38
+
~MyTcpServer()
Деструктор
Definition mytcpserver.cpp:7
+
void slotServerRead()
Слот для чтения данных от клиента.
Definition mytcpserver.cpp:49
+
QTcpSocket * mTcpSocket
Сокет для взаимодействия с клиентом
Definition mytcpserver.h:36
+
MyTcpServer(QObject *parent=nullptr)
Конструктор
Definition mytcpserver.cpp:14
+
int server_status
Статус сервера
Definition mytcpserver.h:37
+
+
+ + + + diff --git a/docs/doxygen/html/namespace_ui.html b/docs/doxygen/html/namespace_ui.html new file mode 100644 index 0000000..0bbfa5f --- /dev/null +++ b/docs/doxygen/html/namespace_ui.html @@ -0,0 +1,119 @@ + + + + + + + +My Project: Ui Namespace Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Ui Namespace Reference
+
+
+
+
+ + + + diff --git a/docs/doxygen/html/namespaces.html b/docs/doxygen/html/namespaces.html new file mode 100644 index 0000000..c552f48 --- /dev/null +++ b/docs/doxygen/html/namespaces.html @@ -0,0 +1,123 @@ + + + + + + + +My Project: Namespace List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Namespace List
+
+
+
Here is a list of all namespaces with brief descriptions:
+ + +
 NUi
+
+
+
+ + + + diff --git a/docs/doxygen/html/namespaces_dup.js b/docs/doxygen/html/namespaces_dup.js new file mode 100644 index 0000000..39e604b --- /dev/null +++ b/docs/doxygen/html/namespaces_dup.js @@ -0,0 +1,4 @@ +var namespaces_dup = +[ + [ "Ui", "namespace_ui.html", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/nav_g.png b/docs/doxygen/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/docs/doxygen/html/nav_g.png differ diff --git a/docs/doxygen/html/navtree.css b/docs/doxygen/html/navtree.css new file mode 100644 index 0000000..69211d4 --- /dev/null +++ b/docs/doxygen/html/navtree.css @@ -0,0 +1,149 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: var(--nav-text-active-color); + text-shadow: var(--nav-text-active-shadow); +} + +#nav-tree .selected .arrow { + color: var(--nav-arrow-selected-color); + text-shadow: none; +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px var(--font-family-nav); +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:var(--nav-text-active-color); +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: $width; + overflow : hidden; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:var(--nav-splitbar-image); + background-size:100%; + background-repeat:repeat-y; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-repeat:repeat-x; + background-color: var(--nav-background-color); + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/docs/doxygen/html/navtree.js b/docs/doxygen/html/navtree.js new file mode 100644 index 0000000..2d4fa84 --- /dev/null +++ b/docs/doxygen/html/navtree.js @@ -0,0 +1,483 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function initNavTree(toroot,relpath) { + let navTreeSubIndices = []; + const ARROW_DOWN = '▼'; + const ARROW_RIGHT = '►'; + const NAVPATH_COOKIE_NAME = ''+'navpath'; + + const getData = function(varName) { + const i = varName.lastIndexOf('/'); + const n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/-/g,'_')); + } + + const stripPath = function(uri) { + return uri.substring(uri.lastIndexOf('/')+1); + } + + const stripPath2 = function(uri) { + const i = uri.lastIndexOf('/'); + const s = uri.substring(i+1); + const m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; + } + + const hashValue = function() { + return $(location).attr('hash').substring(1).replace(/[^\w-]/g,''); + } + + const hashUrl = function() { + return '#'+hashValue(); + } + + const pathName = function() { + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;()]/g, ''); + } + + const storeLink = function(link) { + if (!$("#nav-sync").hasClass('sync')) { + Cookie.writeSetting(NAVPATH_COOKIE_NAME,link,0); + } + } + + const deleteLink = function() { + Cookie.eraseSetting(NAVPATH_COOKIE_NAME); + } + + const cachedLink = function() { + return Cookie.readSetting(NAVPATH_COOKIE_NAME,''); + } + + const getScript = function(scriptName,func) { + const head = document.getElementsByTagName("head")[0]; + const script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); + } + + const createIndent = function(o,domNode,node) { + let level=-1; + let n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + const imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=ARROW_RIGHT; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=ARROW_RIGHT; + node.expanded = false; + } else { + expandNode(o, node, false, true); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + let span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } + } + + let animationInProgress = false; + + const gotoAnchor = function(anchor,aname) { + let pos, docContent = $('#doc-content'); + let ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || ancParent.hasClass('fieldtype') || + ancParent.is(':header')) { + pos = ancParent.offset().top; + } else if (anchor.position()) { + pos = anchor.offset().top; + } + if (pos) { + const dcOffset = docContent.offset().top; + const dcHeight = docContent.height(); + const dcScrHeight = docContent[0].scrollHeight + const dcScrTop = docContent.scrollTop(); + let dist = Math.abs(Math.min(pos-dcOffset,dcScrHeight-dcHeight-dcScrTop)); + animationInProgress = true; + docContent.animate({ + scrollTop: pos + dcScrTop - dcOffset + },Math.max(50,Math.min(500,dist)),function() { + animationInProgress=false; + if (anchor.parent().attr('class')=='memItemLeft') { + let rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname') { + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype') { + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + }); + } + } + + const newNode = function(o, po, text, link, childrenData, lastNode) { + const node = { + children : [], + childrenData : childrenData, + depth : po.depth + 1, + relpath : po.relpath, + isLast : lastNode, + li : document.createElement("li"), + parentNode : po, + itemDiv : document.createElement("div"), + labelSpan : document.createElement("span"), + label : document.createTextNode(text), + expanded : false, + childrenUL : null, + getChildrenUL : function() { + if (!this.childrenUL) { + this.childrenUL = document.createElement("ul"); + this.childrenUL.className = "children_ul"; + this.childrenUL.style.display = "none"; + this.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }, + }; + + node.itemDiv.className = "item"; + node.labelSpan.className = "label"; + createIndent(o,node.itemDiv,node); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + const a = document.createElement("a"); + node.labelSpan.appendChild(a); + po.getChildrenUL().appendChild(node.li); + a.appendChild(node.label); + if (link) { + let url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + const aname = '#'+link.split('#')[1]; + const srcPage = stripPath(pathName()); + const targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : aname; + a.onclick = function() { + storeLink(link); + aPPar = $(a).parent().parent(); + if (!aPPar.hasClass('selected')) { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + aPPar.addClass('selected'); + aPPar.attr('id','selected'); + } + const anchor = $(aname); + gotoAnchor(anchor,aname); + }; + } else { + a.href = url; + a.onclick = () => storeLink(link); + } + } else if (childrenData != null) { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + return node; + } + + const showRoot = function() { + const headerHeight = $("#top").height(); + const footerHeight = $("#nav-path").height(); + const windowHeight = $(window).height() - headerHeight - footerHeight; + (function() { // retry until we can scroll to the selected item + try { + const navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); + } + + const expandNode = function(o, node, imm, setFocus) { + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + const varName = node.childrenData; + getScript(node.relpath+varName,function() { + node.childrenData = getData(varName); + expandNode(o, node, imm, setFocus); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = ARROW_DOWN; + node.expanded = true; + if (setFocus) { + $(node.expandToggle).focus(); + } + } + } + } + + const glowEffect = function(n,duration) { + n.addClass('glow').delay(duration).queue(function(next) { + $(this).removeClass('glow');next(); + }); + } + + const highlightAnchor = function() { + const aname = hashUrl(); + const anchor = $(aname); + gotoAnchor(anchor,aname); + } + + const selectAndHighlight = function(hash,n) { + let a; + if (hash) { + const link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + let topOffset=5; + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + topOffset+=25; + } + $('#nav-sync').css('top',topOffset+'px'); + showRoot(); + } + + const showNode = function(o, node, index, hash) { + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + const varName = node.childrenData; + getScript(node.relpath+varName,function() { + node.childrenData = getData(varName); + showNode(o,node,index,hash); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = ARROW_DOWN; + node.expanded = true; + const n = node.children[o.breadcrumbs[index]]; + if (index+11 ? '#'+parts[1].replace(/[^\w-]/g,'') : ''; + } + if (hash.match(/^#l\d+$/)) { + const anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + const url=root+hash; + let i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function() { + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + }); + } + } + + const showSyncOff = function(n,relpath) { + n.html(''); + } + + const showSyncOn = function(n,relpath) { + n.html(''); + } + + const o = { + toroot : toroot, + node : { + childrenData : NAVTREE, + children : [], + childrenUL : document.createElement("ul"), + getChildrenUL : function() { return this.childrenUL }, + li : document.getElementById("nav-tree-contents"), + depth : 0, + relpath : relpath, + expanded : false, + isLast : true, + plus_img : document.createElement("span"), + }, + }; + o.node.li.appendChild(o.node.childrenUL); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = ARROW_RIGHT; + + const navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + + navSync.click(() => { + const navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } + }); + + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + + $(window).bind('hashchange', () => { + if (!animationInProgress) { + if (window.location.hash && window.location.hash.length>1) { + let a; + if ($(location).attr('hash')) { + const clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + + + + + + + diff --git a/docs/doxygen/html/plusd.svg b/docs/doxygen/html/plusd.svg new file mode 100644 index 0000000..0c65bfe --- /dev/null +++ b/docs/doxygen/html/plusd.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/doxygen/html/product_card_8cpp.html b/docs/doxygen/html/product_card_8cpp.html new file mode 100644 index 0000000..b1e5ad0 --- /dev/null +++ b/docs/doxygen/html/product_card_8cpp.html @@ -0,0 +1,138 @@ + + + + + + + +My Project: client/productCard.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
productCard.cpp File Reference
+
+
+
#include "ProductCard.h"
+#include <QVBoxLayout>
+#include <QLabel>
+
+Include dependency graph for productCard.cpp:
+
+
+ + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/doxygen/html/product_card_8cpp__incl.dot b/docs/doxygen/html/product_card_8cpp__incl.dot new file mode 100644 index 0000000..49965e8 --- /dev/null +++ b/docs/doxygen/html/product_card_8cpp__incl.dot @@ -0,0 +1,16 @@ +digraph "client/productCard.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/productCard.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="ProductCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QVBoxLayout",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QLabel",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/product_card_8cpp__incl.map b/docs/doxygen/html/product_card_8cpp__incl.map new file mode 100644 index 0000000..afcd262 --- /dev/null +++ b/docs/doxygen/html/product_card_8cpp__incl.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/doxygen/html/product_card_8cpp__incl.md5 b/docs/doxygen/html/product_card_8cpp__incl.md5 new file mode 100644 index 0000000..39e0b8f --- /dev/null +++ b/docs/doxygen/html/product_card_8cpp__incl.md5 @@ -0,0 +1 @@ +59ca509308704ed3cece55bc1a3aa5ab \ No newline at end of file diff --git a/docs/doxygen/html/product_card_8cpp__incl.png b/docs/doxygen/html/product_card_8cpp__incl.png new file mode 100644 index 0000000..77740d7 Binary files /dev/null and b/docs/doxygen/html/product_card_8cpp__incl.png differ diff --git a/docs/doxygen/html/product_card_8h.html b/docs/doxygen/html/product_card_8h.html new file mode 100644 index 0000000..e8ca7eb --- /dev/null +++ b/docs/doxygen/html/product_card_8h.html @@ -0,0 +1,164 @@ + + + + + + + +My Project: client/productCard.h File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
productCard.h File Reference
+
+
+
#include <QWidget>
+
+Include dependency graph for productCard.h:
+
+
+ + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  productCard
 Виджет карточки продукта. More...
 
+
+
+ + + + diff --git a/docs/doxygen/html/product_card_8h.js b/docs/doxygen/html/product_card_8h.js new file mode 100644 index 0000000..d53cf79 --- /dev/null +++ b/docs/doxygen/html/product_card_8h.js @@ -0,0 +1,4 @@ +var product_card_8h = +[ + [ "productCard", "classproduct_card.html", "classproduct_card" ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/product_card_8h__dep__incl.dot b/docs/doxygen/html/product_card_8h__dep__incl.dot new file mode 100644 index 0000000..776e78a --- /dev/null +++ b/docs/doxygen/html/product_card_8h__dep__incl.dot @@ -0,0 +1,23 @@ +digraph "client/productCard.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/productCard.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node2 -> Node5 [id="edge4_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node5 -> Node3 [id="edge5_Node000005_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 -> Node6 [id="edge6_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node5 -> Node7 [id="edge7_Node000005_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; + Node1 -> Node8 [id="edge8_Node000001_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="client/productCard.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/html/product_card_8h__dep__incl.map b/docs/doxygen/html/product_card_8h__dep__incl.map new file mode 100644 index 0000000..d00f2dc --- /dev/null +++ b/docs/doxygen/html/product_card_8h__dep__incl.map @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/product_card_8h__dep__incl.md5 b/docs/doxygen/html/product_card_8h__dep__incl.md5 new file mode 100644 index 0000000..9edd676 --- /dev/null +++ b/docs/doxygen/html/product_card_8h__dep__incl.md5 @@ -0,0 +1 @@ +64ebf805f70e6da84c60cab5270fb103 \ No newline at end of file diff --git a/docs/doxygen/html/product_card_8h__dep__incl.png b/docs/doxygen/html/product_card_8h__dep__incl.png new file mode 100644 index 0000000..21c6b8d Binary files /dev/null and b/docs/doxygen/html/product_card_8h__dep__incl.png differ diff --git a/docs/doxygen/html/product_card_8h__incl.dot b/docs/doxygen/html/product_card_8h__incl.dot new file mode 100644 index 0000000..d022076 --- /dev/null +++ b/docs/doxygen/html/product_card_8h__incl.dot @@ -0,0 +1,10 @@ +digraph "client/productCard.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/productCard.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/product_card_8h__incl.map b/docs/doxygen/html/product_card_8h__incl.map new file mode 100644 index 0000000..43fb325 --- /dev/null +++ b/docs/doxygen/html/product_card_8h__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/doxygen/html/product_card_8h__incl.md5 b/docs/doxygen/html/product_card_8h__incl.md5 new file mode 100644 index 0000000..c1b7a72 --- /dev/null +++ b/docs/doxygen/html/product_card_8h__incl.md5 @@ -0,0 +1 @@ +8287bf3c49bebfe42cff321f0dd1c89c \ No newline at end of file diff --git a/docs/doxygen/html/product_card_8h__incl.png b/docs/doxygen/html/product_card_8h__incl.png new file mode 100644 index 0000000..84d09b5 Binary files /dev/null and b/docs/doxygen/html/product_card_8h__incl.png differ diff --git a/docs/doxygen/html/product_card_8h_source.html b/docs/doxygen/html/product_card_8h_source.html new file mode 100644 index 0000000..065f0f5 --- /dev/null +++ b/docs/doxygen/html/product_card_8h_source.html @@ -0,0 +1,131 @@ + + + + + + + +My Project: client/productCard.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
productCard.h
+
+
+Go to the documentation of this file.
1#pragma once
+
2#include <QWidget>
+
3
+
+
9class productCard : public QWidget {
+
10 Q_OBJECT
+
11
+
12public:
+
22 explicit productCard(QString name, int price, int proteins, int fatness, int carbs, QWidget *parent = nullptr);
+
23};
+
+
productCard(QString name, int price, int proteins, int fatness, int carbs, QWidget *parent=nullptr)
Конструктор карточки продукта.
Definition productCard.cpp:5
+
+
+ + + + diff --git a/docs/doxygen/html/resize.js b/docs/doxygen/html/resize.js new file mode 100644 index 0000000..178d03b --- /dev/null +++ b/docs/doxygen/html/resize.js @@ -0,0 +1,147 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function initResizable(treeview) { + let sidenav,navtree,content,header,footer,barWidth=6; + const RESIZE_COOKIE_NAME = ''+'width'; + + function resizeWidth() { + const sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(sidenavWidth)+"px"}); + } + Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); + } + + function restoreWidth(navWidth) { + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + } + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight(treeview) { + const headerHeight = header.outerHeight(); + const windowHeight = $(window).height(); + let contentHeight; + if (treeview) + { + const footerHeight = footer.outerHeight(); + let navtreeHeight,sideNavHeight; + if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ + contentHeight = windowHeight - headerHeight - footerHeight; + navtreeHeight = contentHeight; + sideNavHeight = contentHeight; + } else if (page_layout==1) { /* DISABLE_INDEX=YES */ + contentHeight = windowHeight - footerHeight; + navtreeHeight = windowHeight - headerHeight; + sideNavHeight = windowHeight; + } + navtree.css({height:navtreeHeight + "px"}); + sidenav.css({height:sideNavHeight + "px"}); + } + else + { + contentHeight = windowHeight - headerHeight; + } + content.css({height:contentHeight + "px"}); + if (location.hash.slice(1)) { + (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); + } + } + + function collapseExpand() { + let newWidth; + if (sidenav.width()>0) { + newWidth=0; + } else { + const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); + newWidth = (width>250 && width<$(window).width()) ? width : 250; + } + restoreWidth(newWidth); + const sidenavWidth = $(sidenav).outerWidth(); + Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); + } + + header = $("#top"); + content = $("#doc-content"); + footer = $("#nav-path"); + sidenav = $("#side-nav"); + if (!treeview) { +// title = $("#titlearea"); +// titleH = $(title).height(); +// let animating = false; +// content.on("scroll", function() { +// slideOpts = { duration: 200, +// step: function() { +// contentHeight = $(window).height() - header.outerHeight(); +// content.css({ height : contentHeight + "px" }); +// }, +// done: function() { animating=false; } +// }; +// if (content.scrollTop()>titleH && title.css('display')!='none' && !animating) { +// title.slideUp(slideOpts); +// animating=true; +// } else if (content.scrollTop()<=titleH && title.css('display')=='none' && !animating) { +// title.slideDown(slideOpts); +// animating=true; +// } +// }); + } else { + navtree = $("#nav-tree"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + } + $(window).resize(function() { resizeHeight(treeview); }); + if (treeview) + { + const device = navigator.userAgent.toLowerCase(); + const touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); + if (width) { restoreWidth(width); } else { resizeWidth(); } + } + resizeHeight(treeview); + const url = location.href; + const i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + const _preventDefault = function(evt) { evt.preventDefault(); }; + if (treeview) + { + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + // workaround for firefox + $("body").css({overflow: "hidden"}); + } + $(window).on('load',function() { resizeHeight(treeview); }); +} +/* @license-end */ diff --git a/docs/doxygen/html/search/all_0.js b/docs/doxygen/html/search/all_0.js new file mode 100644 index 0000000..eefda7c --- /dev/null +++ b/docs/doxygen/html/search/all_0.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['add_5ffavorite_5fration_0',['add_favorite_ration',['../func2serv_8cpp.html#a6496e445a644cca89c6252f6e7adecb0',1,'add_favorite_ration(const QStringList &container): func2serv.cpp'],['../func2serv_8h.html#a6496e445a644cca89c6252f6e7adecb0',1,'add_favorite_ration(const QStringList &container): func2serv.cpp'],['../functions__for__client_8h.html#a6496e445a644cca89c6252f6e7adecb0',1,'add_favorite_ration(const QStringList &container): func2serv.cpp']]], + ['add_5fproduct_1',['add_product',['../class_main_window.html#afa09d58e484be8e5c49e5f5b33f0e3d8',1,'MainWindow::add_product()'],['../func2serv_8cpp.html#a27ffe3af29c8442de4aa94a5e48d2345',1,'add_product(QStringList params): func2serv.cpp'],['../func2serv_8h.html#aea4bc93c1f84d34a05a2c25939dcfaac',1,'add_product(QStringList): func2serv.cpp'],['../functions__for__client_8cpp.html#a48a4f2da0c749370a70323e13422a698',1,'add_product(QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type): functions_for_client.cpp'],['../functions__for__client_8h.html#a48a4f2da0c749370a70323e13422a698',1,'add_product(QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type): functions_for_client.cpp']]], + ['add_5fproduct_2ecpp_2',['add_product.cpp',['../add__product_8cpp.html',1,'']]], + ['add_5fproduct_2eh_3',['add_product.h',['../add__product_8h.html',1,'']]], + ['add_5fration_5fto_5ffavorites_4',['add_ration_to_favorites',['../func2serv_8cpp.html#a064e99d59eaa1d8cccef20b3192df015',1,'add_ration_to_favorites(const QString &userId, const QString &rationId): func2serv.cpp'],['../func2serv_8h.html#a064e99d59eaa1d8cccef20b3192df015',1,'add_ration_to_favorites(const QString &userId, const QString &rationId): func2serv.cpp'],['../functions__for__client_8h.html#a064e99d59eaa1d8cccef20b3192df015',1,'add_ration_to_favorites(const QString &userId, const QString &rationId): func2serv.cpp']]], + ['addfavoriteration_5',['addFavoriteRation',['../class_data_base_singleton.html#a515aed6cbbb34fe71f254943a70d504b',1,'DataBaseSingleton']]], + ['addproduct_6',['addProduct',['../class_data_base_singleton.html#a3fe2a5e1f41a408023066e8caf63b523',1,'DataBaseSingleton']]], + ['addproductwindow_7',['AddProductWindow',['../class_add_product_window.html',1,'AddProductWindow'],['../class_add_product_window.html#a49c10613d21d41f0fdac806935c52ac5',1,'AddProductWindow::AddProductWindow()']]], + ['addproductwindow_8',['addProductWindow',['../class_manager_forms.html#a35e56ed089659370d82a6ede47a35ff0',1,'ManagerForms']]], + ['adduser_9',['addUser',['../class_data_base_singleton.html#af17db97dfc40b0fa48b3ed9abeacca76',1,'DataBaseSingleton']]], + ['auth_10',['auth',['../func2serv_8cpp.html#a173db167f59671d56b49f5d7d11ef531',1,'auth(QStringList log): func2serv.cpp'],['../func2serv_8h.html#acbd6ff747a2b100b8f8da4a9b99d43c7',1,'auth(QStringList): func2serv.cpp'],['../functions__for__client_8cpp.html#af65491b695e43e33df9105ec4d8702b4',1,'auth(QString email, QString password): functions_for_client.cpp'],['../functions__for__client_8h.html#aaeef61cff0ff956865a7521c007e41cc',1,'auth(QString login, QString password): functions_for_client.cpp']]], + ['auth_5fok_11',['auth_ok',['../class_auth_reg_window.html#ae7c7188f7a51b721fa342670262d2faa',1,'AuthRegWindow']]], + ['authregwindow_12',['AuthRegWindow',['../class_auth_reg_window.html',1,'AuthRegWindow'],['../class_auth_reg_window.html#a63d0011acccbecf9228b753146a481c9',1,'AuthRegWindow::AuthRegWindow()']]], + ['authregwindow_2ecpp_13',['authregwindow.cpp',['../authregwindow_8cpp.html',1,'']]], + ['authregwindow_2eh_14',['authregwindow.h',['../authregwindow_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/all_1.js b/docs/doxygen/html/search/all_1.js new file mode 100644 index 0000000..9fc50d7 --- /dev/null +++ b/docs/doxygen/html/search/all_1.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['change_5ftype_5fto_5freg_0',['change_type_to_reg',['../class_auth_reg_window.html#a635ffca6ab9ac9f659d053e56ca47eaf',1,'AuthRegWindow']]], + ['check_5ftask_1',['check_task',['../func2serv_8cpp.html#a6d4386c36a7ed61c61cf3d1bad354f27',1,'check_task(): func2serv.cpp'],['../func2serv_8h.html#a6d4386c36a7ed61c61cf3d1bad354f27',1,'check_task(): func2serv.cpp'],['../functions__for__client_8h.html#a6d4386c36a7ed61c61cf3d1bad354f27',1,'check_task(): func2serv.cpp']]], + ['checkusercredentials_2',['checkUserCredentials',['../class_data_base_singleton.html#a51bd7dc4507c5f3d04a2903899e13d42',1,'DataBaseSingleton']]], + ['clear_3',['clear',['../class_add_product_window.html#ac12c9b053c1c61820ffb11b4be8a9b4c',1,'AddProductWindow::clear()'],['../class_auth_reg_window.html#a7a94b51b7d506acd94390e2663b5baa0',1,'AuthRegWindow::clear()']]], + ['clientsingleton_4',['ClientSingleton',['../class_client_singleton.html',1,'ClientSingleton'],['../class_client_singleton.html#a57646cacb9dca62e898d284eeda9a149',1,'ClientSingleton::ClientSingleton()'],['../class_client_singleton.html#a8c1320c8b92c5c48a5ece0c9706ecc7e',1,'ClientSingleton::ClientSingleton(const ClientSingleton &)=delete']]], + ['clientsingletondestroyer_5',['ClientSingletonDestroyer',['../class_client_singleton_destroyer.html',1,'ClientSingletonDestroyer'],['../class_client_singleton.html#a9c2e5f87a0557168f05d25189a9da384',1,'ClientSingleton::ClientSingletonDestroyer()']]], + ['curr_5fauth_6',['curr_auth',['../class_manager_forms.html#a30b01a09a0e1859c5c934d77280249c8',1,'ManagerForms']]] +]; diff --git a/docs/doxygen/html/search/all_2.js b/docs/doxygen/html/search/all_2.js new file mode 100644 index 0000000..76edaf8 --- /dev/null +++ b/docs/doxygen/html/search/all_2.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['databasesingleton_0',['DataBaseSingleton',['../class_data_base_singleton.html',1,'DataBaseSingleton'],['../class_data_base_singleton.html#aa289e69de3195fef9593052246b9b1b0',1,'DataBaseSingleton::DataBaseSingleton()'],['../class_data_base_singleton.html#abe02a9a0f33a2664ba969d20d777d4d9',1,'DataBaseSingleton::DataBaseSingleton(const DataBaseSingleton &)=delete']]], + ['databasesingleton_2ecpp_1',['databasesingleton.cpp',['../databasesingleton_8cpp.html',1,'']]], + ['databasesingleton_2eh_2',['databasesingleton.h',['../databasesingleton_8h.html',1,'']]], + ['db_3',['db',['../class_data_base_singleton.html#a929da7bbfe9e068b4c3bc5a095e6156a',1,'DataBaseSingleton']]], + ['destroyer_4',['destroyer',['../class_data_base_singleton.html#a414f1ff51603535a839d5fc2e24b65e0',1,'DataBaseSingleton::destroyer'],['../class_client_singleton.html#a58182cf45d3ad789fd78ba39eba6121e',1,'ClientSingleton::destroyer']]] +]; diff --git a/docs/doxygen/html/search/all_3.js b/docs/doxygen/html/search/all_3.js new file mode 100644 index 0000000..066142b --- /dev/null +++ b/docs/doxygen/html/search/all_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['email_0',['email',['../class_main_window.html#a46daecfbbd4056b097b3b470cc4f1618',1,'MainWindow']]], + ['executequery_1',['executeQuery',['../class_data_base_singleton.html#a4aa9edfd87be83120492e7b5c8de6151',1,'DataBaseSingleton']]] +]; diff --git a/docs/doxygen/html/search/all_4.js b/docs/doxygen/html/search/all_4.js new file mode 100644 index 0000000..4b04618 --- /dev/null +++ b/docs/doxygen/html/search/all_4.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['fetch_5fproducts_5ffrom_5fdb_0',['fetch_products_from_db',['../func2serv_8cpp.html#af1b6a57c9eed96cee280cce58342bed5',1,'func2serv.cpp']]], + ['func2serv_2ecpp_1',['func2serv.cpp',['../func2serv_8cpp.html',1,'']]], + ['func2serv_2eh_2',['func2serv.h',['../func2serv_8h.html',1,'']]], + ['functions_5ffor_5fclient_2ecpp_3',['functions_for_client.cpp',['../functions__for__client_8cpp.html',1,'']]], + ['functions_5ffor_5fclient_2eh_4',['functions_for_client.h',['../functions__for__client_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/all_5.js b/docs/doxygen/html/search/all_5.js new file mode 100644 index 0000000..dafc1fe --- /dev/null +++ b/docs/doxygen/html/search/all_5.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['get_5fall_5fusers_0',['get_all_users',['../func2serv_8cpp.html#ab8bda875989629df9b683e881296b32d',1,'get_all_users(): func2serv.cpp'],['../func2serv_8h.html#ab8bda875989629df9b683e881296b32d',1,'get_all_users(): func2serv.cpp'],['../functions__for__client_8cpp.html#ab8bda875989629df9b683e881296b32d',1,'get_all_users(): functions_for_client.cpp'],['../functions__for__client_8h.html#ab8bda875989629df9b683e881296b32d',1,'get_all_users(): func2serv.cpp']]], + ['get_5fdynamic_5fstat_1',['get_dynamic_stat',['../func2serv_8cpp.html#a8a2ae0ff8263d70f4e0f30d6b0d89af7',1,'get_dynamic_stat(): func2serv.cpp'],['../func2serv_8h.html#a8a2ae0ff8263d70f4e0f30d6b0d89af7',1,'get_dynamic_stat(): func2serv.cpp'],['../functions__for__client_8cpp.html#afa0e0e567062f87c4f78a1c848713dc3',1,'get_dynamic_stat(): functions_for_client.cpp'],['../functions__for__client_8h.html#afa0e0e567062f87c4f78a1c848713dc3',1,'get_dynamic_stat(): func2serv.cpp']]], + ['get_5fmonthly_5flogins_2',['get_monthly_logins',['../func2serv_8cpp.html#a2d6f70d14e474616a4a16a72485c2f0e',1,'get_monthly_logins(): func2serv.cpp'],['../func2serv_8h.html#a2d6f70d14e474616a4a16a72485c2f0e',1,'get_monthly_logins(): func2serv.cpp'],['../functions__for__client_8h.html#a2d6f70d14e474616a4a16a72485c2f0e',1,'get_monthly_logins(): func2serv.cpp']]], + ['get_5fproduct_5fcount_3',['get_product_count',['../func2serv_8cpp.html#a4ddd067c5a29f76aead93c977a05113a',1,'get_product_count(): func2serv.cpp'],['../func2serv_8h.html#a4ddd067c5a29f76aead93c977a05113a',1,'get_product_count(): func2serv.cpp'],['../functions__for__client_8h.html#a4ddd067c5a29f76aead93c977a05113a',1,'get_product_count(): func2serv.cpp']]], + ['get_5fproducts_4',['get_products',['../func2serv_8cpp.html#a73b3ae758a8cf3621318d27cd1a17722',1,'get_products(QString userId): func2serv.cpp'],['../func2serv_8h.html#ab8096a94a4e4aaa7af0852f0ffc11c99',1,'get_products(QString UserId): func2serv.cpp'],['../functions__for__client_8cpp.html#a88bb6f910508e9101b193e736adf8385',1,'get_products(QString id): functions_for_client.cpp'],['../functions__for__client_8h.html#a73b3ae758a8cf3621318d27cd1a17722',1,'get_products(QString userId): func2serv.cpp']]], + ['get_5fstable_5fstat_5',['get_stable_stat',['../func2serv_8cpp.html#a2d521723770cde0e28bb41544394917b',1,'get_stable_stat(): func2serv.cpp'],['../func2serv_8h.html#a2d521723770cde0e28bb41544394917b',1,'get_stable_stat(): func2serv.cpp'],['../functions__for__client_8cpp.html#a80d2dcf81ccda5494a09d546d287fbf5',1,'get_stable_stat(): functions_for_client.cpp'],['../functions__for__client_8h.html#a80d2dcf81ccda5494a09d546d287fbf5',1,'get_stable_stat(): func2serv.cpp']]], + ['get_5fstat_6',['get_stat',['../func2serv_8cpp.html#a0a88fbccc63c8cc890ded3a20fb71e72',1,'get_stat(): func2serv.cpp'],['../func2serv_8h.html#a0a88fbccc63c8cc890ded3a20fb71e72',1,'get_stat(): func2serv.cpp']]], + ['get_5fuser_5fcount_7',['get_user_count',['../func2serv_8cpp.html#a8ebcc70a2024aab70883f094fc35849e',1,'get_user_count(): func2serv.cpp'],['../func2serv_8h.html#a8ebcc70a2024aab70883f094fc35849e',1,'get_user_count(): func2serv.cpp'],['../functions__for__client_8h.html#a8ebcc70a2024aab70883f094fc35849e',1,'get_user_count(): func2serv.cpp']]], + ['get_5fweekly_5flogins_8',['get_weekly_logins',['../func2serv_8cpp.html#a4d269e13002c5cded37bee9ade854d93',1,'get_weekly_logins(): func2serv.cpp'],['../func2serv_8h.html#a4d269e13002c5cded37bee9ade854d93',1,'get_weekly_logins(): func2serv.cpp'],['../functions__for__client_8h.html#a4d269e13002c5cded37bee9ade854d93',1,'get_weekly_logins(): func2serv.cpp']]], + ['getfavoritesbyuser_9',['getFavoritesByUser',['../class_data_base_singleton.html#afee32779221eaa5f92eb0c8a8666bb50',1,'DataBaseSingleton']]], + ['getinstance_10',['getInstance',['../class_data_base_singleton.html#ae1a24c20c524fd67554e1ffe66319ede',1,'DataBaseSingleton::getInstance()'],['../class_client_singleton.html#addfb20092076c2a67a058b26f7bc399a',1,'ClientSingleton::getInstance()']]], + ['getproductsbyuser_11',['getProductsByUser',['../class_data_base_singleton.html#a84fe7936dd15c077eff86d7884ce3049',1,'DataBaseSingleton']]], + ['getstatistics_12',['getStatistics',['../class_data_base_singleton.html#aad20b90cdb02aab3df1f27a9e4f882a3',1,'DataBaseSingleton']]] +]; diff --git a/docs/doxygen/html/search/all_6.js b/docs/doxygen/html/search/all_6.js new file mode 100644 index 0000000..63ce67d --- /dev/null +++ b/docs/doxygen/html/search/all_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['handleproductadded_0',['handleProductAdded',['../class_main_window.html#a9e4beb27bda168783b6e71d486ebcb90',1,'MainWindow']]] +]; diff --git a/docs/doxygen/html/search/all_7.js b/docs/doxygen/html/search/all_7.js new file mode 100644 index 0000000..1429151 --- /dev/null +++ b/docs/doxygen/html/search/all_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['id_0',['id',['../class_main_window.html#a9ba91413f46ab4481ab8042ac8f2b799',1,'MainWindow']]], + ['initialize_1',['initialize',['../class_singleton_destroyer.html#abcaf525b6af81fbb5717c7dae73af8ec',1,'SingletonDestroyer::initialize()'],['../class_data_base_singleton.html#a59bda63308000a018c5bdc1989582e50',1,'DataBaseSingleton::initialize()'],['../class_client_singleton_destroyer.html#a26da498540dff266ed02cadab5cf2ceb',1,'ClientSingletonDestroyer::initialize()']]] +]; diff --git a/docs/doxygen/html/search/all_8.js b/docs/doxygen/html/search/all_8.js new file mode 100644 index 0000000..742c8a4 --- /dev/null +++ b/docs/doxygen/html/search/all_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['login_0',['login',['../class_main_window.html#a4338481359e3e8145930703e0089340f',1,'MainWindow']]] +]; diff --git a/docs/doxygen/html/search/all_9.js b/docs/doxygen/html/search/all_9.js new file mode 100644 index 0000000..46633aa --- /dev/null +++ b/docs/doxygen/html/search/all_9.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['main_0',['main',['../class_manager_forms.html#a55e8215156bd70da8b91860773f181a6',1,'ManagerForms::main'],['../server_2main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): main.cpp'],['../client_2main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): main.cpp']]], + ['main_2ecpp_1',['main.cpp',['../client_2main_8cpp.html',1,'(Global Namespace)'],['../server_2main_8cpp.html',1,'(Global Namespace)']]], + ['mainwindow_2',['MainWindow',['../class_main_window.html',1,'MainWindow'],['../class_main_window.html#a996c5a2b6f77944776856f08ec30858d',1,'MainWindow::MainWindow()']]], + ['mainwindow_2ecpp_3',['mainwindow.cpp',['../mainwindow_8cpp.html',1,'']]], + ['mainwindow_2eh_4',['mainwindow.h',['../mainwindow_8h.html',1,'']]], + ['managerforms_5',['ManagerForms',['../class_manager_forms.html',1,'ManagerForms'],['../class_manager_forms.html#a28520be4f92d605ac48783497f23cf96',1,'ManagerForms::ManagerForms()']]], + ['managerforms_2ecpp_6',['managerforms.cpp',['../managerforms_8cpp.html',1,'']]], + ['managerforms_2eh_7',['managerforms.h',['../managerforms_8h.html',1,'']]], + ['menu_5fexport_8',['menu_export',['../func2serv_8cpp.html#aa70831eddff4b8ed7a04647778a35747',1,'menu_export(): func2serv.cpp'],['../func2serv_8h.html#aa70831eddff4b8ed7a04647778a35747',1,'menu_export(): func2serv.cpp'],['../functions__for__client_8h.html#aa70831eddff4b8ed7a04647778a35747',1,'menu_export(): func2serv.cpp']]], + ['menucard_9',['menuCard',['../classmenu_card.html',1,'menuCard'],['../classmenu_card.html#a2031e638510376289c988f8c9799ab5b',1,'menuCard::menuCard()']]], + ['menucard_2ecpp_10',['menucard.cpp',['../menucard_8cpp.html',1,'']]], + ['menucard_2eh_11',['menuCard.h',['../menu_card_8h.html',1,'']]], + ['mockdatabase_12',['mockDatabase',['../func2serv_8cpp.html#aa13aef29ff8f58936aa8f2bd99f70253',1,'func2serv.cpp']]], + ['msocketdescriptors_13',['mSocketDescriptors',['../class_my_tcp_server.html#aae9c5addbbedcfa39ccbe55204f473a3',1,'MyTcpServer']]], + ['mtcpserver_14',['mTcpServer',['../class_my_tcp_server.html#a7d854875e1e02887023ec9aac1a1542c',1,'MyTcpServer']]], + ['mtcpsocket_15',['mTcpSocket',['../class_my_tcp_server.html#ab55c030e6eb6cf5d1acfe6d7d2bf0ed1',1,'MyTcpServer']]], + ['mytcpserver_16',['MyTcpServer',['../class_my_tcp_server.html',1,'MyTcpServer'],['../class_my_tcp_server.html#acf367c4695b4d160c7a2d25c2afaaec4',1,'MyTcpServer::MyTcpServer()']]], + ['mytcpserver_2ecpp_17',['mytcpserver.cpp',['../mytcpserver_8cpp.html',1,'']]], + ['mytcpserver_2eh_18',['mytcpserver.h',['../mytcpserver_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/all_a.js b/docs/doxygen/html/search/all_a.js new file mode 100644 index 0000000..2e8dd09 --- /dev/null +++ b/docs/doxygen/html/search/all_a.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['on_5fadd_5fclicked_0',['on_add_clicked',['../class_add_product_window.html#a0ddc09d3daa55c6c5b82211f16dee0fe',1,'AddProductWindow']]], + ['on_5faddproductbutton_5fclicked_1',['on_addProductButton_clicked',['../class_main_window.html#a0a031c02eff36254765c9030a443ab04',1,'MainWindow']]], + ['on_5fcreatemenbutton_5fclicked_2',['on_createMenButton_clicked',['../class_main_window.html#aa811d4e586dc8aee0fb9cbdc953342a2',1,'MainWindow']]], + ['on_5fdynamicstatbutton_5fclicked_3',['on_dynamicStatButton_clicked',['../class_main_window.html#a0c422ab00483005eb0251aa551869d70',1,'MainWindow']]], + ['on_5fexitbutton_5fclicked_4',['on_exitButton_clicked',['../class_main_window.html#afcbbbc80001065310d2cd6221c5be55c',1,'MainWindow']]], + ['on_5floginbutton_5fclicked_5',['on_loginButton_clicked',['../class_auth_reg_window.html#aaf84765f56f397a63dc1d952a1de8268',1,'AuthRegWindow']]], + ['on_5fproductlistbutton_5fclicked_6',['on_productListButton_clicked',['../class_main_window.html#a11507d87b5fb4a79fb557e8e313c90cd',1,'MainWindow']]], + ['on_5fregbutton_5fclicked_7',['on_regButton_clicked',['../class_auth_reg_window.html#aed5a0ff0a108f067e2070eb3a72f9273',1,'AuthRegWindow']]], + ['on_5fstablestatbutton_5fclicked_8',['on_stableStatButton_clicked',['../class_main_window.html#a9c7432f74a43023beb13ba1250e9c6bd',1,'MainWindow']]], + ['on_5ftableusersbutton_5fclicked_9',['on_tableUsersButton_clicked',['../class_main_window.html#a2ccbff8c6af34935185f027972958b5c',1,'MainWindow']]], + ['on_5ftoregbutton_5fclicked_10',['on_toRegButton_clicked',['../class_auth_reg_window.html#a5987983dc2b91cd78eb0e557da1bbfde',1,'AuthRegWindow']]], + ['operator_3d_11',['operator=',['../class_data_base_singleton.html#af310f74ceebe21ef29454dd7eccac19a',1,'DataBaseSingleton::operator=()'],['../class_client_singleton.html#a58f471a67b4888bd27539bc53eadfe54',1,'ClientSingleton::operator=()']]] +]; diff --git a/docs/doxygen/html/search/all_b.js b/docs/doxygen/html/search/all_b.js new file mode 100644 index 0000000..0816388 --- /dev/null +++ b/docs/doxygen/html/search/all_b.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['p_5finstance_0',['p_instance',['../class_singleton_destroyer.html#a66a75552c83eb8515e6d458d7a6b0178',1,'SingletonDestroyer::p_instance'],['../class_data_base_singleton.html#abf86267afcfebbe05658438ff0ccfdfd',1,'DataBaseSingleton::p_instance'],['../class_client_singleton_destroyer.html#a58c4352591e26446fbc431e15fd5df76',1,'ClientSingletonDestroyer::p_instance'],['../class_client_singleton.html#a0614c6ae3e4e0b166500a150dc178720',1,'ClientSingleton::p_instance']]], + ['parsing_1',['parsing',['../func2serv_8cpp.html#a99bd96103155e73697cc47518a5559a4',1,'parsing(QString input, int socdes): func2serv.cpp'],['../func2serv_8h.html#a99bd96103155e73697cc47518a5559a4',1,'parsing(QString input, int socdes): func2serv.cpp']]], + ['password_2',['password',['../class_main_window.html#a25493964c8f550b2380a12616fbc8250',1,'MainWindow']]], + ['productadded_3',['productAdded',['../class_add_product_window.html#ab982bd5dd091137578e647c0c588fade',1,'AddProductWindow']]], + ['productcard_4',['productCard',['../classproduct_card.html',1,'productCard'],['../classproduct_card.html#a095d77b284258000ed61c1a7e41c84ab',1,'productCard::productCard()']]], + ['productcard_2ecpp_5',['productCard.cpp',['../product_card_8cpp.html',1,'']]], + ['productcard_2eh_6',['productCard.h',['../product_card_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/all_c.js b/docs/doxygen/html/search/all_c.js new file mode 100644 index 0000000..2cf27fc --- /dev/null +++ b/docs/doxygen/html/search/all_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['reg_0',['reg',['../func2serv_8cpp.html#ac87f1fa2fd8c6ee1a48c3a56a99b3275',1,'reg(QStringList params): func2serv.cpp'],['../func2serv_8h.html#a202f69a507a4e282bb2916fea170686f',1,'reg(QStringList): func2serv.cpp'],['../functions__for__client_8cpp.html#a9638764c61635aa7172dc25ef99ce281',1,'reg(QString login, QString password, QString email): functions_for_client.cpp'],['../functions__for__client_8h.html#a9638764c61635aa7172dc25ef99ce281',1,'reg(QString login, QString password, QString email): functions_for_client.cpp']]] +]; diff --git a/docs/doxygen/html/search/all_d.js b/docs/doxygen/html/search/all_d.js new file mode 100644 index 0000000..d0bd405 --- /dev/null +++ b/docs/doxygen/html/search/all_d.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['send_5fmsg_0',['send_msg',['../class_client_singleton.html#af0ffa3bef8214e9929b4a04293c15564',1,'ClientSingleton']]], + ['server_5fstatus_1',['server_status',['../class_my_tcp_server.html#ae0dc69dfef4f9fc3a5f031f4152e4f91',1,'MyTcpServer']]], + ['set_5fcurrent_5fuser_2',['set_current_user',['../class_main_window.html#a91a9ec299ac67e179bd9e3acbf23eb0c',1,'MainWindow']]], + ['singleton_2ecpp_3',['Singleton.cpp',['../_singleton_8cpp.html',1,'']]], + ['singleton_2eh_4',['Singleton.h',['../_singleton_8h.html',1,'']]], + ['singletondestroyer_5',['SingletonDestroyer',['../class_singleton_destroyer.html',1,'SingletonDestroyer'],['../class_data_base_singleton.html#aa93ce997b9645496c0e17460fba08432',1,'DataBaseSingleton::SingletonDestroyer()']]], + ['slot_5fconnected_6',['slot_connected',['../class_client_singleton.html#ad5bef444cf0be862cfcd1db9b13be85f',1,'ClientSingleton']]], + ['slot_5freadyread_7',['slot_readyRead',['../class_client_singleton.html#ab0a1e28677b42aa8af44beebcae64c12',1,'ClientSingleton']]], + ['slot_5fshow_8',['slot_show',['../class_add_product_window.html#a92754fe51527bbce7e7dbe5f07542d21',1,'AddProductWindow::slot_show()'],['../class_main_window.html#a9a15eca3ebf289292af72b78b2cf1b56',1,'MainWindow::slot_show()']]], + ['slotclientdisconnected_9',['slotClientDisconnected',['../class_my_tcp_server.html#a3e040c49dbefd65b9a58ab662fc9f7a2',1,'MyTcpServer']]], + ['slotnewconnection_10',['slotNewConnection',['../class_my_tcp_server.html#a0ba7316ffe1a26c57fabde9e74b6c8dc',1,'MyTcpServer']]], + ['slotserverread_11',['slotServerRead',['../class_my_tcp_server.html#ab4a64d2eab985d723090963f5c8a2882',1,'MyTcpServer']]], + ['socket_12',['socket',['../class_client_singleton.html#a1341b873e995fed7fb253213de3eac19',1,'ClientSingleton']]] +]; diff --git a/docs/doxygen/html/search/all_e.js b/docs/doxygen/html/search/all_e.js new file mode 100644 index 0000000..4be332c --- /dev/null +++ b/docs/doxygen/html/search/all_e.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['ui_0',['Ui',['../namespace_ui.html',1,'']]], + ['ui_1',['ui',['../class_add_product_window.html#a28dcf3fbd6c9bb3ce89f9f52f801ebe0',1,'AddProductWindow::ui'],['../class_auth_reg_window.html#a0e1dff8a9b2550dc25e88889e131fc94',1,'AuthRegWindow::ui'],['../class_main_window.html#a35466a70ed47252a0191168126a352a5',1,'MainWindow::ui'],['../classmenu_card.html#a71b7e60bf8f8341de5cd2631e8701e77',1,'menuCard::ui']]], + ['updatestatistics_2',['updateStatistics',['../class_data_base_singleton.html#ab2877d5184cd7af28f1ea3b31f523280',1,'DataBaseSingleton']]] +]; diff --git a/docs/doxygen/html/search/all_f.js b/docs/doxygen/html/search/all_f.js new file mode 100644 index 0000000..d3fd622 --- /dev/null +++ b/docs/doxygen/html/search/all_f.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['_7eaddproductwindow_0',['~AddProductWindow',['../class_add_product_window.html#a498b45adac7d1269980cd4278b8eb277',1,'AddProductWindow']]], + ['_7eauthregwindow_1',['~AuthRegWindow',['../class_auth_reg_window.html#a8943657334ceb937919fb555148a4ddb',1,'AuthRegWindow']]], + ['_7eclientsingleton_2',['~ClientSingleton',['../class_client_singleton.html#a50d0d044c19911495d1f4faad14a8fc3',1,'ClientSingleton']]], + ['_7eclientsingletondestroyer_3',['~ClientSingletonDestroyer',['../class_client_singleton_destroyer.html#a2357bc74046db52178cf01625f92b5a7',1,'ClientSingletonDestroyer']]], + ['_7edatabasesingleton_4',['~DataBaseSingleton',['../class_data_base_singleton.html#aa0d2615a21bdb8d7367a513c802e32c1',1,'DataBaseSingleton']]], + ['_7emainwindow_5',['~MainWindow',['../class_main_window.html#ae98d00a93bc118200eeef9f9bba1dba7',1,'MainWindow']]], + ['_7emanagerforms_6',['~ManagerForms',['../class_manager_forms.html#a6fcef06607418dbf71c05c44847b0112',1,'ManagerForms']]], + ['_7emenucard_7',['~menuCard',['../classmenu_card.html#af0a4efa29020e128e125a4693b989024',1,'menuCard']]], + ['_7emytcpserver_8',['~MyTcpServer',['../class_my_tcp_server.html#ab39e651ff7c37c152215c02c225e79ef',1,'MyTcpServer']]], + ['_7esingletondestroyer_9',['~SingletonDestroyer',['../class_singleton_destroyer.html#a8ac3166871f4c5411edfdb13594dee15',1,'SingletonDestroyer']]] +]; diff --git a/docs/doxygen/html/search/classes_0.js b/docs/doxygen/html/search/classes_0.js new file mode 100644 index 0000000..7782a6b --- /dev/null +++ b/docs/doxygen/html/search/classes_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['addproductwindow_0',['AddProductWindow',['../class_add_product_window.html',1,'']]], + ['authregwindow_1',['AuthRegWindow',['../class_auth_reg_window.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/classes_1.js b/docs/doxygen/html/search/classes_1.js new file mode 100644 index 0000000..c7a22fd --- /dev/null +++ b/docs/doxygen/html/search/classes_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['clientsingleton_0',['ClientSingleton',['../class_client_singleton.html',1,'']]], + ['clientsingletondestroyer_1',['ClientSingletonDestroyer',['../class_client_singleton_destroyer.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/classes_2.js b/docs/doxygen/html/search/classes_2.js new file mode 100644 index 0000000..c9d7519 --- /dev/null +++ b/docs/doxygen/html/search/classes_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['databasesingleton_0',['DataBaseSingleton',['../class_data_base_singleton.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/classes_3.js b/docs/doxygen/html/search/classes_3.js new file mode 100644 index 0000000..a75cce6 --- /dev/null +++ b/docs/doxygen/html/search/classes_3.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['mainwindow_0',['MainWindow',['../class_main_window.html',1,'']]], + ['managerforms_1',['ManagerForms',['../class_manager_forms.html',1,'']]], + ['menucard_2',['menuCard',['../classmenu_card.html',1,'']]], + ['mytcpserver_3',['MyTcpServer',['../class_my_tcp_server.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/classes_4.js b/docs/doxygen/html/search/classes_4.js new file mode 100644 index 0000000..517dad5 --- /dev/null +++ b/docs/doxygen/html/search/classes_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['productcard_0',['productCard',['../classproduct_card.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/classes_5.js b/docs/doxygen/html/search/classes_5.js new file mode 100644 index 0000000..01f872c --- /dev/null +++ b/docs/doxygen/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['singletondestroyer_0',['SingletonDestroyer',['../class_singleton_destroyer.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/close.svg b/docs/doxygen/html/search/close.svg new file mode 100644 index 0000000..337d6cc --- /dev/null +++ b/docs/doxygen/html/search/close.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/docs/doxygen/html/search/files_0.js b/docs/doxygen/html/search/files_0.js new file mode 100644 index 0000000..a4a325b --- /dev/null +++ b/docs/doxygen/html/search/files_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['add_5fproduct_2ecpp_0',['add_product.cpp',['../add__product_8cpp.html',1,'']]], + ['add_5fproduct_2eh_1',['add_product.h',['../add__product_8h.html',1,'']]], + ['authregwindow_2ecpp_2',['authregwindow.cpp',['../authregwindow_8cpp.html',1,'']]], + ['authregwindow_2eh_3',['authregwindow.h',['../authregwindow_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/files_1.js b/docs/doxygen/html/search/files_1.js new file mode 100644 index 0000000..99befed --- /dev/null +++ b/docs/doxygen/html/search/files_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['databasesingleton_2ecpp_0',['databasesingleton.cpp',['../databasesingleton_8cpp.html',1,'']]], + ['databasesingleton_2eh_1',['databasesingleton.h',['../databasesingleton_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/files_2.js b/docs/doxygen/html/search/files_2.js new file mode 100644 index 0000000..2e29315 --- /dev/null +++ b/docs/doxygen/html/search/files_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['func2serv_2ecpp_0',['func2serv.cpp',['../func2serv_8cpp.html',1,'']]], + ['func2serv_2eh_1',['func2serv.h',['../func2serv_8h.html',1,'']]], + ['functions_5ffor_5fclient_2ecpp_2',['functions_for_client.cpp',['../functions__for__client_8cpp.html',1,'']]], + ['functions_5ffor_5fclient_2eh_3',['functions_for_client.h',['../functions__for__client_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/files_3.js b/docs/doxygen/html/search/files_3.js new file mode 100644 index 0000000..2e28d96 --- /dev/null +++ b/docs/doxygen/html/search/files_3.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['main_2ecpp_0',['main.cpp',['../client_2main_8cpp.html',1,'(Global Namespace)'],['../server_2main_8cpp.html',1,'(Global Namespace)']]], + ['mainwindow_2ecpp_1',['mainwindow.cpp',['../mainwindow_8cpp.html',1,'']]], + ['mainwindow_2eh_2',['mainwindow.h',['../mainwindow_8h.html',1,'']]], + ['managerforms_2ecpp_3',['managerforms.cpp',['../managerforms_8cpp.html',1,'']]], + ['managerforms_2eh_4',['managerforms.h',['../managerforms_8h.html',1,'']]], + ['menucard_2ecpp_5',['menucard.cpp',['../menucard_8cpp.html',1,'']]], + ['menucard_2eh_6',['menuCard.h',['../menu_card_8h.html',1,'']]], + ['mytcpserver_2ecpp_7',['mytcpserver.cpp',['../mytcpserver_8cpp.html',1,'']]], + ['mytcpserver_2eh_8',['mytcpserver.h',['../mytcpserver_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/files_4.js b/docs/doxygen/html/search/files_4.js new file mode 100644 index 0000000..23c2184 --- /dev/null +++ b/docs/doxygen/html/search/files_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['productcard_2ecpp_0',['productCard.cpp',['../product_card_8cpp.html',1,'']]], + ['productcard_2eh_1',['productCard.h',['../product_card_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/files_5.js b/docs/doxygen/html/search/files_5.js new file mode 100644 index 0000000..463d7c5 --- /dev/null +++ b/docs/doxygen/html/search/files_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['singleton_2ecpp_0',['Singleton.cpp',['../_singleton_8cpp.html',1,'']]], + ['singleton_2eh_1',['Singleton.h',['../_singleton_8h.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/functions_0.js b/docs/doxygen/html/search/functions_0.js new file mode 100644 index 0000000..9439b85 --- /dev/null +++ b/docs/doxygen/html/search/functions_0.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['add_5ffavorite_5fration_0',['add_favorite_ration',['../func2serv_8cpp.html#a6496e445a644cca89c6252f6e7adecb0',1,'add_favorite_ration(const QStringList &container): func2serv.cpp'],['../func2serv_8h.html#a6496e445a644cca89c6252f6e7adecb0',1,'add_favorite_ration(const QStringList &container): func2serv.cpp'],['../functions__for__client_8h.html#a6496e445a644cca89c6252f6e7adecb0',1,'add_favorite_ration(const QStringList &container): func2serv.cpp']]], + ['add_5fproduct_1',['add_product',['../class_main_window.html#afa09d58e484be8e5c49e5f5b33f0e3d8',1,'MainWindow::add_product()'],['../func2serv_8cpp.html#a27ffe3af29c8442de4aa94a5e48d2345',1,'add_product(QStringList params): func2serv.cpp'],['../func2serv_8h.html#aea4bc93c1f84d34a05a2c25939dcfaac',1,'add_product(QStringList): func2serv.cpp'],['../functions__for__client_8cpp.html#a48a4f2da0c749370a70323e13422a698',1,'add_product(QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type): functions_for_client.cpp'],['../functions__for__client_8h.html#a48a4f2da0c749370a70323e13422a698',1,'add_product(QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type): functions_for_client.cpp']]], + ['add_5fration_5fto_5ffavorites_2',['add_ration_to_favorites',['../func2serv_8cpp.html#a064e99d59eaa1d8cccef20b3192df015',1,'add_ration_to_favorites(const QString &userId, const QString &rationId): func2serv.cpp'],['../func2serv_8h.html#a064e99d59eaa1d8cccef20b3192df015',1,'add_ration_to_favorites(const QString &userId, const QString &rationId): func2serv.cpp'],['../functions__for__client_8h.html#a064e99d59eaa1d8cccef20b3192df015',1,'add_ration_to_favorites(const QString &userId, const QString &rationId): func2serv.cpp']]], + ['addfavoriteration_3',['addFavoriteRation',['../class_data_base_singleton.html#a515aed6cbbb34fe71f254943a70d504b',1,'DataBaseSingleton']]], + ['addproduct_4',['addProduct',['../class_data_base_singleton.html#a3fe2a5e1f41a408023066e8caf63b523',1,'DataBaseSingleton']]], + ['addproductwindow_5',['AddProductWindow',['../class_add_product_window.html#a49c10613d21d41f0fdac806935c52ac5',1,'AddProductWindow']]], + ['adduser_6',['addUser',['../class_data_base_singleton.html#af17db97dfc40b0fa48b3ed9abeacca76',1,'DataBaseSingleton']]], + ['auth_7',['auth',['../func2serv_8cpp.html#a173db167f59671d56b49f5d7d11ef531',1,'auth(QStringList log): func2serv.cpp'],['../func2serv_8h.html#acbd6ff747a2b100b8f8da4a9b99d43c7',1,'auth(QStringList): func2serv.cpp'],['../functions__for__client_8cpp.html#af65491b695e43e33df9105ec4d8702b4',1,'auth(QString email, QString password): functions_for_client.cpp'],['../functions__for__client_8h.html#aaeef61cff0ff956865a7521c007e41cc',1,'auth(QString login, QString password): functions_for_client.cpp']]], + ['auth_5fok_8',['auth_ok',['../class_auth_reg_window.html#ae7c7188f7a51b721fa342670262d2faa',1,'AuthRegWindow']]], + ['authregwindow_9',['AuthRegWindow',['../class_auth_reg_window.html#a63d0011acccbecf9228b753146a481c9',1,'AuthRegWindow']]] +]; diff --git a/docs/doxygen/html/search/functions_1.js b/docs/doxygen/html/search/functions_1.js new file mode 100644 index 0000000..4a0e937 --- /dev/null +++ b/docs/doxygen/html/search/functions_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['change_5ftype_5fto_5freg_0',['change_type_to_reg',['../class_auth_reg_window.html#a635ffca6ab9ac9f659d053e56ca47eaf',1,'AuthRegWindow']]], + ['check_5ftask_1',['check_task',['../func2serv_8cpp.html#a6d4386c36a7ed61c61cf3d1bad354f27',1,'check_task(): func2serv.cpp'],['../func2serv_8h.html#a6d4386c36a7ed61c61cf3d1bad354f27',1,'check_task(): func2serv.cpp'],['../functions__for__client_8h.html#a6d4386c36a7ed61c61cf3d1bad354f27',1,'check_task(): func2serv.cpp']]], + ['checkusercredentials_2',['checkUserCredentials',['../class_data_base_singleton.html#a51bd7dc4507c5f3d04a2903899e13d42',1,'DataBaseSingleton']]], + ['clear_3',['clear',['../class_add_product_window.html#ac12c9b053c1c61820ffb11b4be8a9b4c',1,'AddProductWindow::clear()'],['../class_auth_reg_window.html#a7a94b51b7d506acd94390e2663b5baa0',1,'AuthRegWindow::clear()']]], + ['clientsingleton_4',['ClientSingleton',['../class_client_singleton.html#a57646cacb9dca62e898d284eeda9a149',1,'ClientSingleton::ClientSingleton()'],['../class_client_singleton.html#a8c1320c8b92c5c48a5ece0c9706ecc7e',1,'ClientSingleton::ClientSingleton(const ClientSingleton &)=delete']]] +]; diff --git a/docs/doxygen/html/search/functions_2.js b/docs/doxygen/html/search/functions_2.js new file mode 100644 index 0000000..2fdc883 --- /dev/null +++ b/docs/doxygen/html/search/functions_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['databasesingleton_0',['DataBaseSingleton',['../class_data_base_singleton.html#aa289e69de3195fef9593052246b9b1b0',1,'DataBaseSingleton::DataBaseSingleton()'],['../class_data_base_singleton.html#abe02a9a0f33a2664ba969d20d777d4d9',1,'DataBaseSingleton::DataBaseSingleton(const DataBaseSingleton &)=delete']]] +]; diff --git a/docs/doxygen/html/search/functions_3.js b/docs/doxygen/html/search/functions_3.js new file mode 100644 index 0000000..3099ddb --- /dev/null +++ b/docs/doxygen/html/search/functions_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['executequery_0',['executeQuery',['../class_data_base_singleton.html#a4aa9edfd87be83120492e7b5c8de6151',1,'DataBaseSingleton']]] +]; diff --git a/docs/doxygen/html/search/functions_4.js b/docs/doxygen/html/search/functions_4.js new file mode 100644 index 0000000..d1af3da --- /dev/null +++ b/docs/doxygen/html/search/functions_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['fetch_5fproducts_5ffrom_5fdb_0',['fetch_products_from_db',['../func2serv_8cpp.html#af1b6a57c9eed96cee280cce58342bed5',1,'func2serv.cpp']]] +]; diff --git a/docs/doxygen/html/search/functions_5.js b/docs/doxygen/html/search/functions_5.js new file mode 100644 index 0000000..dafc1fe --- /dev/null +++ b/docs/doxygen/html/search/functions_5.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['get_5fall_5fusers_0',['get_all_users',['../func2serv_8cpp.html#ab8bda875989629df9b683e881296b32d',1,'get_all_users(): func2serv.cpp'],['../func2serv_8h.html#ab8bda875989629df9b683e881296b32d',1,'get_all_users(): func2serv.cpp'],['../functions__for__client_8cpp.html#ab8bda875989629df9b683e881296b32d',1,'get_all_users(): functions_for_client.cpp'],['../functions__for__client_8h.html#ab8bda875989629df9b683e881296b32d',1,'get_all_users(): func2serv.cpp']]], + ['get_5fdynamic_5fstat_1',['get_dynamic_stat',['../func2serv_8cpp.html#a8a2ae0ff8263d70f4e0f30d6b0d89af7',1,'get_dynamic_stat(): func2serv.cpp'],['../func2serv_8h.html#a8a2ae0ff8263d70f4e0f30d6b0d89af7',1,'get_dynamic_stat(): func2serv.cpp'],['../functions__for__client_8cpp.html#afa0e0e567062f87c4f78a1c848713dc3',1,'get_dynamic_stat(): functions_for_client.cpp'],['../functions__for__client_8h.html#afa0e0e567062f87c4f78a1c848713dc3',1,'get_dynamic_stat(): func2serv.cpp']]], + ['get_5fmonthly_5flogins_2',['get_monthly_logins',['../func2serv_8cpp.html#a2d6f70d14e474616a4a16a72485c2f0e',1,'get_monthly_logins(): func2serv.cpp'],['../func2serv_8h.html#a2d6f70d14e474616a4a16a72485c2f0e',1,'get_monthly_logins(): func2serv.cpp'],['../functions__for__client_8h.html#a2d6f70d14e474616a4a16a72485c2f0e',1,'get_monthly_logins(): func2serv.cpp']]], + ['get_5fproduct_5fcount_3',['get_product_count',['../func2serv_8cpp.html#a4ddd067c5a29f76aead93c977a05113a',1,'get_product_count(): func2serv.cpp'],['../func2serv_8h.html#a4ddd067c5a29f76aead93c977a05113a',1,'get_product_count(): func2serv.cpp'],['../functions__for__client_8h.html#a4ddd067c5a29f76aead93c977a05113a',1,'get_product_count(): func2serv.cpp']]], + ['get_5fproducts_4',['get_products',['../func2serv_8cpp.html#a73b3ae758a8cf3621318d27cd1a17722',1,'get_products(QString userId): func2serv.cpp'],['../func2serv_8h.html#ab8096a94a4e4aaa7af0852f0ffc11c99',1,'get_products(QString UserId): func2serv.cpp'],['../functions__for__client_8cpp.html#a88bb6f910508e9101b193e736adf8385',1,'get_products(QString id): functions_for_client.cpp'],['../functions__for__client_8h.html#a73b3ae758a8cf3621318d27cd1a17722',1,'get_products(QString userId): func2serv.cpp']]], + ['get_5fstable_5fstat_5',['get_stable_stat',['../func2serv_8cpp.html#a2d521723770cde0e28bb41544394917b',1,'get_stable_stat(): func2serv.cpp'],['../func2serv_8h.html#a2d521723770cde0e28bb41544394917b',1,'get_stable_stat(): func2serv.cpp'],['../functions__for__client_8cpp.html#a80d2dcf81ccda5494a09d546d287fbf5',1,'get_stable_stat(): functions_for_client.cpp'],['../functions__for__client_8h.html#a80d2dcf81ccda5494a09d546d287fbf5',1,'get_stable_stat(): func2serv.cpp']]], + ['get_5fstat_6',['get_stat',['../func2serv_8cpp.html#a0a88fbccc63c8cc890ded3a20fb71e72',1,'get_stat(): func2serv.cpp'],['../func2serv_8h.html#a0a88fbccc63c8cc890ded3a20fb71e72',1,'get_stat(): func2serv.cpp']]], + ['get_5fuser_5fcount_7',['get_user_count',['../func2serv_8cpp.html#a8ebcc70a2024aab70883f094fc35849e',1,'get_user_count(): func2serv.cpp'],['../func2serv_8h.html#a8ebcc70a2024aab70883f094fc35849e',1,'get_user_count(): func2serv.cpp'],['../functions__for__client_8h.html#a8ebcc70a2024aab70883f094fc35849e',1,'get_user_count(): func2serv.cpp']]], + ['get_5fweekly_5flogins_8',['get_weekly_logins',['../func2serv_8cpp.html#a4d269e13002c5cded37bee9ade854d93',1,'get_weekly_logins(): func2serv.cpp'],['../func2serv_8h.html#a4d269e13002c5cded37bee9ade854d93',1,'get_weekly_logins(): func2serv.cpp'],['../functions__for__client_8h.html#a4d269e13002c5cded37bee9ade854d93',1,'get_weekly_logins(): func2serv.cpp']]], + ['getfavoritesbyuser_9',['getFavoritesByUser',['../class_data_base_singleton.html#afee32779221eaa5f92eb0c8a8666bb50',1,'DataBaseSingleton']]], + ['getinstance_10',['getInstance',['../class_data_base_singleton.html#ae1a24c20c524fd67554e1ffe66319ede',1,'DataBaseSingleton::getInstance()'],['../class_client_singleton.html#addfb20092076c2a67a058b26f7bc399a',1,'ClientSingleton::getInstance()']]], + ['getproductsbyuser_11',['getProductsByUser',['../class_data_base_singleton.html#a84fe7936dd15c077eff86d7884ce3049',1,'DataBaseSingleton']]], + ['getstatistics_12',['getStatistics',['../class_data_base_singleton.html#aad20b90cdb02aab3df1f27a9e4f882a3',1,'DataBaseSingleton']]] +]; diff --git a/docs/doxygen/html/search/functions_6.js b/docs/doxygen/html/search/functions_6.js new file mode 100644 index 0000000..63ce67d --- /dev/null +++ b/docs/doxygen/html/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['handleproductadded_0',['handleProductAdded',['../class_main_window.html#a9e4beb27bda168783b6e71d486ebcb90',1,'MainWindow']]] +]; diff --git a/docs/doxygen/html/search/functions_7.js b/docs/doxygen/html/search/functions_7.js new file mode 100644 index 0000000..60e5dd4 --- /dev/null +++ b/docs/doxygen/html/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['initialize_0',['initialize',['../class_singleton_destroyer.html#abcaf525b6af81fbb5717c7dae73af8ec',1,'SingletonDestroyer::initialize()'],['../class_data_base_singleton.html#a59bda63308000a018c5bdc1989582e50',1,'DataBaseSingleton::initialize()'],['../class_client_singleton_destroyer.html#a26da498540dff266ed02cadab5cf2ceb',1,'ClientSingletonDestroyer::initialize()']]] +]; diff --git a/docs/doxygen/html/search/functions_8.js b/docs/doxygen/html/search/functions_8.js new file mode 100644 index 0000000..4f5c748 --- /dev/null +++ b/docs/doxygen/html/search/functions_8.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['main_0',['main',['../server_2main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): main.cpp'],['../client_2main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): main.cpp']]], + ['mainwindow_1',['MainWindow',['../class_main_window.html#a996c5a2b6f77944776856f08ec30858d',1,'MainWindow']]], + ['managerforms_2',['ManagerForms',['../class_manager_forms.html#a28520be4f92d605ac48783497f23cf96',1,'ManagerForms']]], + ['menu_5fexport_3',['menu_export',['../func2serv_8cpp.html#aa70831eddff4b8ed7a04647778a35747',1,'menu_export(): func2serv.cpp'],['../func2serv_8h.html#aa70831eddff4b8ed7a04647778a35747',1,'menu_export(): func2serv.cpp'],['../functions__for__client_8h.html#aa70831eddff4b8ed7a04647778a35747',1,'menu_export(): func2serv.cpp']]], + ['menucard_4',['menuCard',['../classmenu_card.html#a2031e638510376289c988f8c9799ab5b',1,'menuCard']]], + ['mytcpserver_5',['MyTcpServer',['../class_my_tcp_server.html#acf367c4695b4d160c7a2d25c2afaaec4',1,'MyTcpServer']]] +]; diff --git a/docs/doxygen/html/search/functions_9.js b/docs/doxygen/html/search/functions_9.js new file mode 100644 index 0000000..2e8dd09 --- /dev/null +++ b/docs/doxygen/html/search/functions_9.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['on_5fadd_5fclicked_0',['on_add_clicked',['../class_add_product_window.html#a0ddc09d3daa55c6c5b82211f16dee0fe',1,'AddProductWindow']]], + ['on_5faddproductbutton_5fclicked_1',['on_addProductButton_clicked',['../class_main_window.html#a0a031c02eff36254765c9030a443ab04',1,'MainWindow']]], + ['on_5fcreatemenbutton_5fclicked_2',['on_createMenButton_clicked',['../class_main_window.html#aa811d4e586dc8aee0fb9cbdc953342a2',1,'MainWindow']]], + ['on_5fdynamicstatbutton_5fclicked_3',['on_dynamicStatButton_clicked',['../class_main_window.html#a0c422ab00483005eb0251aa551869d70',1,'MainWindow']]], + ['on_5fexitbutton_5fclicked_4',['on_exitButton_clicked',['../class_main_window.html#afcbbbc80001065310d2cd6221c5be55c',1,'MainWindow']]], + ['on_5floginbutton_5fclicked_5',['on_loginButton_clicked',['../class_auth_reg_window.html#aaf84765f56f397a63dc1d952a1de8268',1,'AuthRegWindow']]], + ['on_5fproductlistbutton_5fclicked_6',['on_productListButton_clicked',['../class_main_window.html#a11507d87b5fb4a79fb557e8e313c90cd',1,'MainWindow']]], + ['on_5fregbutton_5fclicked_7',['on_regButton_clicked',['../class_auth_reg_window.html#aed5a0ff0a108f067e2070eb3a72f9273',1,'AuthRegWindow']]], + ['on_5fstablestatbutton_5fclicked_8',['on_stableStatButton_clicked',['../class_main_window.html#a9c7432f74a43023beb13ba1250e9c6bd',1,'MainWindow']]], + ['on_5ftableusersbutton_5fclicked_9',['on_tableUsersButton_clicked',['../class_main_window.html#a2ccbff8c6af34935185f027972958b5c',1,'MainWindow']]], + ['on_5ftoregbutton_5fclicked_10',['on_toRegButton_clicked',['../class_auth_reg_window.html#a5987983dc2b91cd78eb0e557da1bbfde',1,'AuthRegWindow']]], + ['operator_3d_11',['operator=',['../class_data_base_singleton.html#af310f74ceebe21ef29454dd7eccac19a',1,'DataBaseSingleton::operator=()'],['../class_client_singleton.html#a58f471a67b4888bd27539bc53eadfe54',1,'ClientSingleton::operator=()']]] +]; diff --git a/docs/doxygen/html/search/functions_a.js b/docs/doxygen/html/search/functions_a.js new file mode 100644 index 0000000..abd4bec --- /dev/null +++ b/docs/doxygen/html/search/functions_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['parsing_0',['parsing',['../func2serv_8cpp.html#a99bd96103155e73697cc47518a5559a4',1,'parsing(QString input, int socdes): func2serv.cpp'],['../func2serv_8h.html#a99bd96103155e73697cc47518a5559a4',1,'parsing(QString input, int socdes): func2serv.cpp']]], + ['productadded_1',['productAdded',['../class_add_product_window.html#ab982bd5dd091137578e647c0c588fade',1,'AddProductWindow']]], + ['productcard_2',['productCard',['../classproduct_card.html#a095d77b284258000ed61c1a7e41c84ab',1,'productCard']]] +]; diff --git a/docs/doxygen/html/search/functions_b.js b/docs/doxygen/html/search/functions_b.js new file mode 100644 index 0000000..2cf27fc --- /dev/null +++ b/docs/doxygen/html/search/functions_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['reg_0',['reg',['../func2serv_8cpp.html#ac87f1fa2fd8c6ee1a48c3a56a99b3275',1,'reg(QStringList params): func2serv.cpp'],['../func2serv_8h.html#a202f69a507a4e282bb2916fea170686f',1,'reg(QStringList): func2serv.cpp'],['../functions__for__client_8cpp.html#a9638764c61635aa7172dc25ef99ce281',1,'reg(QString login, QString password, QString email): functions_for_client.cpp'],['../functions__for__client_8h.html#a9638764c61635aa7172dc25ef99ce281',1,'reg(QString login, QString password, QString email): functions_for_client.cpp']]] +]; diff --git a/docs/doxygen/html/search/functions_c.js b/docs/doxygen/html/search/functions_c.js new file mode 100644 index 0000000..74af43b --- /dev/null +++ b/docs/doxygen/html/search/functions_c.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['send_5fmsg_0',['send_msg',['../class_client_singleton.html#af0ffa3bef8214e9929b4a04293c15564',1,'ClientSingleton']]], + ['set_5fcurrent_5fuser_1',['set_current_user',['../class_main_window.html#a91a9ec299ac67e179bd9e3acbf23eb0c',1,'MainWindow']]], + ['slot_5fconnected_2',['slot_connected',['../class_client_singleton.html#ad5bef444cf0be862cfcd1db9b13be85f',1,'ClientSingleton']]], + ['slot_5freadyread_3',['slot_readyRead',['../class_client_singleton.html#ab0a1e28677b42aa8af44beebcae64c12',1,'ClientSingleton']]], + ['slot_5fshow_4',['slot_show',['../class_add_product_window.html#a92754fe51527bbce7e7dbe5f07542d21',1,'AddProductWindow::slot_show()'],['../class_main_window.html#a9a15eca3ebf289292af72b78b2cf1b56',1,'MainWindow::slot_show()']]], + ['slotclientdisconnected_5',['slotClientDisconnected',['../class_my_tcp_server.html#a3e040c49dbefd65b9a58ab662fc9f7a2',1,'MyTcpServer']]], + ['slotnewconnection_6',['slotNewConnection',['../class_my_tcp_server.html#a0ba7316ffe1a26c57fabde9e74b6c8dc',1,'MyTcpServer']]], + ['slotserverread_7',['slotServerRead',['../class_my_tcp_server.html#ab4a64d2eab985d723090963f5c8a2882',1,'MyTcpServer']]] +]; diff --git a/docs/doxygen/html/search/functions_d.js b/docs/doxygen/html/search/functions_d.js new file mode 100644 index 0000000..9a4d658 --- /dev/null +++ b/docs/doxygen/html/search/functions_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['updatestatistics_0',['updateStatistics',['../class_data_base_singleton.html#ab2877d5184cd7af28f1ea3b31f523280',1,'DataBaseSingleton']]] +]; diff --git a/docs/doxygen/html/search/functions_e.js b/docs/doxygen/html/search/functions_e.js new file mode 100644 index 0000000..d3fd622 --- /dev/null +++ b/docs/doxygen/html/search/functions_e.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['_7eaddproductwindow_0',['~AddProductWindow',['../class_add_product_window.html#a498b45adac7d1269980cd4278b8eb277',1,'AddProductWindow']]], + ['_7eauthregwindow_1',['~AuthRegWindow',['../class_auth_reg_window.html#a8943657334ceb937919fb555148a4ddb',1,'AuthRegWindow']]], + ['_7eclientsingleton_2',['~ClientSingleton',['../class_client_singleton.html#a50d0d044c19911495d1f4faad14a8fc3',1,'ClientSingleton']]], + ['_7eclientsingletondestroyer_3',['~ClientSingletonDestroyer',['../class_client_singleton_destroyer.html#a2357bc74046db52178cf01625f92b5a7',1,'ClientSingletonDestroyer']]], + ['_7edatabasesingleton_4',['~DataBaseSingleton',['../class_data_base_singleton.html#aa0d2615a21bdb8d7367a513c802e32c1',1,'DataBaseSingleton']]], + ['_7emainwindow_5',['~MainWindow',['../class_main_window.html#ae98d00a93bc118200eeef9f9bba1dba7',1,'MainWindow']]], + ['_7emanagerforms_6',['~ManagerForms',['../class_manager_forms.html#a6fcef06607418dbf71c05c44847b0112',1,'ManagerForms']]], + ['_7emenucard_7',['~menuCard',['../classmenu_card.html#af0a4efa29020e128e125a4693b989024',1,'menuCard']]], + ['_7emytcpserver_8',['~MyTcpServer',['../class_my_tcp_server.html#ab39e651ff7c37c152215c02c225e79ef',1,'MyTcpServer']]], + ['_7esingletondestroyer_9',['~SingletonDestroyer',['../class_singleton_destroyer.html#a8ac3166871f4c5411edfdb13594dee15',1,'SingletonDestroyer']]] +]; diff --git a/docs/doxygen/html/search/mag.svg b/docs/doxygen/html/search/mag.svg new file mode 100644 index 0000000..ffb6cf0 --- /dev/null +++ b/docs/doxygen/html/search/mag.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/docs/doxygen/html/search/mag_d.svg b/docs/doxygen/html/search/mag_d.svg new file mode 100644 index 0000000..4122773 --- /dev/null +++ b/docs/doxygen/html/search/mag_d.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/docs/doxygen/html/search/mag_sel.svg b/docs/doxygen/html/search/mag_sel.svg new file mode 100644 index 0000000..553dba8 --- /dev/null +++ b/docs/doxygen/html/search/mag_sel.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/docs/doxygen/html/search/mag_seld.svg b/docs/doxygen/html/search/mag_seld.svg new file mode 100644 index 0000000..c906f84 --- /dev/null +++ b/docs/doxygen/html/search/mag_seld.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/docs/doxygen/html/search/namespaces_0.js b/docs/doxygen/html/search/namespaces_0.js new file mode 100644 index 0000000..406ba41 --- /dev/null +++ b/docs/doxygen/html/search/namespaces_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ui_0',['Ui',['../namespace_ui.html',1,'']]] +]; diff --git a/docs/doxygen/html/search/related_0.js b/docs/doxygen/html/search/related_0.js new file mode 100644 index 0000000..82e120f --- /dev/null +++ b/docs/doxygen/html/search/related_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['clientsingletondestroyer_0',['ClientSingletonDestroyer',['../class_client_singleton.html#a9c2e5f87a0557168f05d25189a9da384',1,'ClientSingleton']]] +]; diff --git a/docs/doxygen/html/search/related_1.js b/docs/doxygen/html/search/related_1.js new file mode 100644 index 0000000..04e9076 --- /dev/null +++ b/docs/doxygen/html/search/related_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['singletondestroyer_0',['SingletonDestroyer',['../class_data_base_singleton.html#aa93ce997b9645496c0e17460fba08432',1,'DataBaseSingleton']]] +]; diff --git a/docs/doxygen/html/search/search.css b/docs/doxygen/html/search/search.css new file mode 100644 index 0000000..a53214f --- /dev/null +++ b/docs/doxygen/html/search/search.css @@ -0,0 +1,286 @@ +/*---------------- Search Box */ + +#MSearchBox { + position: absolute; + right: 5px; +} +/*---------------- Search box styling */ + +.SRPage * { + font-weight: normal; + line-height: normal; +} + +dark-mode-toggle { + margin-left: 5px; + display: flex; + float: right; +} + +#MSearchBox { + display: inline-block; + white-space : nowrap; + background: var(--search-background-color); + border-radius: 0.65em; + box-shadow: var(--search-box-shadow); + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 19px; + background-image: var(--search-magnification-select-image); + margin: 0 0 0 0.3em; + padding: 0; +} + +#MSearchSelectExt { + display: inline-block; + vertical-align: middle; + width: 10px; + height: 19px; + background-image: var(--search-magnification-image); + margin: 0 0 0 0.5em; + padding: 0; +} + + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: var(--search-foreground-color); + outline: none; + font-family: var(--font-family-search); + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: var(--search-active-color); +} + + + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-filter-border-color); + background-color: var(--search-filter-background-color); + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt var(--font-family-search); + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: var(--font-family-monospace); + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: var(--search-filter-foreground-color); + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: var(--search-filter-foreground-color); + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: var(--search-filter-highlight-text-color); + background-color: var(--search-filter-highlight-bg-color); + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-results-border-color); + background-color: var(--search-results-background-color); + z-index:10000; + width: 300px; + height: 400px; + overflow: auto; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +div.SRPage { + margin: 5px 2px; + background-color: var(--search-results-background-color); +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + font-size: 8pt; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: var(--font-family-search); +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: var(--font-family-search); +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: var(--nav-gradient-active-image-parent); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/docs/doxygen/html/search/search.js b/docs/doxygen/html/search/search.js new file mode 100644 index 0000000..666af01 --- /dev/null +++ b/docs/doxygen/html/search/search.js @@ -0,0 +1,694 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +const SEARCH_COOKIE_NAME = ''+'search_grp'; + +const searchResults = new SearchResults(); + +/* A class handling everything associated with the search panel. + + Parameters: + name - The name of the global variable that will be + storing this instance. Is needed to be able to set timeouts. + resultPath - path to use for external files +*/ +function SearchBox(name, resultsPath, extension) { + if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + if (!extension || extension == "") { extension = ".html"; } + + function getXPos(item) { + let x = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + x += item.offsetLeft; + item = item.offsetParent; + } + } + return x; + } + + function getYPos(item) { + let y = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + y += item.offsetTop; + item = item.offsetParent; + } + } + return y; + } + + // ---------- Instance variables + this.name = name; + this.resultsPath = resultsPath; + this.keyTimeout = 0; + this.keyTimeoutLength = 500; + this.closeSelectionTimeout = 300; + this.lastSearchValue = ""; + this.lastResultsPage = ""; + this.hideTimeout = 0; + this.searchIndex = 0; + this.searchActive = false; + this.extension = extension; + + // ----------- DOM Elements + + this.DOMSearchField = () => document.getElementById("MSearchField"); + this.DOMSearchSelect = () => document.getElementById("MSearchSelect"); + this.DOMSearchSelectWindow = () => document.getElementById("MSearchSelectWindow"); + this.DOMPopupSearchResults = () => document.getElementById("MSearchResults"); + this.DOMPopupSearchResultsWindow = () => document.getElementById("MSearchResultsWindow"); + this.DOMSearchClose = () => document.getElementById("MSearchClose"); + this.DOMSearchBox = () => document.getElementById("MSearchBox"); + + // ------------ Event Handlers + + // Called when focus is added or removed from the search field. + this.OnSearchFieldFocus = function(isActive) { + this.Activate(isActive); + } + + this.OnSearchSelectShow = function() { + const searchSelectWindow = this.DOMSearchSelectWindow(); + const searchField = this.DOMSearchSelect(); + + const left = getXPos(searchField); + const top = getYPos(searchField) + searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + + // stop selection hide timer + if (this.hideTimeout) { + clearTimeout(this.hideTimeout); + this.hideTimeout=0; + } + return false; // to avoid "image drag" default event + } + + this.OnSearchSelectHide = function() { + this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this), + this.closeSelectionTimeout); + } + + // Called when the content of the search field is changed. + this.OnSearchFieldChange = function(evt) { + if (this.keyTimeout) { // kill running timer + clearTimeout(this.keyTimeout); + this.keyTimeout = 0; + } + + const e = evt ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) { + if (e.shiftKey==1) { + this.OnSearchSelectShow(); + const win=this.DOMSearchSelectWindow(); + for (let i=0;i do a search + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) { // Up + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } else if (e.keyCode==13 || e.keyCode==27) { + e.stopPropagation(); + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() { + this.keyTimeout = 0; + + // strip leading whitespace + const searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + const code = searchValue.toLowerCase().charCodeAt(0); + let idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) { // surrogate pair + idxChar = searchValue.substr(0, 2); + } + + let jsFile; + let idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + const hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + } + + const loadJS = function(url, impl, loc) { + const scriptTag = document.createElement('script'); + scriptTag.src = url; + scriptTag.onload = impl; + scriptTag.onreadystatechange = impl; + loc.appendChild(scriptTag); + } + + const domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + const domSearchBox = this.DOMSearchBox(); + const domPopupSearchResults = this.DOMPopupSearchResults(); + const domSearchClose = this.DOMSearchClose(); + const resultsPath = this.resultsPath; + + const handleResults = function() { + document.getElementById("Loading").style.display="none"; + if (typeof searchData !== 'undefined') { + createResults(resultsPath); + document.getElementById("NoMatches").style.display="none"; + } + + if (idx!=-1) { + searchResults.Search(searchValue); + } else { // no file with search results => force empty search results + searchResults.Search('===='); + } + + if (domPopupSearchResultsWindow.style.display!='block') { + domSearchClose.style.display = 'inline-block'; + let left = getXPos(domSearchBox) + 150; + let top = getYPos(domSearchBox) + 20; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + const maxWidth = document.body.clientWidth; + const maxHeight = document.body.clientHeight; + let width = 300; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + let height = 400; + if (height+top+8>maxHeight) height=maxHeight-top-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResultsWindow.style.height = height + 'px'; + } + } + + if (jsFile) { + loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); + } else { + handleResults(); + } + + this.lastSearchValue = searchValue; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) { + this.DOMSearchBox().className = 'MSearchBoxActive'; + this.searchActive = true; + } else if (!isActive) { // directly remove the panel + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + this.DOMSearchField().value = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults() { + + function convertToId(search) { + let result = ''; + for (let i=0;i. + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) { + const parentElement = document.getElementById(id); + let element = parentElement.firstChild; + + while (element && element!=parentElement) { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { + element = element.firstChild; + } else if (element.nextSibling) { + element = element.nextSibling; + } else { + do { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) { + const element = this.FindChildElement(id); + if (element) { + if (element.style.display == 'block') { + element.style.display = 'none'; + } else { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) { + if (!search) { // get search word from URL + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + const resultRows = document.getElementsByTagName("div"); + let matches = 0; + + let i = 0; + while (i < resultRows.length) { + const row = resultRows.item(i); + if (row.className == "SRResult") { + let rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) { + row.style.display = 'block'; + matches++; + } else { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) { // no results + document.getElementById("NoMatches").style.display='block'; + } else { // at least one result + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) { + if (e.type == "keydown") { + this.repeatOn = false; + this.lastKey = e.keyCode; + } else if (e.type == "keypress") { + if (!this.repeatOn) { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } else if (e.type == "keyup") { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + const newIndex = itemIndex-1; + let focusItem = this.NavPrev(newIndex); + if (focusItem) { + let child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') { // children visible + let n=0; + let tmpElem; + for (;;) { // search for last child + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) { + focusItem = tmpElem; + } else { // found it! + break; + } + n++; + } + } + } + if (focusItem) { + focusItem.focus(); + } else { // return focus to search field + document.getElementById("MSearchField").focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = itemIndex+1; + let focusItem; + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') { // children visible + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } else if (this.lastKey==39) { // Right + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } else if (this.lastKey==37) { // Left + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + if (childIndex>0) { + const newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } else { // already at first child, jump to parent + document.getElementById('Item'+itemIndex).focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = childIndex+1; + let elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) { // last child, jump to parent next parent + elem = this.NavNext(itemIndex+1); + } + if (elem) { + elem.focus(); + } + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } +} + +function createResults(resultsPath) { + + function setKeyActions(elem,action) { + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); + } + + function setClassAttr(elem,attr) { + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); + } + + const results = document.getElementById("SRResults"); + results.innerHTML = ''; + searchData.forEach((elem,index) => { + const id = elem[0]; + const srResult = document.createElement('div'); + srResult.setAttribute('id','SR_'+id); + setClassAttr(srResult,'SRResult'); + const srEntry = document.createElement('div'); + setClassAttr(srEntry,'SREntry'); + const srLink = document.createElement('a'); + srLink.setAttribute('id','Item'+index); + setKeyActions(srLink,'return searchResults.Nav(event,'+index+')'); + setClassAttr(srLink,'SRSymbol'); + srLink.innerHTML = elem[1][0]; + srEntry.appendChild(srLink); + if (elem[1].length==2) { // single result + srLink.setAttribute('href',resultsPath+elem[1][1][0]); + srLink.setAttribute('onclick','searchBox.CloseResultsWindow()'); + if (elem[1][1][1]) { + srLink.setAttribute('target','_parent'); + } else { + srLink.setAttribute('target','_blank'); + } + const srScope = document.createElement('span'); + setClassAttr(srScope,'SRScope'); + srScope.innerHTML = elem[1][1][2]; + srEntry.appendChild(srScope); + } else { // multiple results + srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")'); + const srChildren = document.createElement('div'); + setClassAttr(srChildren,'SRChildren'); + for (let c=0; c + + + + + + +My Project: server/main.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
My Project +
+
Project description
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
main.cpp File Reference
+
+
+
#include <QCoreApplication>
+#include <QObject>
+#include <QVariant>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include "mytcpserver.h"
+#include "databasesingleton.h"
+
+Include dependency graph for main.cpp:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +

+Functions

int main (int argc, char *argv[])
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + + + + +
int main (int argc,
char * argv[] )
+
+
11 {
+
12 QCoreApplication a(argc, argv);
+
13
+
14 // Инициализация БД
+ +
16 if (!db->initialize("Easyweek.db")) {
+
17 qFatal("Failed to initialize database");
+
18 }
+
19
+
20
+
21 MyTcpServer myserv;
+
22 return a.exec();
+
23}
+
Класс для работы с базой данных.
Definition databasesingleton.h:43
+
bool initialize(const QString &databaseName)
Инициализация базы данных.
Definition databasesingleton.cpp:18
+
static DataBaseSingleton * getInstance()
Получение единственного экземпляра Singleton.
Definition databasesingleton.cpp:10
+
Definition mytcpserver.h:12
+
+
+
+
+
+ + + + diff --git a/docs/doxygen/html/server_2main_8cpp.js b/docs/doxygen/html/server_2main_8cpp.js new file mode 100644 index 0000000..a3e6a4a --- /dev/null +++ b/docs/doxygen/html/server_2main_8cpp.js @@ -0,0 +1,4 @@ +var server_2main_8cpp = +[ + [ "main", "server_2main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97", null ] +]; \ No newline at end of file diff --git a/docs/doxygen/html/server_2main_8cpp__incl.dot b/docs/doxygen/html/server_2main_8cpp__incl.dot new file mode 100644 index 0000000..71a0ab6 --- /dev/null +++ b/docs/doxygen/html/server_2main_8cpp__incl.dot @@ -0,0 +1,44 @@ +digraph "server/main.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/main.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QCoreApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QVariant",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge6_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="mytcpserver.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8h.html",tooltip=" "]; + Node7 -> Node3 [id="edge7_Node000007_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node7 -> Node8 [id="edge8_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QTcpServer",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node9 [id="edge9_Node000007_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node10 [id="edge10_Node000007_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node11 [id="edge11_Node000007_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node12 [id="edge12_Node000007_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node13 [id="edge13_Node000007_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node14 [id="edge14_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="databasesingleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8h.html",tooltip=" "]; + Node14 -> Node5 [id="edge15_Node000014_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node6 [id="edge16_Node000014_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node15 [id="edge17_Node000014_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node14 -> Node12 [id="edge18_Node000014_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node16 [id="edge19_Node000014_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node14 -> Node17 [id="edge20_Node000014_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/html/server_2main_8cpp__incl.map b/docs/doxygen/html/server_2main_8cpp__incl.map new file mode 100644 index 0000000..bf2fbf9 --- /dev/null +++ b/docs/doxygen/html/server_2main_8cpp__incl.map @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/html/server_2main_8cpp__incl.md5 b/docs/doxygen/html/server_2main_8cpp__incl.md5 new file mode 100644 index 0000000..a48ca6e --- /dev/null +++ b/docs/doxygen/html/server_2main_8cpp__incl.md5 @@ -0,0 +1 @@ +4faa68d62b86d4930b0b92d3536355e2 \ No newline at end of file diff --git a/docs/doxygen/html/server_2main_8cpp__incl.png b/docs/doxygen/html/server_2main_8cpp__incl.png new file mode 100644 index 0000000..ade234d Binary files /dev/null and b/docs/doxygen/html/server_2main_8cpp__incl.png differ diff --git a/docs/doxygen/html/tabs.css b/docs/doxygen/html/tabs.css new file mode 100644 index 0000000..7fa4268 --- /dev/null +++ b/docs/doxygen/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} diff --git a/docs/doxygen/latex/Makefile b/docs/doxygen/latex/Makefile new file mode 100644 index 0000000..8e14614 --- /dev/null +++ b/docs/doxygen/latex/Makefile @@ -0,0 +1,42 @@ +LATEX_CMD?=pdflatex +MKIDX_CMD?=makeindex +BIBTEX_CMD?=bibtex +LATEX_COUNT?=8 +MANUAL_FILE?=refman + +all: $(MANUAL_FILE).pdf + +pdf: $(MANUAL_FILE).pdf + +$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex + $(LATEX_CMD) $(MANUAL_FILE) || \ + if [ $$? != 0 ] ; then \ + \echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \ + false; \ + fi + $(MKIDX_CMD) $(MANUAL_FILE).idx + $(LATEX_CMD) $(MANUAL_FILE) || \ + if [ $$? != 0 ] ; then \ + \echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \ + false; \ + fi + latex_count=$(LATEX_COUNT) ; \ + while grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\ + do \ + echo "Rerunning latex...." ;\ + $(LATEX_CMD) $(MANUAL_FILE) || \ + if [ $$? != 0 ] ; then \ + \echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \ + false; \ + fi; \ + latex_count=`expr $$latex_count - 1` ;\ + done + $(MKIDX_CMD) $(MANUAL_FILE).idx + $(LATEX_CMD) $(MANUAL_FILE) || \ + if [ $$? != 0 ] ; then \ + \echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \ + false; \ + fi + +clean: + rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf diff --git a/docs/doxygen/latex/_singleton_8cpp.tex b/docs/doxygen/latex/_singleton_8cpp.tex new file mode 100644 index 0000000..9b996fb --- /dev/null +++ b/docs/doxygen/latex/_singleton_8cpp.tex @@ -0,0 +1,11 @@ +\doxysection{client/\+Singleton.cpp File Reference} +\hypertarget{_singleton_8cpp}{}\label{_singleton_8cpp}\index{client/Singleton.cpp@{client/Singleton.cpp}} +{\ttfamily \#include "{}Singleton.\+h"{}}\newline +Include dependency graph for Singleton.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_singleton_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/_singleton_8cpp__incl.dot b/docs/doxygen/latex/_singleton_8cpp__incl.dot new file mode 100644 index 0000000..d0ae90e --- /dev/null +++ b/docs/doxygen/latex/_singleton_8cpp__incl.dot @@ -0,0 +1,22 @@ +digraph "client/Singleton.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/Singleton.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge8_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge9_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge10_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node5 [id="edge11_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node6 [id="edge12_Node000002_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge13_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node8 [id="edge14_Node000002_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/_singleton_8cpp__incl.md5 b/docs/doxygen/latex/_singleton_8cpp__incl.md5 new file mode 100644 index 0000000..8d721d2 --- /dev/null +++ b/docs/doxygen/latex/_singleton_8cpp__incl.md5 @@ -0,0 +1 @@ +ecb6cadac0511eb07b1ca92083e57776 \ No newline at end of file diff --git a/docs/doxygen/latex/_singleton_8cpp__incl.pdf b/docs/doxygen/latex/_singleton_8cpp__incl.pdf new file mode 100644 index 0000000..dcacf99 Binary files /dev/null and b/docs/doxygen/latex/_singleton_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/_singleton_8h.tex b/docs/doxygen/latex/_singleton_8h.tex new file mode 100644 index 0000000..cba246d --- /dev/null +++ b/docs/doxygen/latex/_singleton_8h.tex @@ -0,0 +1,31 @@ +\doxysection{client/\+Singleton.h File Reference} +\hypertarget{_singleton_8h}{}\label{_singleton_8h}\index{client/Singleton.h@{client/Singleton.h}} +{\ttfamily \#include $<$QObject$>$}\newline +{\ttfamily \#include $<$QTcp\+Socket$>$}\newline +{\ttfamily \#include $<$Qt\+Network$>$}\newline +{\ttfamily \#include $<$QByte\+Array$>$}\newline +{\ttfamily \#include $<$QDebug$>$}\newline +{\ttfamily \#include $<$QString\+List$>$}\newline +Include dependency graph for Singleton.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_singleton_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_singleton_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_client_singleton_destroyer}{Client\+Singleton\+Destroyer}} +\begin{DoxyCompactList}\small\item\em Разрушитель Singleton для корректного удаления \doxylink{class_client_singleton}{Client\+Singleton}. \end{DoxyCompactList}\item +class \mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} +\begin{DoxyCompactList}\small\item\em Сетевой клиент, реализующий паттерн Singleton. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/_singleton_8h__dep__incl.dot b/docs/doxygen/latex/_singleton_8h__dep__incl.dot new file mode 100644 index 0000000..aafef0d --- /dev/null +++ b/docs/doxygen/latex/_singleton_8h__dep__incl.dot @@ -0,0 +1,32 @@ +digraph "client/Singleton.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/Singleton.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge15_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/Singleton.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge16_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/functions_for\l_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge17_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge18_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/authregwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8cpp.html",tooltip=" "]; + Node4 -> Node6 [id="edge19_Node000004_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node6 -> Node7 [id="edge20_Node000006_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node6 -> Node8 [id="edge21_Node000006_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node6 -> Node9 [id="edge22_Node000006_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; + Node3 -> Node7 [id="edge23_Node000003_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 -> Node10 [id="edge24_Node000003_Node000010",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="client/mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node10 -> Node7 [id="edge25_Node000010_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node10 -> Node11 [id="edge26_Node000010_Node000011",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node10 -> Node6 [id="edge27_Node000010_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node6 [id="edge28_Node000001_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/latex/_singleton_8h__dep__incl.md5 b/docs/doxygen/latex/_singleton_8h__dep__incl.md5 new file mode 100644 index 0000000..12fad5c --- /dev/null +++ b/docs/doxygen/latex/_singleton_8h__dep__incl.md5 @@ -0,0 +1 @@ +996f24a6d04f89f85d761f8ae4ae7853 \ No newline at end of file diff --git a/docs/doxygen/latex/_singleton_8h__dep__incl.pdf b/docs/doxygen/latex/_singleton_8h__dep__incl.pdf new file mode 100644 index 0000000..9bbcab9 Binary files /dev/null and b/docs/doxygen/latex/_singleton_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/_singleton_8h__incl.dot b/docs/doxygen/latex/_singleton_8h__incl.dot new file mode 100644 index 0000000..26f8ef1 --- /dev/null +++ b/docs/doxygen/latex/_singleton_8h__incl.dot @@ -0,0 +1,20 @@ +digraph "client/Singleton.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/Singleton.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge7_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge8_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge9_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge10_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge11_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge12_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/_singleton_8h__incl.md5 b/docs/doxygen/latex/_singleton_8h__incl.md5 new file mode 100644 index 0000000..c2a0ce7 --- /dev/null +++ b/docs/doxygen/latex/_singleton_8h__incl.md5 @@ -0,0 +1 @@ +8b327d61f9ab60ba25133f5eece44ed9 \ No newline at end of file diff --git a/docs/doxygen/latex/_singleton_8h__incl.pdf b/docs/doxygen/latex/_singleton_8h__incl.pdf new file mode 100644 index 0000000..c20f5e9 Binary files /dev/null and b/docs/doxygen/latex/_singleton_8h__incl.pdf differ diff --git a/docs/doxygen/latex/_singleton_8h_source.tex b/docs/doxygen/latex/_singleton_8h_source.tex new file mode 100644 index 0000000..336b438 --- /dev/null +++ b/docs/doxygen/latex/_singleton_8h_source.tex @@ -0,0 +1,56 @@ +\doxysection{Singleton.\+h} +\hypertarget{_singleton_8h_source}{}\label{_singleton_8h_source}\index{client/Singleton.h@{client/Singleton.h}} +\mbox{\hyperlink{_singleton_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ SINGLETON\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ SINGLETON\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00014\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_client_singleton_destroyer}{ClientSingletonDestroyer}}\ \{} +\DoxyCodeLine{00015\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00016\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}*\ \mbox{\hyperlink{class_client_singleton_destroyer_a58c4352591e26446fbc431e15fd5df76}{p\_instance}};\ \ } +\DoxyCodeLine{00017\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00021\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_destroyer_a2357bc74046db52178cf01625f92b5a7}{\string~ClientSingletonDestroyer}}();} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_client_singleton_destroyer_a26da498540dff266ed02cadab5cf2ceb}{initialize}}(\mbox{\hyperlink{class_client_singleton}{ClientSingleton}}*\ p);} +\DoxyCodeLine{00028\ \};} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00036\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{ClientSingleton}}\ :\ \textcolor{keyword}{public}\ QObject\ \{} +\DoxyCodeLine{00037\ \ \ \ \ Q\_OBJECT} +\DoxyCodeLine{00038\ } +\DoxyCodeLine{00039\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{ClientSingleton}}*\ \mbox{\hyperlink{class_client_singleton_a0614c6ae3e4e0b166500a150dc178720}{p\_instance}};\ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_client_singleton_a9c2e5f87a0557168f05d25189a9da384}{ClientSingletonDestroyer}}\ \mbox{\hyperlink{class_client_singleton_a58182cf45d3ad789fd78ba39eba6121e}{destroyer}};\ \ \ } +\DoxyCodeLine{00042\ \ \ \ \ QTcpSocket*\ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ \textcolor{keyword}{protected}:} +\DoxyCodeLine{00048\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{ClientSingleton}}();} +\DoxyCodeLine{00049\ } +\DoxyCodeLine{00053\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a50d0d044c19911495d1f4faad14a8fc3}{\string~ClientSingleton}}();} +\DoxyCodeLine{00054\ } +\DoxyCodeLine{00055\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a8c1320c8b92c5c48a5ece0c9706ecc7e}{ClientSingleton}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{ClientSingleton}}\&)\ =\ \textcolor{keyword}{delete};\ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00056\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{ClientSingleton}}\&\ \mbox{\hyperlink{class_client_singleton_a58f471a67b4888bd27539bc53eadfe54}{operator=}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{ClientSingleton}}\&)\ =\ \textcolor{keyword}{delete};\ \ } +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_client_singleton_a9c2e5f87a0557168f05d25189a9da384}{ClientSingletonDestroyer}};} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{ClientSingleton}}\&\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{getInstance}}();} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00072\ \ \ \ \ QByteArray\ \mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(QStringList\ list);} +\DoxyCodeLine{00073\ } +\DoxyCodeLine{00074\ \textcolor{keyword}{public}\ slots:} +\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_client_singleton_ad5bef444cf0be862cfcd1db9b13be85f}{slot\_connected}}();} +\DoxyCodeLine{00079\ } +\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_client_singleton_ab0a1e28677b42aa8af44beebcae64c12}{slot\_readyRead}}();} +\DoxyCodeLine{00084\ \};} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00086\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ SINGLETON\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/add__product_8cpp.tex b/docs/doxygen/latex/add__product_8cpp.tex new file mode 100644 index 0000000..24ef71f --- /dev/null +++ b/docs/doxygen/latex/add__product_8cpp.tex @@ -0,0 +1,12 @@ +\doxysection{client/add\+\_\+product.cpp File Reference} +\hypertarget{add__product_8cpp}{}\label{add__product_8cpp}\index{client/add\_product.cpp@{client/add\_product.cpp}} +{\ttfamily \#include "{}add\+\_\+product.\+h"{}}\newline +{\ttfamily \#include "{}ui\+\_\+add\+\_\+product.\+h"{}}\newline +Include dependency graph for add\+\_\+product.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=296pt]{add__product_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/add__product_8cpp__incl.dot b/docs/doxygen/latex/add__product_8cpp__incl.dot new file mode 100644 index 0000000..f98a3ba --- /dev/null +++ b/docs/doxygen/latex/add__product_8cpp__incl.dot @@ -0,0 +1,16 @@ +digraph "client/add_product.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/add_product.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge5_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge6_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge7_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge8_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="ui_add_product.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/add__product_8cpp__incl.md5 b/docs/doxygen/latex/add__product_8cpp__incl.md5 new file mode 100644 index 0000000..c0fa33d --- /dev/null +++ b/docs/doxygen/latex/add__product_8cpp__incl.md5 @@ -0,0 +1 @@ +b5917ea426fa53322f64b44c3e86cbe7 \ No newline at end of file diff --git a/docs/doxygen/latex/add__product_8cpp__incl.pdf b/docs/doxygen/latex/add__product_8cpp__incl.pdf new file mode 100644 index 0000000..cc6fc42 Binary files /dev/null and b/docs/doxygen/latex/add__product_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/add__product_8h.tex b/docs/doxygen/latex/add__product_8h.tex new file mode 100644 index 0000000..48c2f55 --- /dev/null +++ b/docs/doxygen/latex/add__product_8h.tex @@ -0,0 +1,30 @@ +\doxysection{client/add\+\_\+product.h File Reference} +\hypertarget{add__product_8h}{}\label{add__product_8h}\index{client/add\_product.h@{client/add\_product.h}} +{\ttfamily \#include $<$QWidget$>$}\newline +{\ttfamily \#include $<$QMessage\+Box$>$}\newline +Include dependency graph for add\+\_\+product.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=232pt]{add__product_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{add__product_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_add_product_window}{Add\+Product\+Window}} +\begin{DoxyCompactList}\small\item\em Класс окна для добавления нового продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Namespaces} +\begin{DoxyCompactItemize} +\item +namespace \mbox{\hyperlink{namespace_ui}{Ui}} +\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/add__product_8h__dep__incl.dot b/docs/doxygen/latex/add__product_8h__dep__incl.dot new file mode 100644 index 0000000..472298c --- /dev/null +++ b/docs/doxygen/latex/add__product_8h__dep__incl.dot @@ -0,0 +1,18 @@ +digraph "client/add_product.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/add_product.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge6_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/add_product.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge7_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge8_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node3 -> Node5 [id="edge9_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node3 -> Node6 [id="edge10_Node000003_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/add__product_8h__dep__incl.md5 b/docs/doxygen/latex/add__product_8h__dep__incl.md5 new file mode 100644 index 0000000..121df13 --- /dev/null +++ b/docs/doxygen/latex/add__product_8h__dep__incl.md5 @@ -0,0 +1 @@ +88c138e89e1c4b279fcbed425706bef2 \ No newline at end of file diff --git a/docs/doxygen/latex/add__product_8h__dep__incl.pdf b/docs/doxygen/latex/add__product_8h__dep__incl.pdf new file mode 100644 index 0000000..085e6f3 Binary files /dev/null and b/docs/doxygen/latex/add__product_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/add__product_8h__incl.dot b/docs/doxygen/latex/add__product_8h__incl.dot new file mode 100644 index 0000000..8b8cc4c --- /dev/null +++ b/docs/doxygen/latex/add__product_8h__incl.dot @@ -0,0 +1,12 @@ +digraph "client/add_product.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/add_product.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge3_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge4_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/add__product_8h__incl.md5 b/docs/doxygen/latex/add__product_8h__incl.md5 new file mode 100644 index 0000000..888cd8a --- /dev/null +++ b/docs/doxygen/latex/add__product_8h__incl.md5 @@ -0,0 +1 @@ +f4ee2fc159fe8698ab59f431697bf377 \ No newline at end of file diff --git a/docs/doxygen/latex/add__product_8h__incl.pdf b/docs/doxygen/latex/add__product_8h__incl.pdf new file mode 100644 index 0000000..b6d3f07 Binary files /dev/null and b/docs/doxygen/latex/add__product_8h__incl.pdf differ diff --git a/docs/doxygen/latex/add__product_8h_source.tex b/docs/doxygen/latex/add__product_8h_source.tex new file mode 100644 index 0000000..2f9db24 --- /dev/null +++ b/docs/doxygen/latex/add__product_8h_source.tex @@ -0,0 +1,41 @@ +\doxysection{add\+\_\+product.\+h} +\hypertarget{add__product_8h_source}{}\label{add__product_8h_source}\index{client/add\_product.h@{client/add\_product.h}} +\mbox{\hyperlink{add__product_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ ADD\_PRODUCT\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ ADD\_PRODUCT\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ } +\DoxyCodeLine{00007\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{namespace_ui}{Ui}}\ \{} +\DoxyCodeLine{00008\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_add_product_window}{AddProductWindow}};} +\DoxyCodeLine{00009\ \}} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00017\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_add_product_window_a49c10613d21d41f0fdac806935c52ac5}{AddProductWindow}}\ :\ \textcolor{keyword}{public}\ QWidget} +\DoxyCodeLine{00018\ \{} +\DoxyCodeLine{00019\ \ \ \ \ Q\_OBJECT} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00026\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{class_add_product_window_a49c10613d21d41f0fdac806935c52ac5}{AddProductWindow}}(QWidget\ *parent\ =\ \textcolor{keyword}{nullptr});} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00031\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a498b45adac7d1269980cd4278b8eb277}{\string~AddProductWindow}}();} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ signals:} +\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_add_product_window_ab982bd5dd091137578e647c0c588fade}{productAdded}}(QString\ name,\ \textcolor{keywordtype}{int}\ proteins,\ \textcolor{keywordtype}{int}\ fats,\ \textcolor{keywordtype}{int}\ carbs,\ \textcolor{keywordtype}{int}\ weight,\ \textcolor{keywordtype}{int}\ cost,\ \textcolor{keywordtype}{int}\ type);} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ \textcolor{keyword}{public}\ slots:} +\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_add_product_window_ac12c9b053c1c61820ffb11b4be8a9b4c}{clear}}();} +\DoxyCodeLine{00051\ } +\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_add_product_window_a92754fe51527bbce7e7dbe5f07542d21}{slot\_show}}();} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00057\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00058\ \ \ \ \ Ui::AddProductWindow\ *\mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}};\ } +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \textcolor{keyword}{private}\ slots:} +\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_add_product_window_a0ddc09d3daa55c6c5b82211f16dee0fe}{on\_add\_clicked}}();} +\DoxyCodeLine{00065\ \};} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ ADD\_PRODUCT\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/annotated.tex b/docs/doxygen/latex/annotated.tex new file mode 100644 index 0000000..dbe006c --- /dev/null +++ b/docs/doxygen/latex/annotated.tex @@ -0,0 +1,14 @@ +\doxysection{Class List} +Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{class_add_product_window}{Add\+Product\+Window}} \\*Класс окна для добавления нового продукта }{\pageref{class_add_product_window}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_auth_reg_window}{Auth\+Reg\+Window}} \\*Класс окна авторизации и регистрации }{\pageref{class_auth_reg_window}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \\*Сетевой клиент, реализующий паттерн Singleton }{\pageref{class_client_singleton}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_client_singleton_destroyer}{Client\+Singleton\+Destroyer}} \\*Разрушитель Singleton для корректного удаления \doxylink{class_client_singleton}{Client\+Singleton} }{\pageref{class_client_singleton_destroyer}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \\*Класс для работы с базой данных }{\pageref{class_data_base_singleton}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_main_window}{Main\+Window}} \\*Главное окно клиента }{\pageref{class_main_window}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_manager_forms}{Manager\+Forms}} \\*Класс для управления окнами приложения }{\pageref{class_manager_forms}}{} +\item\contentsline{section}{\mbox{\hyperlink{classmenu_card}{menu\+Card}} \\*Виджет отображения информации о рационе питания }{\pageref{classmenu_card}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_my_tcp_server}{My\+Tcp\+Server}} }{\pageref{class_my_tcp_server}}{} +\item\contentsline{section}{\mbox{\hyperlink{classproduct_card}{product\+Card}} \\*Виджет карточки продукта }{\pageref{classproduct_card}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_singleton_destroyer}{Singleton\+Destroyer}} \\*Класс для разрушения экземпляра Singleton }{\pageref{class_singleton_destroyer}}{} +\end{DoxyCompactList} diff --git a/docs/doxygen/latex/authregwindow_8cpp.tex b/docs/doxygen/latex/authregwindow_8cpp.tex new file mode 100644 index 0000000..051b814 --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8cpp.tex @@ -0,0 +1,12 @@ +\doxysection{client/authregwindow.cpp File Reference} +\hypertarget{authregwindow_8cpp}{}\label{authregwindow_8cpp}\index{client/authregwindow.cpp@{client/authregwindow.cpp}} +{\ttfamily \#include "{}authregwindow.\+h"{}}\newline +{\ttfamily \#include "{}ui\+\_\+authregwindow.\+h"{}}\newline +Include dependency graph for authregwindow.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{authregwindow_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/authregwindow_8cpp__incl.dot b/docs/doxygen/latex/authregwindow_8cpp__incl.dot new file mode 100644 index 0000000..ddb3453 --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8cpp__incl.dot @@ -0,0 +1,32 @@ +digraph "client/authregwindow.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/authregwindow.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge13_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge14_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge15_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge16_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge17_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node6 -> Node7 [id="edge18_Node000006_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node8 [id="edge19_Node000006_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node9 [id="edge20_Node000006_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node10 [id="edge21_Node000006_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node11 [id="edge22_Node000006_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node12 [id="edge23_Node000006_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node13 [id="edge24_Node000001_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="ui_authregwindow.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/authregwindow_8cpp__incl.md5 b/docs/doxygen/latex/authregwindow_8cpp__incl.md5 new file mode 100644 index 0000000..b9d8962 --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8cpp__incl.md5 @@ -0,0 +1 @@ +d81c036fc61aa136579a3866b5ca9c1b \ No newline at end of file diff --git a/docs/doxygen/latex/authregwindow_8cpp__incl.pdf b/docs/doxygen/latex/authregwindow_8cpp__incl.pdf new file mode 100644 index 0000000..7700e06 Binary files /dev/null and b/docs/doxygen/latex/authregwindow_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/authregwindow_8h.tex b/docs/doxygen/latex/authregwindow_8h.tex new file mode 100644 index 0000000..02f3a7d --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8h.tex @@ -0,0 +1,30 @@ +\doxysection{client/authregwindow.h File Reference} +\hypertarget{authregwindow_8h}{}\label{authregwindow_8h}\index{client/authregwindow.h@{client/authregwindow.h}} +{\ttfamily \#include $<$QMain\+Window$>$}\newline +{\ttfamily \#include "{}functions\+\_\+for\+\_\+client.\+h"{}}\newline +Include dependency graph for authregwindow.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{authregwindow_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{authregwindow_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_auth_reg_window}{Auth\+Reg\+Window}} +\begin{DoxyCompactList}\small\item\em Класс окна авторизации и регистрации. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Namespaces} +\begin{DoxyCompactItemize} +\item +namespace \mbox{\hyperlink{namespace_ui}{Ui}} +\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/authregwindow_8h__dep__incl.dot b/docs/doxygen/latex/authregwindow_8h__dep__incl.dot new file mode 100644 index 0000000..f79e52e --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8h__dep__incl.dot @@ -0,0 +1,18 @@ +digraph "client/authregwindow.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/authregwindow.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge6_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/authregwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge7_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge8_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node3 -> Node5 [id="edge9_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node3 -> Node6 [id="edge10_Node000003_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/authregwindow_8h__dep__incl.md5 b/docs/doxygen/latex/authregwindow_8h__dep__incl.md5 new file mode 100644 index 0000000..6a3312b --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8h__dep__incl.md5 @@ -0,0 +1 @@ +b3367c791352531bd73e4bfe8d190a87 \ No newline at end of file diff --git a/docs/doxygen/latex/authregwindow_8h__dep__incl.pdf b/docs/doxygen/latex/authregwindow_8h__dep__incl.pdf new file mode 100644 index 0000000..b3afd42 Binary files /dev/null and b/docs/doxygen/latex/authregwindow_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/authregwindow_8h__incl.dot b/docs/doxygen/latex/authregwindow_8h__incl.dot new file mode 100644 index 0000000..0c80854 --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8h__incl.dot @@ -0,0 +1,28 @@ +digraph "client/authregwindow.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/authregwindow.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge11_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge12_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge13_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node5 [id="edge14_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node5 -> Node6 [id="edge15_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node7 [id="edge16_Node000005_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node8 [id="edge17_Node000005_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node9 [id="edge18_Node000005_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node10 [id="edge19_Node000005_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node11 [id="edge20_Node000005_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/authregwindow_8h__incl.md5 b/docs/doxygen/latex/authregwindow_8h__incl.md5 new file mode 100644 index 0000000..e917593 --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8h__incl.md5 @@ -0,0 +1 @@ +897fae7ed08e37f4a12b62000edc92f8 \ No newline at end of file diff --git a/docs/doxygen/latex/authregwindow_8h__incl.pdf b/docs/doxygen/latex/authregwindow_8h__incl.pdf new file mode 100644 index 0000000..bf9bd2e Binary files /dev/null and b/docs/doxygen/latex/authregwindow_8h__incl.pdf differ diff --git a/docs/doxygen/latex/authregwindow_8h_source.tex b/docs/doxygen/latex/authregwindow_8h_source.tex new file mode 100644 index 0000000..ee04b31 --- /dev/null +++ b/docs/doxygen/latex/authregwindow_8h_source.tex @@ -0,0 +1,46 @@ +\doxysection{authregwindow.\+h} +\hypertarget{authregwindow_8h_source}{}\label{authregwindow_8h_source}\index{client/authregwindow.h@{client/authregwindow.h}} +\mbox{\hyperlink{authregwindow_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ AUTHREGWINDOW\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ AUTHREGWINDOW\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{functions__for__client_8h}{functions\_for\_client.h}}"{}}} +\DoxyCodeLine{00006\ } +\DoxyCodeLine{00007\ QT\_BEGIN\_NAMESPACE} +\DoxyCodeLine{00008\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{namespace_ui}{Ui}}\ \{} +\DoxyCodeLine{00009\ \textcolor{keyword}{class\ }AuthRegWindow;} +\DoxyCodeLine{00010\ \}} +\DoxyCodeLine{00011\ QT\_END\_NAMESPACE} +\DoxyCodeLine{00012\ } +\DoxyCodeLine{00019\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_auth_reg_window_a63d0011acccbecf9228b753146a481c9}{AuthRegWindow}}\ :\ \textcolor{keyword}{public}\ QMainWindow} +\DoxyCodeLine{00020\ \{} +\DoxyCodeLine{00021\ \ \ \ \ Q\_OBJECT} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00028\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a63d0011acccbecf9228b753146a481c9}{AuthRegWindow}}(QWidget\ *parent\ =\ \textcolor{keyword}{nullptr});} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00033\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a8943657334ceb937919fb555148a4ddb}{\string~AuthRegWindow}}();} +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00035\ \textcolor{keyword}{private}\ slots:} +\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_auth_reg_window_a5987983dc2b91cd78eb0e557da1bbfde}{on\_toRegButton\_clicked}}();} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00046\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_auth_reg_window_aed5a0ff0a108f067e2070eb3a72f9273}{on\_regButton\_clicked}}();} +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00052\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_auth_reg_window_aaf84765f56f397a63dc1d952a1de8268}{on\_loginButton\_clicked}}();} +\DoxyCodeLine{00053\ } +\DoxyCodeLine{00054\ signals:} +\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_auth_reg_window_ae7c7188f7a51b721fa342670262d2faa}{auth\_ok}}(QString\ \textcolor{keywordtype}{id},\ QString\ login,\ QString\ email);} +\DoxyCodeLine{00062\ } +\DoxyCodeLine{00063\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00064\ \ \ \ \ Ui::AuthRegWindow\ *\mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}};\ } +\DoxyCodeLine{00065\ } +\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_auth_reg_window_a635ffca6ab9ac9f659d053e56ca47eaf}{change\_type\_to\_reg}}(\textcolor{keywordtype}{bool}\ to\_reg);} +\DoxyCodeLine{00071\ } +\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_auth_reg_window_a7a94b51b7d506acd94390e2663b5baa0}{clear}}();} +\DoxyCodeLine{00076\ \};} +\DoxyCodeLine{00077\ } +\DoxyCodeLine{00078\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ AUTHREGWINDOW\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/class_add_product_window.tex b/docs/doxygen/latex/class_add_product_window.tex new file mode 100644 index 0000000..d77ea67 --- /dev/null +++ b/docs/doxygen/latex/class_add_product_window.tex @@ -0,0 +1,238 @@ +\doxysection{Add\+Product\+Window Class Reference} +\hypertarget{class_add_product_window}{}\label{class_add_product_window}\index{AddProductWindow@{AddProductWindow}} + + +Класс окна для добавления нового продукта. + + + + +{\ttfamily \#include $<$add\+\_\+product.\+h$>$} + + + +Inheritance diagram for Add\+Product\+Window\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=182pt]{class_add_product_window__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Add\+Product\+Window\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=182pt]{class_add_product_window__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Slots} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_add_product_window_ac12c9b053c1c61820ffb11b4be8a9b4c}{clear}} () +\begin{DoxyCompactList}\small\item\em Очистка всех полей ввода. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_add_product_window_a92754fe51527bbce7e7dbe5f07542d21}{slot\+\_\+show}} () +\begin{DoxyCompactList}\small\item\em Отображение окна добавления продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Signals} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_add_product_window_ab982bd5dd091137578e647c0c588fade}{product\+Added}} (QString name, int proteins, int fats, int carbs, int weight, int cost, int type) +\begin{DoxyCompactList}\small\item\em Сигнал, испускаемый после успешного добавления продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_add_product_window_a49c10613d21d41f0fdac806935c52ac5}{Add\+Product\+Window}} (QWidget \texorpdfstring{$\ast$}{*}parent=nullptr) +\begin{DoxyCompactList}\small\item\em Конструктор окна добавления продукта. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_add_product_window_a498b45adac7d1269980cd4278b8eb277}{\texorpdfstring{$\sim$}{\string~}\+Add\+Product\+Window}} () +\begin{DoxyCompactList}\small\item\em Деструктор. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Slots} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_add_product_window_a0ddc09d3daa55c6c5b82211f16dee0fe}{on\+\_\+add\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия кнопки добавления продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +Ui\+::\+Add\+Product\+Window \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}} +\begin{DoxyCompactList}\small\item\em Указатель на интерфейс UI. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Класс окна для добавления нового продукта. + +Этот класс предоставляет пользовательский интерфейс для ввода информации о продукте (название, белки, жиры, углеводы, вес, цена, тип) и отправки этих данных. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_add_product_window_a49c10613d21d41f0fdac806935c52ac5}\index{AddProductWindow@{AddProductWindow}!AddProductWindow@{AddProductWindow}} +\index{AddProductWindow@{AddProductWindow}!AddProductWindow@{AddProductWindow}} +\doxysubsubsection{\texorpdfstring{AddProductWindow()}{AddProductWindow()}} +{\footnotesize\ttfamily \label{class_add_product_window_a49c10613d21d41f0fdac806935c52ac5} +Add\+Product\+Window\+::\+Add\+Product\+Window (\begin{DoxyParamCaption}\item[{QWidget \texorpdfstring{$\ast$}{*}}]{parent}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}} + + + +Конструктор окна добавления продукта. + + +\begin{DoxyParams}{Parameters} +{\em parent} & Родительский виджет. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00004\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :} +\DoxyCodeLine{00005\ \ \ \ \ QWidget(parent),} +\DoxyCodeLine{00006\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}(\textcolor{keyword}{new}\ Ui::AddProductWindow) } +\DoxyCodeLine{00007\ \{} +\DoxyCodeLine{00008\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>setupUi(\textcolor{keyword}{this});} +\DoxyCodeLine{00009\ \ \ \ \ \textcolor{comment}{//connect(ui-\/>add,\ \&QPushButton::clicked,\ this,\ \&AddProductWindow::on\_add\_clicked);}} +\DoxyCodeLine{00010\ \}} + +\end{DoxyCode} +\Hypertarget{class_add_product_window_a498b45adac7d1269980cd4278b8eb277}\index{AddProductWindow@{AddProductWindow}!````~AddProductWindow@{\texorpdfstring{$\sim$}{\string~}AddProductWindow}} +\index{````~AddProductWindow@{\texorpdfstring{$\sim$}{\string~}AddProductWindow}!AddProductWindow@{AddProductWindow}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}AddProductWindow()}{\string~AddProductWindow()}} +{\footnotesize\ttfamily \label{class_add_product_window_a498b45adac7d1269980cd4278b8eb277} +Add\+Product\+Window\+::\texorpdfstring{$\sim$}{\string~}\+Add\+Product\+Window (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Деструктор. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00039\ \{} +\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}};} +\DoxyCodeLine{00041\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_add_product_window_ac12c9b053c1c61820ffb11b4be8a9b4c}\index{AddProductWindow@{AddProductWindow}!clear@{clear}} +\index{clear@{clear}!AddProductWindow@{AddProductWindow}} +\doxysubsubsection{\texorpdfstring{clear}{clear}} +{\footnotesize\ttfamily \label{class_add_product_window_ac12c9b053c1c61820ffb11b4be8a9b4c} +void Add\+Product\+Window\+::clear (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Очистка всех полей ввода. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00044\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_name-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00045\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_proteins-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00046\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_fats-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00047\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_carbs-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00048\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_weights-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00049\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_cost-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00050\ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>comboBox-\/>setCurrentIndex(-\/1);} +\DoxyCodeLine{00051\ \};} + +\end{DoxyCode} +\Hypertarget{class_add_product_window_a0ddc09d3daa55c6c5b82211f16dee0fe}\index{AddProductWindow@{AddProductWindow}!on\_add\_clicked@{on\_add\_clicked}} +\index{on\_add\_clicked@{on\_add\_clicked}!AddProductWindow@{AddProductWindow}} +\doxysubsubsection{\texorpdfstring{on\_add\_clicked}{on\_add\_clicked}} +{\footnotesize\ttfamily \label{class_add_product_window_a0ddc09d3daa55c6c5b82211f16dee0fe} +void Add\+Product\+Window\+::on\+\_\+add\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия кнопки добавления продукта. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00013\ \{} +\DoxyCodeLine{00014\ \ \ \ \ QString\ name\ =\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_name-\/>text();} +\DoxyCodeLine{00015\ \ \ \ \ \textcolor{keywordtype}{int}\ proteins\ =\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_proteins-\/>text().toInt();} +\DoxyCodeLine{00016\ \ \ \ \ \textcolor{keywordtype}{int}\ fats\ =\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_fats-\/>text().toInt();} +\DoxyCodeLine{00017\ \ \ \ \ \textcolor{keywordtype}{int}\ carbs\ =\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_carbs-\/>text().toInt();} +\DoxyCodeLine{00018\ \ \ \ \ \textcolor{keywordtype}{int}\ weight\ =\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_weights-\/>text().toInt();} +\DoxyCodeLine{00019\ \ \ \ \ \textcolor{keywordtype}{int}\ cost\ =\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_cost-\/>text().toInt();} +\DoxyCodeLine{00020\ \ \ \ \ \textcolor{keywordtype}{int}\ type\ =\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>comboBox-\/>currentIndex();} +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00022\ \ \ \ \ \textcolor{comment}{//\ Проверка\ на\ заполненность\ полей}} +\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keywordflow}{if}\ (name.isEmpty()\ ||\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_proteins-\/>text().isEmpty()\ ||} +\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_fats-\/>text().isEmpty()\ ||\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_carbs-\/>text().isEmpty()\ ||} +\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_weights-\/>text().isEmpty()\ ||\ \mbox{\hyperlink{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}{ui}}-\/>In\_cost-\/>text().isEmpty())} +\DoxyCodeLine{00026\ \ \ \ \ \{} +\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ QMessageBox::warning(\textcolor{keyword}{this},\ \textcolor{stringliteral}{"{}Ошибка"{}},\ \textcolor{stringliteral}{"{}Все\ поля\ должны\ быть\ заполнены!"{}});} +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00029\ \ \ \ \ \}} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00031\ \ \ \ \ emit\ \mbox{\hyperlink{class_add_product_window_ab982bd5dd091137578e647c0c588fade}{productAdded}}(name,\ proteins,\ fats,\ carbs,\ weight,\ cost,\ type);} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ \ \ \ \ this-\/>\mbox{\hyperlink{class_add_product_window_ac12c9b053c1c61820ffb11b4be8a9b4c}{clear}}();} +\DoxyCodeLine{00034\ \ \ \ \ this-\/>close();} +\DoxyCodeLine{00035\ \}} + +\end{DoxyCode} +\Hypertarget{class_add_product_window_ab982bd5dd091137578e647c0c588fade}\index{AddProductWindow@{AddProductWindow}!productAdded@{productAdded}} +\index{productAdded@{productAdded}!AddProductWindow@{AddProductWindow}} +\doxysubsubsection{\texorpdfstring{productAdded}{productAdded}} +{\footnotesize\ttfamily \label{class_add_product_window_ab982bd5dd091137578e647c0c588fade} +void Add\+Product\+Window\+::product\+Added (\begin{DoxyParamCaption}\item[{QString}]{name}{, }\item[{int}]{proteins}{, }\item[{int}]{fats}{, }\item[{int}]{carbs}{, }\item[{int}]{weight}{, }\item[{int}]{cost}{, }\item[{int}]{type}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [signal]}} + + + +Сигнал, испускаемый после успешного добавления продукта. + + +\begin{DoxyParams}{Parameters} +{\em name} & Название продукта. \\ +\hline +{\em proteins} & Количество белков. \\ +\hline +{\em fats} & Количество жиров. \\ +\hline +{\em carbs} & Количество углеводов. \\ +\hline +{\em weight} & Вес продукта. \\ +\hline +{\em cost} & Стоимость продукта. \\ +\hline +{\em type} & Тип продукта. \\ +\hline +\end{DoxyParams} +\Hypertarget{class_add_product_window_a92754fe51527bbce7e7dbe5f07542d21}\index{AddProductWindow@{AddProductWindow}!slot\_show@{slot\_show}} +\index{slot\_show@{slot\_show}!AddProductWindow@{AddProductWindow}} +\doxysubsubsection{\texorpdfstring{slot\_show}{slot\_show}} +{\footnotesize\ttfamily \label{class_add_product_window_a92754fe51527bbce7e7dbe5f07542d21} +void Add\+Product\+Window\+::slot\+\_\+show (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Отображение окна добавления продукта. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00055\ \{} +\DoxyCodeLine{00056\ \ \ \ \ this-\/>show();} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0}\index{AddProductWindow@{AddProductWindow}!ui@{ui}} +\index{ui@{ui}!AddProductWindow@{AddProductWindow}} +\doxysubsubsection{\texorpdfstring{ui}{ui}} +{\footnotesize\ttfamily \label{class_add_product_window_a28dcf3fbd6c9bb3ce89f9f52f801ebe0} +Ui\+::\+Add\+Product\+Window\texorpdfstring{$\ast$}{*} Add\+Product\+Window\+::ui\hspace{0.3cm}{\ttfamily [private]}} + + + +Указатель на интерфейс UI. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +client/\mbox{\hyperlink{add__product_8h}{add\+\_\+product.\+h}}\item +client/\mbox{\hyperlink{add__product_8cpp}{add\+\_\+product.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_add_product_window__coll__graph.dot b/docs/doxygen/latex/class_add_product_window__coll__graph.dot new file mode 100644 index 0000000..e0134b4 --- /dev/null +++ b/docs/doxygen/latex/class_add_product_window__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "AddProductWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="AddProductWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс окна для добавления нового продукта."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_add_product_window__coll__graph.md5 b/docs/doxygen/latex/class_add_product_window__coll__graph.md5 new file mode 100644 index 0000000..0cdfced --- /dev/null +++ b/docs/doxygen/latex/class_add_product_window__coll__graph.md5 @@ -0,0 +1 @@ +85d6a751e7dc90afa84ccb8ffc56698f \ No newline at end of file diff --git a/docs/doxygen/latex/class_add_product_window__coll__graph.pdf b/docs/doxygen/latex/class_add_product_window__coll__graph.pdf new file mode 100644 index 0000000..52c38bd Binary files /dev/null and b/docs/doxygen/latex/class_add_product_window__coll__graph.pdf differ diff --git a/docs/doxygen/latex/class_add_product_window__inherit__graph.dot b/docs/doxygen/latex/class_add_product_window__inherit__graph.dot new file mode 100644 index 0000000..e0134b4 --- /dev/null +++ b/docs/doxygen/latex/class_add_product_window__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "AddProductWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="AddProductWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс окна для добавления нового продукта."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_add_product_window__inherit__graph.md5 b/docs/doxygen/latex/class_add_product_window__inherit__graph.md5 new file mode 100644 index 0000000..0cdfced --- /dev/null +++ b/docs/doxygen/latex/class_add_product_window__inherit__graph.md5 @@ -0,0 +1 @@ +85d6a751e7dc90afa84ccb8ffc56698f \ No newline at end of file diff --git a/docs/doxygen/latex/class_add_product_window__inherit__graph.pdf b/docs/doxygen/latex/class_add_product_window__inherit__graph.pdf new file mode 100644 index 0000000..52c38bd Binary files /dev/null and b/docs/doxygen/latex/class_add_product_window__inherit__graph.pdf differ diff --git a/docs/doxygen/latex/class_auth_reg_window.tex b/docs/doxygen/latex/class_auth_reg_window.tex new file mode 100644 index 0000000..158b5a0 --- /dev/null +++ b/docs/doxygen/latex/class_auth_reg_window.tex @@ -0,0 +1,295 @@ +\doxysection{Auth\+Reg\+Window Class Reference} +\hypertarget{class_auth_reg_window}{}\label{class_auth_reg_window}\index{AuthRegWindow@{AuthRegWindow}} + + +Класс окна авторизации и регистрации. + + + + +{\ttfamily \#include $<$authregwindow.\+h$>$} + + + +Inheritance diagram for Auth\+Reg\+Window\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=170pt]{class_auth_reg_window__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Auth\+Reg\+Window\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=170pt]{class_auth_reg_window__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Signals} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_auth_reg_window_ae7c7188f7a51b721fa342670262d2faa}{auth\+\_\+ok}} (QString id, QString login, QString email) +\begin{DoxyCompactList}\small\item\em Сигнал об успешной авторизации. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_auth_reg_window_a63d0011acccbecf9228b753146a481c9}{Auth\+Reg\+Window}} (QWidget \texorpdfstring{$\ast$}{*}parent=nullptr) +\begin{DoxyCompactList}\small\item\em Конструктор окна авторизации/регистрации. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_auth_reg_window_a8943657334ceb937919fb555148a4ddb}{\texorpdfstring{$\sim$}{\string~}\+Auth\+Reg\+Window}} () +\begin{DoxyCompactList}\small\item\em Деструктор. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Slots} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_auth_reg_window_a5987983dc2b91cd78eb0e557da1bbfde}{on\+\_\+to\+Reg\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия кнопки "{}Регистрация"{}. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_auth_reg_window_aed5a0ff0a108f067e2070eb3a72f9273}{on\+\_\+reg\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик подтверждения регистрации. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_auth_reg_window_aaf84765f56f397a63dc1d952a1de8268}{on\+\_\+login\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик подтверждения входа. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_auth_reg_window_a635ffca6ab9ac9f659d053e56ca47eaf}{change\+\_\+type\+\_\+to\+\_\+reg}} (bool to\+\_\+reg) +\begin{DoxyCompactList}\small\item\em Вспомогательная функция переключения режима окна. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_auth_reg_window_a7a94b51b7d506acd94390e2663b5baa0}{clear}} () +\begin{DoxyCompactList}\small\item\em Очистка всех полей ввода. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +Ui\+::\+Auth\+Reg\+Window \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}} +\begin{DoxyCompactList}\small\item\em Указатель на интерфейс. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Класс окна авторизации и регистрации. + +Этот класс реализует окно для входа в систему и создания нового аккаунта. Содержит обработчики для переключения между формами, а также подтверждения входа/регистрации. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_auth_reg_window_a63d0011acccbecf9228b753146a481c9}\index{AuthRegWindow@{AuthRegWindow}!AuthRegWindow@{AuthRegWindow}} +\index{AuthRegWindow@{AuthRegWindow}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{AuthRegWindow()}{AuthRegWindow()}} +{\footnotesize\ttfamily \label{class_auth_reg_window_a63d0011acccbecf9228b753146a481c9} +Auth\+Reg\+Window\+::\+Auth\+Reg\+Window (\begin{DoxyParamCaption}\item[{QWidget \texorpdfstring{$\ast$}{*}}]{parent}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})} + + + +Конструктор окна авторизации/регистрации. + + +\begin{DoxyParams}{Parameters} +{\em parent} & Родительский виджет. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00005\ \ \ \ \ :\ QMainWindow(parent)} +\DoxyCodeLine{00006\ \ \ \ \ ,\ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}(\textcolor{keyword}{new}\ Ui::AuthRegWindow) } +\DoxyCodeLine{00007\ \{} +\DoxyCodeLine{00008\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>setupUi(\textcolor{keyword}{this});} +\DoxyCodeLine{00009\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginLabel-\/>setVisible(\textcolor{keyword}{false});} +\DoxyCodeLine{00010\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginLine-\/>setVisible(\textcolor{keyword}{false});} +\DoxyCodeLine{00011\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a635ffca6ab9ac9f659d053e56ca47eaf}{change\_type\_to\_reg}}(\textcolor{keyword}{false});} +\DoxyCodeLine{00012\ \}} + +\end{DoxyCode} +\Hypertarget{class_auth_reg_window_a8943657334ceb937919fb555148a4ddb}\index{AuthRegWindow@{AuthRegWindow}!````~AuthRegWindow@{\texorpdfstring{$\sim$}{\string~}AuthRegWindow}} +\index{````~AuthRegWindow@{\texorpdfstring{$\sim$}{\string~}AuthRegWindow}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}AuthRegWindow()}{\string~AuthRegWindow()}} +{\footnotesize\ttfamily \label{class_auth_reg_window_a8943657334ceb937919fb555148a4ddb} +Auth\+Reg\+Window\+::\texorpdfstring{$\sim$}{\string~}\+Auth\+Reg\+Window (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Деструктор. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00032\ \{} +\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}};} +\DoxyCodeLine{00034\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_auth_reg_window_ae7c7188f7a51b721fa342670262d2faa}\index{AuthRegWindow@{AuthRegWindow}!auth\_ok@{auth\_ok}} +\index{auth\_ok@{auth\_ok}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{auth\_ok}{auth\_ok}} +{\footnotesize\ttfamily \label{class_auth_reg_window_ae7c7188f7a51b721fa342670262d2faa} +void Auth\+Reg\+Window\+::auth\+\_\+ok (\begin{DoxyParamCaption}\item[{QString}]{id}{, }\item[{QString}]{login}{, }\item[{QString}]{email}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [signal]}} + + + +Сигнал об успешной авторизации. + + +\begin{DoxyParams}{Parameters} +{\em id} & Идентификатор пользователя. \\ +\hline +{\em login} & Логин пользователя. \\ +\hline +{\em email} & Электронная почта пользователя. \\ +\hline +\end{DoxyParams} +\Hypertarget{class_auth_reg_window_a635ffca6ab9ac9f659d053e56ca47eaf}\index{AuthRegWindow@{AuthRegWindow}!change\_type\_to\_reg@{change\_type\_to\_reg}} +\index{change\_type\_to\_reg@{change\_type\_to\_reg}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{change\_type\_to\_reg()}{change\_type\_to\_reg()}} +{\footnotesize\ttfamily \label{class_auth_reg_window_a635ffca6ab9ac9f659d053e56ca47eaf} +void Auth\+Reg\+Window\+::change\+\_\+type\+\_\+to\+\_\+reg (\begin{DoxyParamCaption}\item[{bool}]{to\+\_\+reg}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}} + + + +Вспомогательная функция переключения режима окна. + + +\begin{DoxyParams}{Parameters} +{\em to\+\_\+reg} & Если true — включается режим регистрации. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00018\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>reportMessage-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginLabel-\/>setVisible(is\_reg);} +\DoxyCodeLine{00021\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginLine-\/>setVisible(is\_reg);} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>confirmPasswordLabel-\/>setVisible(is\_reg);} +\DoxyCodeLine{00024\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>confirmPasswordLine-\/>setVisible(is\_reg);} +\DoxyCodeLine{00025\ } +\DoxyCodeLine{00026\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>regButton-\/>setVisible(is\_reg);} +\DoxyCodeLine{00027\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginButton-\/>setVisible(!is\_reg);} +\DoxyCodeLine{00028\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>toRegButton-\/>setText(!is\_reg?\ \textcolor{stringliteral}{"{}РЕГИСТРАЦИЯ"{}}\ :\ \textcolor{stringliteral}{"{}АВТОРИЗАЦИЯ"{}});} +\DoxyCodeLine{00029\ \};} + +\end{DoxyCode} +\Hypertarget{class_auth_reg_window_a7a94b51b7d506acd94390e2663b5baa0}\index{AuthRegWindow@{AuthRegWindow}!clear@{clear}} +\index{clear@{clear}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{clear()}{clear()}} +{\footnotesize\ttfamily \label{class_auth_reg_window_a7a94b51b7d506acd94390e2663b5baa0} +void Auth\+Reg\+Window\+::clear (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}} + + + +Очистка всех полей ввода. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00072\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginLine-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00073\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>emailLine-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00074\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>passwordLine-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00075\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>confirmPasswordLine-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00076\ \};} + +\end{DoxyCode} +\Hypertarget{class_auth_reg_window_aaf84765f56f397a63dc1d952a1de8268}\index{AuthRegWindow@{AuthRegWindow}!on\_loginButton\_clicked@{on\_loginButton\_clicked}} +\index{on\_loginButton\_clicked@{on\_loginButton\_clicked}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{on\_loginButton\_clicked}{on\_loginButton\_clicked}} +{\footnotesize\ttfamily \label{class_auth_reg_window_aaf84765f56f397a63dc1d952a1de8268} +void Auth\+Reg\+Window\+::on\+\_\+login\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик подтверждения входа. + +Отправляет данные пользователя на сервер для авторизации. +\begin{DoxyCode}{0} +\DoxyCodeLine{00047\ \{} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ } +\DoxyCodeLine{00050\ \ \ \ \ QString\ response\ =\ \mbox{\hyperlink{func2serv_8cpp_a173db167f59671d56b49f5d7d11ef531}{auth}}(\mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>emailLine-\/>text(),\ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>passwordLine-\/>text());} +\DoxyCodeLine{00051\ } +\DoxyCodeLine{00052\ \ \ \ \ QStringList\ parts\ =\ response.split(\textcolor{stringliteral}{"{}//"{}});} +\DoxyCodeLine{00053\ } +\DoxyCodeLine{00054\ \ \ \ \ \textcolor{keywordflow}{if}\ (parts[0]\ ==\ \textcolor{stringliteral}{"{}auth\_success"{}})\ \{} +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ QString\ \textcolor{keywordtype}{id}\ =\ parts[1];} +\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ QString\ login\ =\ parts[2];} +\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ QString\ email\ =\ parts[3];} +\DoxyCodeLine{00058\ } +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ emit\ \mbox{\hyperlink{class_auth_reg_window_ae7c7188f7a51b721fa342670262d2faa}{auth\_ok}}(\textcolor{keywordtype}{id},\ login,\ email);} +\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ this-\/>close();} +\DoxyCodeLine{00062\ \ \ \ \ \}} +\DoxyCodeLine{00063\ } +\DoxyCodeLine{00064\ } +\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>reportMessage-\/>setText(\textcolor{stringliteral}{"{}Ошибка,\ проверьте\ правильность\ введённых\ данных"{}});} +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a7a94b51b7d506acd94390e2663b5baa0}{clear}}();} +\DoxyCodeLine{00068\ \ \ \ \ \}} +\DoxyCodeLine{00069\ \}} + +\end{DoxyCode} +\Hypertarget{class_auth_reg_window_aed5a0ff0a108f067e2070eb3a72f9273}\index{AuthRegWindow@{AuthRegWindow}!on\_regButton\_clicked@{on\_regButton\_clicked}} +\index{on\_regButton\_clicked@{on\_regButton\_clicked}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{on\_regButton\_clicked}{on\_regButton\_clicked}} +{\footnotesize\ttfamily \label{class_auth_reg_window_aed5a0ff0a108f067e2070eb3a72f9273} +void Auth\+Reg\+Window\+::on\+\_\+reg\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик подтверждения регистрации. + +Отправляет данные нового пользователя на сервер. +\begin{DoxyCode}{0} +\DoxyCodeLine{00080\ \{} +\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>passwordLine-\/>text()\ !=\ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>confirmPasswordLine-\/>text())\ \{} +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>reportMessage-\/>setText(\textcolor{stringliteral}{"{}Введённые\ пароли\ не\ совпадают"{}});} +\DoxyCodeLine{00083\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{func2serv_8cpp_ac87f1fa2fd8c6ee1a48c3a56a99b3275}{reg}}(\mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginLine-\/>text(),\ \textcolor{comment}{//\ делаем\ запрос\ на\ сервер\ для\ регистрации,\ передаём\ логин,\ пароль,\ почту}} +\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>passwordLine-\/>text(),} +\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>emailLine-\/>text()))} +\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginLine-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>confirmPasswordLine-\/>setText(\textcolor{stringliteral}{"{}"{}});} +\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>reportMessage-\/>setText(\textcolor{stringliteral}{"{}Регистрация\ успешна,\ нажмите\ login\ для\ авторизации"{}});} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a635ffca6ab9ac9f659d053e56ca47eaf}{change\_type\_to\_reg}}(\textcolor{keyword}{false});} +\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>reportMessage-\/>setText(\textcolor{stringliteral}{"{}Ошибка,\ пользователь\ с\ таким\ email\ уже\ существует"{}});} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\mbox{\hyperlink{class_auth_reg_window_a7a94b51b7d506acd94390e2663b5baa0}{clear}}();} +\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00096\ \ \ \ \ \}} +\DoxyCodeLine{00097\ \}} + +\end{DoxyCode} +\Hypertarget{class_auth_reg_window_a5987983dc2b91cd78eb0e557da1bbfde}\index{AuthRegWindow@{AuthRegWindow}!on\_toRegButton\_clicked@{on\_toRegButton\_clicked}} +\index{on\_toRegButton\_clicked@{on\_toRegButton\_clicked}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{on\_toRegButton\_clicked}{on\_toRegButton\_clicked}} +{\footnotesize\ttfamily \label{class_auth_reg_window_a5987983dc2b91cd78eb0e557da1bbfde} +void Auth\+Reg\+Window\+::on\+\_\+to\+Reg\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия кнопки "{}Регистрация"{}. + +Переключает окно в режим регистрации. +\begin{DoxyCode}{0} +\DoxyCodeLine{00037\ \{} +\DoxyCodeLine{00038\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window_a635ffca6ab9ac9f659d053e56ca47eaf}{change\_type\_to\_reg}}(!\mbox{\hyperlink{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}{ui}}-\/>loginLabel-\/>isVisible());} +\DoxyCodeLine{00039\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94}\index{AuthRegWindow@{AuthRegWindow}!ui@{ui}} +\index{ui@{ui}!AuthRegWindow@{AuthRegWindow}} +\doxysubsubsection{\texorpdfstring{ui}{ui}} +{\footnotesize\ttfamily \label{class_auth_reg_window_a0e1dff8a9b2550dc25e88889e131fc94} +Ui\+::\+Auth\+Reg\+Window\texorpdfstring{$\ast$}{*} Auth\+Reg\+Window\+::ui\hspace{0.3cm}{\ttfamily [private]}} + + + +Указатель на интерфейс. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +client/\mbox{\hyperlink{authregwindow_8h}{authregwindow.\+h}}\item +client/\mbox{\hyperlink{authregwindow_8cpp}{authregwindow.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_auth_reg_window__coll__graph.dot b/docs/doxygen/latex/class_auth_reg_window__coll__graph.dot new file mode 100644 index 0000000..250fc66 --- /dev/null +++ b/docs/doxygen/latex/class_auth_reg_window__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "AuthRegWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="AuthRegWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс окна авторизации и регистрации."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_auth_reg_window__coll__graph.md5 b/docs/doxygen/latex/class_auth_reg_window__coll__graph.md5 new file mode 100644 index 0000000..9c7bdfb --- /dev/null +++ b/docs/doxygen/latex/class_auth_reg_window__coll__graph.md5 @@ -0,0 +1 @@ +b00940001a7c2dd9bbbb7b7b3aef9dfd \ No newline at end of file diff --git a/docs/doxygen/latex/class_auth_reg_window__coll__graph.pdf b/docs/doxygen/latex/class_auth_reg_window__coll__graph.pdf new file mode 100644 index 0000000..8372a3e Binary files /dev/null and b/docs/doxygen/latex/class_auth_reg_window__coll__graph.pdf differ diff --git a/docs/doxygen/latex/class_auth_reg_window__inherit__graph.dot b/docs/doxygen/latex/class_auth_reg_window__inherit__graph.dot new file mode 100644 index 0000000..250fc66 --- /dev/null +++ b/docs/doxygen/latex/class_auth_reg_window__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "AuthRegWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="AuthRegWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс окна авторизации и регистрации."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_auth_reg_window__inherit__graph.md5 b/docs/doxygen/latex/class_auth_reg_window__inherit__graph.md5 new file mode 100644 index 0000000..9c7bdfb --- /dev/null +++ b/docs/doxygen/latex/class_auth_reg_window__inherit__graph.md5 @@ -0,0 +1 @@ +b00940001a7c2dd9bbbb7b7b3aef9dfd \ No newline at end of file diff --git a/docs/doxygen/latex/class_auth_reg_window__inherit__graph.pdf b/docs/doxygen/latex/class_auth_reg_window__inherit__graph.pdf new file mode 100644 index 0000000..8372a3e Binary files /dev/null and b/docs/doxygen/latex/class_auth_reg_window__inherit__graph.pdf differ diff --git a/docs/doxygen/latex/class_client_singleton.tex b/docs/doxygen/latex/class_client_singleton.tex new file mode 100644 index 0000000..25369fb --- /dev/null +++ b/docs/doxygen/latex/class_client_singleton.tex @@ -0,0 +1,325 @@ +\doxysection{Client\+Singleton Class Reference} +\hypertarget{class_client_singleton}{}\label{class_client_singleton}\index{ClientSingleton@{ClientSingleton}} + + +Сетевой клиент, реализующий паттерн Singleton. + + + + +{\ttfamily \#include $<$Singleton.\+h$>$} + + + +Inheritance diagram for Client\+Singleton\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=162pt]{class_client_singleton__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Client\+Singleton\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=252pt]{class_client_singleton__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Slots} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_client_singleton_ad5bef444cf0be862cfcd1db9b13be85f}{slot\+\_\+connected}} () +\begin{DoxyCompactList}\small\item\em Слот вызывается при успешном соединении с сервером. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_client_singleton_ab0a1e28677b42aa8af44beebcae64c12}{slot\+\_\+ready\+Read}} () +\begin{DoxyCompactList}\small\item\em Слот вызывается при получении данных от сервера. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +QByte\+Array \mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\+\_\+msg}} (QString\+List list) +\begin{DoxyCompactList}\small\item\em Отправляет сообщение серверу. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +static \mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \& \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{get\+Instance}} () +\begin{DoxyCompactList}\small\item\em Получить экземпляр Singleton. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Protected Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{Client\+Singleton}} () +\begin{DoxyCompactList}\small\item\em Конструктор по умолчанию. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_client_singleton_a50d0d044c19911495d1f4faad14a8fc3}{\texorpdfstring{$\sim$}{\string~}\+Client\+Singleton}} () +\begin{DoxyCompactList}\small\item\em Деструктор. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_client_singleton_a8c1320c8b92c5c48a5ece0c9706ecc7e}{Client\+Singleton}} (const \mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \&)=delete +\begin{DoxyCompactList}\small\item\em Запрещено копирование \end{DoxyCompactList}\item +\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \& \mbox{\hyperlink{class_client_singleton_a58f471a67b4888bd27539bc53eadfe54}{operator=}} (const \mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \&)=delete +\begin{DoxyCompactList}\small\item\em Запрещено присваивание \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +QTcp\+Socket \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}} +\begin{DoxyCompactList}\small\item\em Сокет для соединения с сервером \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Static Private Attributes} +\begin{DoxyCompactItemize} +\item +static \mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_client_singleton_a0614c6ae3e4e0b166500a150dc178720}{p\+\_\+instance}} +\begin{DoxyCompactList}\small\item\em Указатель на экземпляр Singleton. \end{DoxyCompactList}\item +static \mbox{\hyperlink{class_client_singleton_destroyer}{Client\+Singleton\+Destroyer}} \mbox{\hyperlink{class_client_singleton_a58182cf45d3ad789fd78ba39eba6121e}{destroyer}} +\begin{DoxyCompactList}\small\item\em Объект-\/разрушитель \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Friends} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_client_singleton_a9c2e5f87a0557168f05d25189a9da384}{Client\+Singleton\+Destroyer}} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Сетевой клиент, реализующий паттерн Singleton. + +Используется для подключения к серверу, отправки и получения данных. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}\index{ClientSingleton@{ClientSingleton}!ClientSingleton@{ClientSingleton}} +\index{ClientSingleton@{ClientSingleton}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{ClientSingleton()}{ClientSingleton()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily \label{class_client_singleton_a57646cacb9dca62e898d284eeda9a149} +Client\+Singleton\+::\+Client\+Singleton (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}} + + + +Конструктор по умолчанию. + +Устанавливает соединение с сервером. +\begin{DoxyCode}{0} +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00029\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}\ =\ \textcolor{keyword}{new}\ QTcpSocket(\textcolor{keyword}{this});} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00031\ \ \ \ \ \textcolor{comment}{//\ т.к.\ запускаю\ на\ своём\ пк\ адрес\ localhost,\ в\ будущем\ заменить\ на\ ip\ сервера}} +\DoxyCodeLine{00032\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>connectToHost(\textcolor{stringliteral}{"{}localhost"{}},\ 33333);} +\DoxyCodeLine{00033\ } +\DoxyCodeLine{00034\ \ \ \ \ \textcolor{comment}{//\ проверка\ успешного\ подключения\ к\ серверу}} +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>waitForConnected())\ \{} +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Connected\ to\ server!"{}};} +\DoxyCodeLine{00037\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Failed\ to\ connect\ to\ server:"{}}\ <<\ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>errorString();} +\DoxyCodeLine{00039\ \ \ \ \ \}} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ } +\DoxyCodeLine{00043\ \ \ \ \ \textcolor{comment}{//connect(socket,\ SIGNAL(connected()),\ SLOT(slot\_connected()));}} +\DoxyCodeLine{00044\ \ \ \ \ \textcolor{comment}{//connect(socket,\ SIGNAL(readyRead()),\ SLOT(slot\_readyRead()));}} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00048\ \};} + +\end{DoxyCode} +\Hypertarget{class_client_singleton_a50d0d044c19911495d1f4faad14a8fc3}\index{ClientSingleton@{ClientSingleton}!````~ClientSingleton@{\texorpdfstring{$\sim$}{\string~}ClientSingleton}} +\index{````~ClientSingleton@{\texorpdfstring{$\sim$}{\string~}ClientSingleton}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}ClientSingleton()}{\string~ClientSingleton()}} +{\footnotesize\ttfamily \label{class_client_singleton_a50d0d044c19911495d1f4faad14a8fc3} +Client\+Singleton\+::\texorpdfstring{$\sim$}{\string~}\+Client\+Singleton (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}} + + + +Деструктор. + +Закрывает соединение с сервером. +\begin{DoxyCode}{0} +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00050\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>close();} +\DoxyCodeLine{00051\ } +\DoxyCodeLine{00052\ \};} + +\end{DoxyCode} +\Hypertarget{class_client_singleton_a8c1320c8b92c5c48a5ece0c9706ecc7e}\index{ClientSingleton@{ClientSingleton}!ClientSingleton@{ClientSingleton}} +\index{ClientSingleton@{ClientSingleton}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{ClientSingleton()}{ClientSingleton()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily \label{class_client_singleton_a8c1320c8b92c5c48a5ece0c9706ecc7e} +Client\+Singleton\+::\+Client\+Singleton (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \&}]{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [delete]}} + + + +Запрещено копирование + + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}\index{ClientSingleton@{ClientSingleton}!getInstance@{getInstance}} +\index{getInstance@{getInstance}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{getInstance()}{getInstance()}} +{\footnotesize\ttfamily \label{class_client_singleton_addfb20092076c2a67a058b26f7bc399a} +\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \& Client\+Singleton\+::get\+Instance (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} + + + +Получить экземпляр Singleton. + +\begin{DoxyReturn}{Returns} +Ссылка на экземпляр \doxylink{class_client_singleton}{Client\+Singleton}. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00013\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00014\ } +\DoxyCodeLine{00015\ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{class_client_singleton_a0614c6ae3e4e0b166500a150dc178720}{p\_instance}})\ \{} +\DoxyCodeLine{00016\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a0614c6ae3e4e0b166500a150dc178720}{p\_instance}}\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_client_singleton_a57646cacb9dca62e898d284eeda9a149}{ClientSingleton}}();} +\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a58182cf45d3ad789fd78ba39eba6121e}{destroyer}}.initialize(\mbox{\hyperlink{class_client_singleton_a0614c6ae3e4e0b166500a150dc178720}{p\_instance}});} +\DoxyCodeLine{00018\ \ \ \ \ \};} +\DoxyCodeLine{00019\ \ \ \ \ \textcolor{keywordflow}{return}\ *\mbox{\hyperlink{class_client_singleton_a0614c6ae3e4e0b166500a150dc178720}{p\_instance}};} +\DoxyCodeLine{00020\ \}} + +\end{DoxyCode} +\Hypertarget{class_client_singleton_a58f471a67b4888bd27539bc53eadfe54}\index{ClientSingleton@{ClientSingleton}!operator=@{operator=}} +\index{operator=@{operator=}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{operator=()}{operator=()}} +{\footnotesize\ttfamily \label{class_client_singleton_a58f471a67b4888bd27539bc53eadfe54} +\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \& Client\+Singleton\+::operator= (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \&}]{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [delete]}} + + + +Запрещено присваивание + +\Hypertarget{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}\index{ClientSingleton@{ClientSingleton}!send\_msg@{send\_msg}} +\index{send\_msg@{send\_msg}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{send\_msg()}{send\_msg()}} +{\footnotesize\ttfamily \label{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564} +QByte\+Array Client\+Singleton\+::send\+\_\+msg (\begin{DoxyParamCaption}\item[{QString\+List}]{list}{}\end{DoxyParamCaption})} + + + +Отправляет сообщение серверу. + + +\begin{DoxyParams}{Parameters} +{\em list} & Список строк с данными для отправки. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Ответ от сервера в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00055\ \{} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00057\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>state()\ !=\ QAbstractSocket::ConnectedState)\ \{} +\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Error:\ Not\ connected\ to\ server!"{}};} +\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Error:\ Not\ connected\ to\ server!"{}};} +\DoxyCodeLine{00060\ \ \ \ \ \}} +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00062\ } +\DoxyCodeLine{00063\ \ \ \ \ QString\ message\ =\ msg.join(\textcolor{stringliteral}{"{}//"{}});} +\DoxyCodeLine{00064\ \ \ \ \ QByteArray\ data\ =\ message.toUtf8();} +\DoxyCodeLine{00065\ } +\DoxyCodeLine{00066\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>write(data);} +\DoxyCodeLine{00067\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>waitForReadyRead(5000);\ \textcolor{comment}{//\ таймаут\ 5\ сек}} +\DoxyCodeLine{00068\ } +\DoxyCodeLine{00069\ } +\DoxyCodeLine{00070\ } +\DoxyCodeLine{00071\ \ \ \ \ QByteArray\ res\ =\ \textcolor{stringliteral}{"{}"{}};} +\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keywordflow}{while}\ (\mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>bytesAvailable()\ >\ 0)\ \{} +\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ QByteArray\ array\ =\ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>readAll();} +\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \textcolor{comment}{//qDebug()\ <<\ array\ <<\ "{}\(\backslash\)n"{};}} +\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (array\ ==\ \textcolor{stringliteral}{"{}\(\backslash\)\(\backslash\)x01\(\backslash\)r\(\backslash\)n"{}})\ \{} +\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>write(res);} +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ res\ =\ \textcolor{stringliteral}{"{}"{}};} +\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \ \ \ \ res.append(array);} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00081\ \ \ \ \ \}} +\DoxyCodeLine{00082\ } +\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordflow}{if}\ (res.isEmpty())\ \{} +\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ \textcolor{comment}{//qDebug()\ <<\ "{}Error:\ empty\ response\ from\ server"{};}} +\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Error:\ empty\ response\ from\ server"{}};} +\DoxyCodeLine{00086\ \ \ \ \ \}} +\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keywordflow}{return}\ res;} +\DoxyCodeLine{00088\ } +\DoxyCodeLine{00089\ \}} + +\end{DoxyCode} +\Hypertarget{class_client_singleton_ad5bef444cf0be862cfcd1db9b13be85f}\index{ClientSingleton@{ClientSingleton}!slot\_connected@{slot\_connected}} +\index{slot\_connected@{slot\_connected}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{slot\_connected}{slot\_connected}} +{\footnotesize\ttfamily \label{class_client_singleton_ad5bef444cf0be862cfcd1db9b13be85f} +void Client\+Singleton\+::slot\+\_\+connected (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Слот вызывается при успешном соединении с сервером. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00092\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Connected\ to\ server!"{}};} +\DoxyCodeLine{00093\ \}} + +\end{DoxyCode} +\Hypertarget{class_client_singleton_ab0a1e28677b42aa8af44beebcae64c12}\index{ClientSingleton@{ClientSingleton}!slot\_readyRead@{slot\_readyRead}} +\index{slot\_readyRead@{slot\_readyRead}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{slot\_readyRead}{slot\_readyRead}} +{\footnotesize\ttfamily \label{class_client_singleton_ab0a1e28677b42aa8af44beebcae64c12} +void Client\+Singleton\+::slot\+\_\+ready\+Read (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Слот вызывается при получении данных от сервера. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00096\ \ \ \ \ QByteArray\ data\ =\ \mbox{\hyperlink{class_client_singleton_a1341b873e995fed7fb253213de3eac19}{socket}}-\/>readAll();} +\DoxyCodeLine{00097\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Data\ received:"{}}\ <<\ data;} +\DoxyCodeLine{00098\ \}} + +\end{DoxyCode} + + +\doxysubsection{Friends And Related Symbol Documentation} +\Hypertarget{class_client_singleton_a9c2e5f87a0557168f05d25189a9da384}\index{ClientSingleton@{ClientSingleton}!ClientSingletonDestroyer@{ClientSingletonDestroyer}} +\index{ClientSingletonDestroyer@{ClientSingletonDestroyer}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{ClientSingletonDestroyer}{ClientSingletonDestroyer}} +{\footnotesize\ttfamily \label{class_client_singleton_a9c2e5f87a0557168f05d25189a9da384} +friend class \mbox{\hyperlink{class_client_singleton_destroyer}{Client\+Singleton\+Destroyer}}\hspace{0.3cm}{\ttfamily [friend]}} + + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_client_singleton_a58182cf45d3ad789fd78ba39eba6121e}\index{ClientSingleton@{ClientSingleton}!destroyer@{destroyer}} +\index{destroyer@{destroyer}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{destroyer}{destroyer}} +{\footnotesize\ttfamily \label{class_client_singleton_a58182cf45d3ad789fd78ba39eba6121e} +\mbox{\hyperlink{class_client_singleton_destroyer}{Client\+Singleton\+Destroyer}} Client\+Singleton\+::destroyer\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}} + + + +Объект-\/разрушитель + +\Hypertarget{class_client_singleton_a0614c6ae3e4e0b166500a150dc178720}\index{ClientSingleton@{ClientSingleton}!p\_instance@{p\_instance}} +\index{p\_instance@{p\_instance}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{p\_instance}{p\_instance}} +{\footnotesize\ttfamily \label{class_client_singleton_a0614c6ae3e4e0b166500a150dc178720} +\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \texorpdfstring{$\ast$}{*} Client\+Singleton\+::p\+\_\+instance\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}} + + + +Указатель на экземпляр Singleton. + +\Hypertarget{class_client_singleton_a1341b873e995fed7fb253213de3eac19}\index{ClientSingleton@{ClientSingleton}!socket@{socket}} +\index{socket@{socket}!ClientSingleton@{ClientSingleton}} +\doxysubsubsection{\texorpdfstring{socket}{socket}} +{\footnotesize\ttfamily \label{class_client_singleton_a1341b873e995fed7fb253213de3eac19} +QTcp\+Socket\texorpdfstring{$\ast$}{*} Client\+Singleton\+::socket\hspace{0.3cm}{\ttfamily [private]}} + + + +Сокет для соединения с сервером + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +client/\mbox{\hyperlink{_singleton_8h}{Singleton.\+h}}\item +client/\mbox{\hyperlink{_singleton_8cpp}{Singleton.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_client_singleton__coll__graph.dot b/docs/doxygen/latex/class_client_singleton__coll__graph.dot new file mode 100644 index 0000000..da1a524 --- /dev/null +++ b/docs/doxygen/latex/class_client_singleton__coll__graph.dot @@ -0,0 +1,14 @@ +digraph "ClientSingleton" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ClientSingleton",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Сетевой клиент, реализующий паттерн Singleton."]; + Node2 -> Node1 [id="edge5_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; + Node1 -> Node1 [id="edge6_Node000001_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node3 -> Node1 [id="edge7_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" destroyer",fontcolor="grey" ]; + Node3 [id="Node000003",label="ClientSingletonDestroyer",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_client_singleton_destroyer.html",tooltip="Разрушитель Singleton для корректного удаления ClientSingleton."]; + Node1 -> Node3 [id="edge8_Node000003_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; +} diff --git a/docs/doxygen/latex/class_client_singleton__coll__graph.md5 b/docs/doxygen/latex/class_client_singleton__coll__graph.md5 new file mode 100644 index 0000000..48c9a39 --- /dev/null +++ b/docs/doxygen/latex/class_client_singleton__coll__graph.md5 @@ -0,0 +1 @@ +274ac9e6726f9cf6b42051ddab21e1f7 \ No newline at end of file diff --git a/docs/doxygen/latex/class_client_singleton__coll__graph.pdf b/docs/doxygen/latex/class_client_singleton__coll__graph.pdf new file mode 100644 index 0000000..67ad29c Binary files /dev/null and b/docs/doxygen/latex/class_client_singleton__coll__graph.pdf differ diff --git a/docs/doxygen/latex/class_client_singleton__inherit__graph.dot b/docs/doxygen/latex/class_client_singleton__inherit__graph.dot new file mode 100644 index 0000000..41b90af --- /dev/null +++ b/docs/doxygen/latex/class_client_singleton__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "ClientSingleton" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ClientSingleton",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Сетевой клиент, реализующий паттерн Singleton."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_client_singleton__inherit__graph.md5 b/docs/doxygen/latex/class_client_singleton__inherit__graph.md5 new file mode 100644 index 0000000..46fbc01 --- /dev/null +++ b/docs/doxygen/latex/class_client_singleton__inherit__graph.md5 @@ -0,0 +1 @@ +0808c367b2068561967ce452abc3ed85 \ No newline at end of file diff --git a/docs/doxygen/latex/class_client_singleton__inherit__graph.pdf b/docs/doxygen/latex/class_client_singleton__inherit__graph.pdf new file mode 100644 index 0000000..fe9f755 Binary files /dev/null and b/docs/doxygen/latex/class_client_singleton__inherit__graph.pdf differ diff --git a/docs/doxygen/latex/class_client_singleton_destroyer.tex b/docs/doxygen/latex/class_client_singleton_destroyer.tex new file mode 100644 index 0000000..03d76d1 --- /dev/null +++ b/docs/doxygen/latex/class_client_singleton_destroyer.tex @@ -0,0 +1,103 @@ +\doxysection{Client\+Singleton\+Destroyer Class Reference} +\hypertarget{class_client_singleton_destroyer}{}\label{class_client_singleton_destroyer}\index{ClientSingletonDestroyer@{ClientSingletonDestroyer}} + + +Разрушитель Singleton для корректного удаления \doxylink{class_client_singleton}{Client\+Singleton}. + + + + +{\ttfamily \#include $<$Singleton.\+h$>$} + + + +Collaboration diagram for Client\+Singleton\+Destroyer\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=306pt]{class_client_singleton_destroyer__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_client_singleton_destroyer_a2357bc74046db52178cf01625f92b5a7}{\texorpdfstring{$\sim$}{\string~}\+Client\+Singleton\+Destroyer}} () +\begin{DoxyCompactList}\small\item\em Деструктор. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_client_singleton_destroyer_a26da498540dff266ed02cadab5cf2ceb}{initialize}} (\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \texorpdfstring{$\ast$}{*}p) +\begin{DoxyCompactList}\small\item\em Инициализирует указатель на Singleton. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_client_singleton_destroyer_a58c4352591e26446fbc431e15fd5df76}{p\+\_\+instance}} +\begin{DoxyCompactList}\small\item\em Указатель на экземпляр \doxylink{class_client_singleton}{Client\+Singleton}. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Разрушитель Singleton для корректного удаления \doxylink{class_client_singleton}{Client\+Singleton}. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_client_singleton_destroyer_a2357bc74046db52178cf01625f92b5a7}\index{ClientSingletonDestroyer@{ClientSingletonDestroyer}!````~ClientSingletonDestroyer@{\texorpdfstring{$\sim$}{\string~}ClientSingletonDestroyer}} +\index{````~ClientSingletonDestroyer@{\texorpdfstring{$\sim$}{\string~}ClientSingletonDestroyer}!ClientSingletonDestroyer@{ClientSingletonDestroyer}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}ClientSingletonDestroyer()}{\string~ClientSingletonDestroyer()}} +{\footnotesize\ttfamily \label{class_client_singleton_destroyer_a2357bc74046db52178cf01625f92b5a7} +Client\+Singleton\+Destroyer\+::\texorpdfstring{$\sim$}{\string~}\+Client\+Singleton\+Destroyer (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Деструктор. + +Удаляет экземпляр \doxylink{class_client_singleton}{Client\+Singleton}. +\begin{DoxyCode}{0} +\DoxyCodeLine{00006\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00007\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_client_singleton_destroyer_a58c4352591e26446fbc431e15fd5df76}{p\_instance}})\ \{} +\DoxyCodeLine{00008\ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{class_client_singleton_destroyer_a58c4352591e26446fbc431e15fd5df76}{p\_instance}};} +\DoxyCodeLine{00009\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_client_singleton_destroyer_a58c4352591e26446fbc431e15fd5df76}{p\_instance}}\ =\ \textcolor{keyword}{nullptr};} +\DoxyCodeLine{00010\ \ \ \ \ \};} +\DoxyCodeLine{00011\ \};} + +\end{DoxyCode} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_client_singleton_destroyer_a26da498540dff266ed02cadab5cf2ceb}\index{ClientSingletonDestroyer@{ClientSingletonDestroyer}!initialize@{initialize}} +\index{initialize@{initialize}!ClientSingletonDestroyer@{ClientSingletonDestroyer}} +\doxysubsubsection{\texorpdfstring{initialize()}{initialize()}} +{\footnotesize\ttfamily \label{class_client_singleton_destroyer_a26da498540dff266ed02cadab5cf2ceb} +void Client\+Singleton\+Destroyer\+::initialize (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}} \texorpdfstring{$\ast$}{*}}]{p}{}\end{DoxyParamCaption})} + + + +Инициализирует указатель на Singleton. + + +\begin{DoxyParams}{Parameters} +{\em p} & Указатель на экземпляр \doxylink{class_client_singleton}{Client\+Singleton}. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00024\ \ \ \ \ this-\/>\mbox{\hyperlink{class_client_singleton_destroyer_a58c4352591e26446fbc431e15fd5df76}{p\_instance}}\ =\ b;} +\DoxyCodeLine{00025\ \};} + +\end{DoxyCode} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_client_singleton_destroyer_a58c4352591e26446fbc431e15fd5df76}\index{ClientSingletonDestroyer@{ClientSingletonDestroyer}!p\_instance@{p\_instance}} +\index{p\_instance@{p\_instance}!ClientSingletonDestroyer@{ClientSingletonDestroyer}} +\doxysubsubsection{\texorpdfstring{p\_instance}{p\_instance}} +{\footnotesize\ttfamily \label{class_client_singleton_destroyer_a58c4352591e26446fbc431e15fd5df76} +\mbox{\hyperlink{class_client_singleton}{Client\+Singleton}}\texorpdfstring{$\ast$}{*} Client\+Singleton\+Destroyer\+::p\+\_\+instance\hspace{0.3cm}{\ttfamily [private]}} + + + +Указатель на экземпляр \doxylink{class_client_singleton}{Client\+Singleton}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +client/\mbox{\hyperlink{_singleton_8h}{Singleton.\+h}}\item +client/\mbox{\hyperlink{_singleton_8cpp}{Singleton.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.dot b/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.dot new file mode 100644 index 0000000..7e41c1a --- /dev/null +++ b/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.dot @@ -0,0 +1,14 @@ +digraph "ClientSingletonDestroyer" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ClientSingletonDestroyer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Разрушитель Singleton для корректного удаления ClientSingleton."]; + Node2 -> Node1 [id="edge5_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node2 [id="Node000002",label="ClientSingleton",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_client_singleton.html",tooltip="Сетевой клиент, реализующий паттерн Singleton."]; + Node3 -> Node2 [id="edge6_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; + Node2 -> Node2 [id="edge7_Node000002_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node1 -> Node2 [id="edge8_Node000002_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" destroyer",fontcolor="grey" ]; +} diff --git a/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.md5 b/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.md5 new file mode 100644 index 0000000..4feec57 --- /dev/null +++ b/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.md5 @@ -0,0 +1 @@ +d87f1b40e4bff4dc6f83e69889fca872 \ No newline at end of file diff --git a/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.pdf b/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.pdf new file mode 100644 index 0000000..3f2f058 Binary files /dev/null and b/docs/doxygen/latex/class_client_singleton_destroyer__coll__graph.pdf differ diff --git a/docs/doxygen/latex/class_data_base_singleton.tex b/docs/doxygen/latex/class_data_base_singleton.tex new file mode 100644 index 0000000..6d1e7c8 --- /dev/null +++ b/docs/doxygen/latex/class_data_base_singleton.tex @@ -0,0 +1,641 @@ +\doxysection{Data\+Base\+Singleton Class Reference} +\hypertarget{class_data_base_singleton}{}\label{class_data_base_singleton}\index{DataBaseSingleton@{DataBaseSingleton}} + + +Класс для работы с базой данных. + + + + +{\ttfamily \#include $<$databasesingleton.\+h$>$} + + + +Collaboration diagram for Data\+Base\+Singleton\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=248pt]{class_data_base_singleton__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +bool \mbox{\hyperlink{class_data_base_singleton_a59bda63308000a018c5bdc1989582e50}{initialize}} (const QString \&database\+Name) +\begin{DoxyCompactList}\small\item\em Инициализация базы данных. \end{DoxyCompactList}\item +QSql\+Query \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{execute\+Query}} (const QString \&query, const QVariant\+Map \¶ms=QVariant\+Map()) +\begin{DoxyCompactList}\small\item\em Выполнение SQL-\/запроса с параметрами. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_data_base_singleton_a51bd7dc4507c5f3d04a2903899e13d42}{check\+User\+Credentials}} (const QString \&login, const QString \&password) +\begin{DoxyCompactList}\small\item\em Проверка учетных данных пользователя. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_data_base_singleton_af17db97dfc40b0fa48b3ed9abeacca76}{add\+User}} (const QString \&name, const QString \&email, const QString \&password, bool is\+Admin=false) +\begin{DoxyCompactList}\small\item\em Добавление нового пользователя в базу данных. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_data_base_singleton_a3fe2a5e1f41a408023066e8caf63b523}{add\+Product}} (int user\+Id, const QString \&name, int proteins, int fatness, int carbs, int weight, int cost, int type) +\begin{DoxyCompactList}\small\item\em Добавление продукта в базу данных. \end{DoxyCompactList}\item +QVector$<$ QVariant\+Map $>$ \mbox{\hyperlink{class_data_base_singleton_a84fe7936dd15c077eff86d7884ce3049}{get\+Products\+By\+User}} (int user\+Id) +\begin{DoxyCompactList}\small\item\em Получение продуктов для конкретного пользователя. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_data_base_singleton_a515aed6cbbb34fe71f254943a70d504b}{add\+Favorite\+Ration}} (int user\+Id, const QVector$<$ int $>$ \&product\+Ids, int calories, int all\+Cost, int all\+Weight) +\begin{DoxyCompactList}\small\item\em Добавление рациона в избранное. \end{DoxyCompactList}\item +QVector$<$ QVariant\+Map $>$ \mbox{\hyperlink{class_data_base_singleton_afee32779221eaa5f92eb0c8a8666bb50}{get\+Favorites\+By\+User}} (int user\+Id) +\begin{DoxyCompactList}\small\item\em Получение избранных рационов пользователя. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_data_base_singleton_ab2877d5184cd7af28f1ea3b31f523280}{update\+Statistics}} (int registrations, int visits, int generations) +\begin{DoxyCompactList}\small\item\em Обновление статистики. \end{DoxyCompactList}\item +QVariant\+Map \mbox{\hyperlink{class_data_base_singleton_aad20b90cdb02aab3df1f27a9e4f882a3}{get\+Statistics}} () +\begin{DoxyCompactList}\small\item\em Получение статистики. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +static \mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{get\+Instance}} () +\begin{DoxyCompactList}\small\item\em Получение единственного экземпляра Singleton. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{Data\+Base\+Singleton}} () +\begin{DoxyCompactList}\small\item\em Приватный конструктор. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_data_base_singleton_abe02a9a0f33a2664ba969d20d777d4d9}{Data\+Base\+Singleton}} (const \mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \&)=delete +\begin{DoxyCompactList}\small\item\em Запрещает копирование экземпляра \end{DoxyCompactList}\item +\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \& \mbox{\hyperlink{class_data_base_singleton_af310f74ceebe21ef29454dd7eccac19a}{operator=}} (const \mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \&)=delete +\begin{DoxyCompactList}\small\item\em Запрещает присваивание \end{DoxyCompactList}\item +\mbox{\hyperlink{class_data_base_singleton_aa0d2615a21bdb8d7367a513c802e32c1}{\texorpdfstring{$\sim$}{\string~}\+Data\+Base\+Singleton}} ()=default +\begin{DoxyCompactList}\small\item\em Приватный деструктор. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +QSql\+Database \mbox{\hyperlink{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}{db}} +\begin{DoxyCompactList}\small\item\em Объект базы данных \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Static Private Attributes} +\begin{DoxyCompactItemize} +\item +static \mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_data_base_singleton_abf86267afcfebbe05658438ff0ccfdfd}{p\+\_\+instance}} = nullptr +\begin{DoxyCompactList}\small\item\em Единственный экземпляр класса \end{DoxyCompactList}\item +static \mbox{\hyperlink{class_singleton_destroyer}{Singleton\+Destroyer}} \mbox{\hyperlink{class_data_base_singleton_a414f1ff51603535a839d5fc2e24b65e0}{destroyer}} +\begin{DoxyCompactList}\small\item\em Объект-\/разрушитель \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Friends} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_data_base_singleton_aa93ce997b9645496c0e17460fba08432}{Singleton\+Destroyer}} +\begin{DoxyCompactList}\small\item\em Дружественный класс для доступа к деструктору \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Класс для работы с базой данных. + +Реализует паттерн Singleton для подключения к базе данных, выполнения SQL-\/запросов, а также управления данными пользователей, продуктов, избранных рационов и статистики. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}\index{DataBaseSingleton@{DataBaseSingleton}!DataBaseSingleton@{DataBaseSingleton}} +\index{DataBaseSingleton@{DataBaseSingleton}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{DataBaseSingleton()}{DataBaseSingleton()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily \label{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0} +Data\+Base\+Singleton\+::\+Data\+Base\+Singleton (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}} + + + +Приватный конструктор. + +Запрещает создание экземпляров класса напрямую. +\begin{DoxyCode}{0} +\DoxyCodeLine{00006\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00007\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}{db}}\ =\ QSqlDatabase::addDatabase(\textcolor{stringliteral}{"{}QSQLITE"{}});} +\DoxyCodeLine{00008\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_abe02a9a0f33a2664ba969d20d777d4d9}\index{DataBaseSingleton@{DataBaseSingleton}!DataBaseSingleton@{DataBaseSingleton}} +\index{DataBaseSingleton@{DataBaseSingleton}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{DataBaseSingleton()}{DataBaseSingleton()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily \label{class_data_base_singleton_abe02a9a0f33a2664ba969d20d777d4d9} +Data\+Base\+Singleton\+::\+Data\+Base\+Singleton (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \&}]{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [delete]}} + + + +Запрещает копирование экземпляра + +\Hypertarget{class_data_base_singleton_aa0d2615a21bdb8d7367a513c802e32c1}\index{DataBaseSingleton@{DataBaseSingleton}!````~DataBaseSingleton@{\texorpdfstring{$\sim$}{\string~}DataBaseSingleton}} +\index{````~DataBaseSingleton@{\texorpdfstring{$\sim$}{\string~}DataBaseSingleton}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}DataBaseSingleton()}{\string~DataBaseSingleton()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_aa0d2615a21bdb8d7367a513c802e32c1} +Data\+Base\+Singleton\+::\texorpdfstring{$\sim$}{\string~}\+Data\+Base\+Singleton (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [default]}} + + + +Приватный деструктор. + +Закрыт для предотвращения удаления экземпляра Singleton извне. + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_data_base_singleton_a515aed6cbbb34fe71f254943a70d504b}\index{DataBaseSingleton@{DataBaseSingleton}!addFavoriteRation@{addFavoriteRation}} +\index{addFavoriteRation@{addFavoriteRation}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{addFavoriteRation()}{addFavoriteRation()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_a515aed6cbbb34fe71f254943a70d504b} +bool Data\+Base\+Singleton\+::add\+Favorite\+Ration (\begin{DoxyParamCaption}\item[{int}]{user\+Id}{, }\item[{const QVector$<$ int $>$ \&}]{product\+Ids}{, }\item[{int}]{calories}{, }\item[{int}]{all\+Cost}{, }\item[{int}]{all\+Weight}{}\end{DoxyParamCaption})} + + + +Добавление рациона в избранное. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +{\em product\+Ids} & Список идентификаторов продуктов. \\ +\hline +{\em calories} & Общее количество калорий. \\ +\hline +{\em all\+Cost} & Общая стоимость рациона. \\ +\hline +{\em all\+Weight} & Общий вес рациона. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если рацион добавлен, иначе false. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00155\ \ \ \ \ \textcolor{comment}{//\ Преобразуем\ QVector\ в\ QVector}} +\DoxyCodeLine{00156\ \ \ \ \ QVector\ productIdsStr;} +\DoxyCodeLine{00157\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ \textcolor{keywordtype}{id}\ :\ productIds)\ \{} +\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ productIdsStr.append(QString::number(\textcolor{keywordtype}{id}));\ \textcolor{comment}{//\ Преобразуем\ int\ в\ QString}} +\DoxyCodeLine{00159\ \ \ \ \ \}} +\DoxyCodeLine{00160\ } +\DoxyCodeLine{00161\ \ \ \ \ \textcolor{comment}{//\ Преобразуем\ QVector\ в\ QStringList\ и\ объединяем\ в\ строку\ через\ запятую}} +\DoxyCodeLine{00162\ \ \ \ \ QString\ productsStr\ =\ QStringList::fromVector(productIdsStr).join(\textcolor{stringliteral}{"{},"{}});} +\DoxyCodeLine{00163\ } +\DoxyCodeLine{00164\ \ \ \ \ \textcolor{comment}{//\ Выполняем\ SQL-\/запрос}} +\DoxyCodeLine{00165\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}INSERT\ INTO\ favorites\ (id\_user,\ products,\ calories,\ all\_cost,\ all\_weight)\ "{}}} +\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}VALUES\ (:id\_user,\ :products,\ :calories,\ :all\_cost,\ :all\_weight)"{}},} +\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{\{\textcolor{stringliteral}{"{}:id\_user"{}},\ userId\},\ \{\textcolor{stringliteral}{"{}:products"{}},\ productsStr\},\ \{\textcolor{stringliteral}{"{}:calories"{}},\ calories\},} +\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:all\_cost"{}},\ allCost\},\ \{\textcolor{stringliteral}{"{}:all\_weight"{}},\ allWeight\}\}} +\DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ).exec();} +\DoxyCodeLine{00171\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_a3fe2a5e1f41a408023066e8caf63b523}\index{DataBaseSingleton@{DataBaseSingleton}!addProduct@{addProduct}} +\index{addProduct@{addProduct}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{addProduct()}{addProduct()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_a3fe2a5e1f41a408023066e8caf63b523} +bool Data\+Base\+Singleton\+::add\+Product (\begin{DoxyParamCaption}\item[{int}]{user\+Id}{, }\item[{const QString \&}]{name}{, }\item[{int}]{proteins}{, }\item[{int}]{fatness}{, }\item[{int}]{carbs}{, }\item[{int}]{weight}{, }\item[{int}]{cost}{, }\item[{int}]{type}{}\end{DoxyParamCaption})} + + + +Добавление продукта в базу данных. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +{\em name} & Название продукта. \\ +\hline +{\em proteins} & Количество белков в продукте. \\ +\hline +{\em fatness} & Количество жиров в продукте. \\ +\hline +{\em carbs} & Количество углеводов в продукте. \\ +\hline +{\em weight} & Вес продукта. \\ +\hline +{\em cost} & Стоимость продукта. \\ +\hline +{\em type} & Тип продукта. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если продукт добавлен, иначе false. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00115\ \ \ \ \ QSqlQuery\ query\ =\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}INSERT\ INTO\ products\ (id\_user,\ name,\ proteins,\ fatness,\ carbs,\ weight,\ cost,\ type)\ "{}}} +\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}VALUES\ (:id\_user,\ :name,\ :proteins,\ :fatness,\ :carbs,\ :weight,\ :cost,\ :type)"{}},} +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:id\_user"{}},\ userId\},} +\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:name"{}},\ name\},} +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:proteins"{}},\ proteins\},} +\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:fatness"{}},\ fatness\},} +\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:carbs"{}},\ carbs\},} +\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:weight"{}},\ weight\},} +\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:cost"{}},\ cost\},} +\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:type"{}},\ type\}} +\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00129\ \ \ \ \ \textcolor{keywordflow}{return}\ !query.lastError().isValid();\ \textcolor{comment}{//\ Возвращаем\ true,\ если\ ошибок\ нет}} +\DoxyCodeLine{00130\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_af17db97dfc40b0fa48b3ed9abeacca76}\index{DataBaseSingleton@{DataBaseSingleton}!addUser@{addUser}} +\index{addUser@{addUser}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{addUser()}{addUser()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_af17db97dfc40b0fa48b3ed9abeacca76} +bool Data\+Base\+Singleton\+::add\+User (\begin{DoxyParamCaption}\item[{const QString \&}]{name}{, }\item[{const QString \&}]{email}{, }\item[{const QString \&}]{password}{, }\item[{bool}]{is\+Admin}{ = {\ttfamily false}}\end{DoxyParamCaption})} + + + +Добавление нового пользователя в базу данных. + + +\begin{DoxyParams}{Parameters} +{\em name} & Имя пользователя. \\ +\hline +{\em email} & Электронная почта пользователя. \\ +\hline +{\em password} & Пароль пользователя. \\ +\hline +{\em is\+Admin} & Флаг администратора (по умолчанию false). \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если пользователь добавлен, иначе false. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00101\ \ \ \ \ QSqlQuery\ query\ =\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}INSERT\ INTO\ users\ (name,\ email,\ pass,\ is\_admin)\ VALUES\ (:name,\ :email,\ :pass,\ :is\_admin)"{}},} +\DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \{\{\textcolor{stringliteral}{"{}:name"{}},\ name\},\ \{\textcolor{stringliteral}{"{}:email"{}},\ email\},\ \{\textcolor{stringliteral}{"{}:pass"{}},\ password\},\ \{\textcolor{stringliteral}{"{}:is\_admin"{}},\ isAdmin\}\}} +\DoxyCodeLine{00104\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00105\ } +\DoxyCodeLine{00106\ \ \ \ \ \textcolor{keywordflow}{if}\ (query.lastError().isValid())\ \{} +\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Ошибка\ SQL:"{}}\ <<\ query.lastError().text();} +\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} +\DoxyCodeLine{00109\ \ \ \ \ \}} +\DoxyCodeLine{00110\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};} +\DoxyCodeLine{00111\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_a51bd7dc4507c5f3d04a2903899e13d42}\index{DataBaseSingleton@{DataBaseSingleton}!checkUserCredentials@{checkUserCredentials}} +\index{checkUserCredentials@{checkUserCredentials}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{checkUserCredentials()}{checkUserCredentials()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_a51bd7dc4507c5f3d04a2903899e13d42} +bool Data\+Base\+Singleton\+::check\+User\+Credentials (\begin{DoxyParamCaption}\item[{const QString \&}]{login}{, }\item[{const QString \&}]{password}{}\end{DoxyParamCaption})} + + + +Проверка учетных данных пользователя. + + +\begin{DoxyParams}{Parameters} +{\em login} & Логин пользователя. \\ +\hline +{\em password} & Пароль пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если учетные данные корректны, иначе false. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00093\ \ \ \ \ QSqlQuery\ query\ =\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}SELECT\ *\ FROM\ users\ WHERE\ email\ =\ :email\ AND\ pass\ =\ :pass"{}},} +\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \{\{\textcolor{stringliteral}{"{}:email"{}},\ email\},\ \{\textcolor{stringliteral}{"{}:pass"{}},\ password\}\}} +\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keywordflow}{return}\ query.next();} +\DoxyCodeLine{00098\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}\index{DataBaseSingleton@{DataBaseSingleton}!executeQuery@{executeQuery}} +\index{executeQuery@{executeQuery}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{executeQuery()}{executeQuery()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151} +QSql\+Query Data\+Base\+Singleton\+::execute\+Query (\begin{DoxyParamCaption}\item[{const QString \&}]{query}{, }\item[{const QVariant\+Map \&}]{params}{ = {\ttfamily QVariantMap()}}\end{DoxyParamCaption})} + + + +Выполнение SQL-\/запроса с параметрами. + + +\begin{DoxyParams}{Parameters} +{\em query} & SQL-\/запрос в виде строки. \\ +\hline +{\em params} & Параметры для SQL-\/запроса. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат выполнения запроса в виде QSql\+Query. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00079\ \ \ \ \ QSqlQuery\ query(\mbox{\hyperlink{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}{db}});} +\DoxyCodeLine{00080\ \ \ \ \ query.prepare(queryStr);} +\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\ it\ =\ params.begin();\ it\ !=\ params.end();\ ++it)\ \{} +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ query.bindValue(it.key(),\ it.value());} +\DoxyCodeLine{00083\ \ \ \ \ \}} +\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordflow}{if}\ (!query.exec())\ \{} +\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Ошибка\ запроса:"{}}\ <<\ query.lastError().text();} +\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Текст\ запроса:"{}}\ <<\ queryStr;} +\DoxyCodeLine{00087\ \ \ \ \ \}} +\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keywordflow}{return}\ query;} +\DoxyCodeLine{00089\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_afee32779221eaa5f92eb0c8a8666bb50}\index{DataBaseSingleton@{DataBaseSingleton}!getFavoritesByUser@{getFavoritesByUser}} +\index{getFavoritesByUser@{getFavoritesByUser}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{getFavoritesByUser()}{getFavoritesByUser()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_afee32779221eaa5f92eb0c8a8666bb50} +QVector$<$ QVariant\+Map $>$ Data\+Base\+Singleton\+::get\+Favorites\+By\+User (\begin{DoxyParamCaption}\item[{int}]{user\+Id}{}\end{DoxyParamCaption})} + + + +Получение избранных рационов пользователя. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Список избранных рационов пользователя. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00174\ \ \ \ \ QSqlQuery\ query\ =\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}SELECT\ *\ FROM\ favorites\ WHERE\ id\_user\ =\ :id\_user"{}},} +\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \{\{\textcolor{stringliteral}{"{}:id\_user"{}},\ userId\}\}} +\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00178\ \ \ \ \ QVector\ favorites;} +\DoxyCodeLine{00179\ \ \ \ \ \textcolor{keywordflow}{while}\ (query.next())\ \{} +\DoxyCodeLine{00180\ \ \ \ \ \ \ \ \ QVariantMap\ favorite;} +\DoxyCodeLine{00181\ \ \ \ \ \ \ \ \ favorite[\textcolor{stringliteral}{"{}products"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}products"{}}).toString();} +\DoxyCodeLine{00182\ \ \ \ \ \ \ \ \ favorite[\textcolor{stringliteral}{"{}calories"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}calories"{}}).toInt();} +\DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ favorite[\textcolor{stringliteral}{"{}all\_cost"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}all\_cost"{}}).toInt();} +\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ favorite[\textcolor{stringliteral}{"{}all\_weight"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}all\_weight"{}}).toInt();} +\DoxyCodeLine{00185\ \ \ \ \ \ \ \ \ favorites.append(favorite);} +\DoxyCodeLine{00186\ \ \ \ \ \}} +\DoxyCodeLine{00187\ \ \ \ \ \textcolor{keywordflow}{return}\ favorites;} +\DoxyCodeLine{00188\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}\index{DataBaseSingleton@{DataBaseSingleton}!getInstance@{getInstance}} +\index{getInstance@{getInstance}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{getInstance()}{getInstance()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede} +\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \texorpdfstring{$\ast$}{*} Data\+Base\+Singleton\+::get\+Instance (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} + + + +Получение единственного экземпляра Singleton. + +\begin{DoxyReturn}{Returns} +Экземпляр класса \doxylink{class_data_base_singleton}{Data\+Base\+Singleton}. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00010\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00011\ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{class_data_base_singleton_abf86267afcfebbe05658438ff0ccfdfd}{p\_instance}})\ \{} +\DoxyCodeLine{00012\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton_abf86267afcfebbe05658438ff0ccfdfd}{p\_instance}}\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{DataBaseSingleton}}();} +\DoxyCodeLine{00013\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton_a414f1ff51603535a839d5fc2e24b65e0}{destroyer}}.initialize(\mbox{\hyperlink{class_data_base_singleton_abf86267afcfebbe05658438ff0ccfdfd}{p\_instance}});} +\DoxyCodeLine{00014\ \ \ \ \ \}} +\DoxyCodeLine{00015\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_data_base_singleton_abf86267afcfebbe05658438ff0ccfdfd}{p\_instance}};} +\DoxyCodeLine{00016\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_a84fe7936dd15c077eff86d7884ce3049}\index{DataBaseSingleton@{DataBaseSingleton}!getProductsByUser@{getProductsByUser}} +\index{getProductsByUser@{getProductsByUser}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{getProductsByUser()}{getProductsByUser()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_a84fe7936dd15c077eff86d7884ce3049} +QVector$<$ QVariant\+Map $>$ Data\+Base\+Singleton\+::get\+Products\+By\+User (\begin{DoxyParamCaption}\item[{int}]{user\+Id}{}\end{DoxyParamCaption})} + + + +Получение продуктов для конкретного пользователя. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Список продуктов, принадлежащих пользователю. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00133\ \ \ \ \ QSqlQuery\ query\ =\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}SELECT\ *\ FROM\ products\ WHERE\ id\_user\ =\ :id\_user"{}},} +\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \{\{\textcolor{stringliteral}{"{}:id\_user"{}},\ userId\}\}} +\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00137\ \ \ \ \ QVector\ products;} +\DoxyCodeLine{00138\ \ \ \ \ \textcolor{keywordflow}{while}\ (query.next())\ \{} +\DoxyCodeLine{00139\ \ \ \ \ \ \ \ \ QVariantMap\ product;} +\DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ product[\textcolor{stringliteral}{"{}id"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}id"{}}).toInt();} +\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ product[\textcolor{stringliteral}{"{}name"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}name"{}}).toString();} +\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ product[\textcolor{stringliteral}{"{}proteins"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}proteins"{}}).toInt();} +\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ product[\textcolor{stringliteral}{"{}fatness"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}fatness"{}}).toInt();} +\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ product[\textcolor{stringliteral}{"{}carbs"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}carbs"{}}).toInt();} +\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ product[\textcolor{stringliteral}{"{}weight"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}weight"{}}).toInt();} +\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ product[\textcolor{stringliteral}{"{}cost"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}cost"{}}).toInt();} +\DoxyCodeLine{00147\ \ \ \ \ \ \ \ \ product[\textcolor{stringliteral}{"{}type"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}type"{}}).toInt();} +\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ products.append(product);} +\DoxyCodeLine{00149\ \ \ \ \ \}} +\DoxyCodeLine{00150\ \ \ \ \ \textcolor{keywordflow}{return}\ products;} +\DoxyCodeLine{00151\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_aad20b90cdb02aab3df1f27a9e4f882a3}\index{DataBaseSingleton@{DataBaseSingleton}!getStatistics@{getStatistics}} +\index{getStatistics@{getStatistics}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{getStatistics()}{getStatistics()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_aad20b90cdb02aab3df1f27a9e4f882a3} +QVariant\+Map Data\+Base\+Singleton\+::get\+Statistics (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение статистики. + +\begin{DoxyReturn}{Returns} +Словарь с данными статистики. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00200\ \ \ \ \ QSqlQuery\ query\ =\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(\textcolor{stringliteral}{"{}SELECT\ *\ FROM\ statistics"{}});} +\DoxyCodeLine{00201\ \ \ \ \ QVariantMap\ stats;} +\DoxyCodeLine{00202\ \ \ \ \ \textcolor{keywordflow}{if}\ (query.next())\ \{} +\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}registrations"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}count\_registrations"{}}).toInt();} +\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}visits"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}count\_visits"{}}).toInt();} +\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}generations"{}}]\ =\ query.value(\textcolor{stringliteral}{"{}count\_generations"{}}).toInt();} +\DoxyCodeLine{00206\ \ \ \ \ \}} +\DoxyCodeLine{00207\ \ \ \ \ \textcolor{keywordflow}{return}\ stats;} +\DoxyCodeLine{00208\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_a59bda63308000a018c5bdc1989582e50}\index{DataBaseSingleton@{DataBaseSingleton}!initialize@{initialize}} +\index{initialize@{initialize}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{initialize()}{initialize()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_a59bda63308000a018c5bdc1989582e50} +bool Data\+Base\+Singleton\+::initialize (\begin{DoxyParamCaption}\item[{const QString \&}]{database\+Name}{}\end{DoxyParamCaption})} + + + +Инициализация базы данных. + +Создает соединение с базой данных и выполняет необходимые операции для создания таблиц. + + +\begin{DoxyParams}{Parameters} +{\em database\+Name} & Имя файла базы данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если инициализация успешна, иначе false. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00019\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}{db}}.setDatabaseName(databaseName);} +\DoxyCodeLine{00020\ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}{db}}.open())\ \{} +\DoxyCodeLine{00021\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Ошибка\ подключения:"{}}\ <<\ \mbox{\hyperlink{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}{db}}.lastError().text();} +\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} +\DoxyCodeLine{00023\ \ \ \ \ \}} +\DoxyCodeLine{00024\ } +\DoxyCodeLine{00025\ \ \ \ \ \textcolor{comment}{//\ Создание\ таблицы\ users}} +\DoxyCodeLine{00026\ \ \ \ \ QSqlQuery\ query(\mbox{\hyperlink{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}{db}});} +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ query.exec(} +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}CREATE\ TABLE\ IF\ NOT\ EXISTS\ users\ ("{}}} +\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}id\ INTEGER\ PRIMARY\ KEY\ AUTOINCREMENT,\ "{}}} +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}name\ VARCHAR(20)\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}email\ VARCHAR(50)\ NOT\ NULL\ ,\ "{}}} +\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}pass\ VARCHAR(20)\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}is\_admin\ BOOLEAN\ DEFAULT\ FALSE)"{}}} +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00036\ \ \ \ \ \ success\ \&=\ query.exec(\textcolor{stringliteral}{"{}CREATE\ UNIQUE\ INDEX\ IF\ NOT\ EXISTS\ idx\_users\_email\ ON\ users(email)"{}});} +\DoxyCodeLine{00037\ } +\DoxyCodeLine{00038\ \ \ \ \ \textcolor{comment}{//\ Создание\ таблицы\ products}} +\DoxyCodeLine{00039\ \ \ \ \ success\ \&=\ query.exec(} +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}CREATE\ TABLE\ IF\ NOT\ EXISTS\ products\ ("{}}} +\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}id\ INTEGER\ PRIMARY\ KEY\ AUTOINCREMENT,\ "{}}} +\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}id\_user\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}name\ VARCHAR(50)\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}proteins\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}fatness\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}carbs\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}weight\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}cost\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}type\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}FOREIGN\ KEY(id\_user)\ REFERENCES\ users(id))"{}}} +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \ \ \ \ \textcolor{comment}{//\ Создание\ таблицы\ favorites}} +\DoxyCodeLine{00054\ \ \ \ \ success\ \&=\ query.exec(} +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}CREATE\ TABLE\ IF\ NOT\ EXISTS\ favorites\ ("{}}} +\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}id\_user\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}products\ TEXT\ NOT\ NULL,\ "{}}\ \ \textcolor{comment}{//\ Хранение\ массива\ ID\ продуктов\ в\ виде\ строки}} +\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}calories\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}all\_cost\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}all\_weight\ INTEGER\ NOT\ NULL,\ "{}}} +\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}FOREIGN\ KEY(id\_user)\ REFERENCES\ users(id))"{}}} +\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00063\ } +\DoxyCodeLine{00064\ \ \ \ \ \textcolor{comment}{//\ Создание\ таблицы\ statistics}} +\DoxyCodeLine{00065\ \ \ \ \ success\ \&=\ query.exec(} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}CREATE\ TABLE\ IF\ NOT\ EXISTS\ statistics\ ("{}}} +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}count\_registrations\ INTEGER\ DEFAULT\ 0,\ "{}}} +\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}count\_visits\ INTEGER\ DEFAULT\ 0,\ "{}}} +\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}count\_generations\ INTEGER\ DEFAULT\ 0)"{}}} +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00071\ } +\DoxyCodeLine{00072\ \ \ \ \ \textcolor{comment}{//\ Инициализация\ статистики,\ если\ таблица\ пуста}} +\DoxyCodeLine{00073\ \ \ \ \ query.exec(\textcolor{stringliteral}{"{}INSERT\ OR\ IGNORE\ INTO\ statistics\ (count\_registrations,\ count\_visits,\ count\_generations)\ VALUES\ (0,\ 0,\ 0)"{}});} +\DoxyCodeLine{00074\ \ \ \ \ query.exec(\textcolor{stringliteral}{"{}INSERT\ OR\ IGNORE\ INTO\ users(name,\ email,\ pass,\ is\_admin)\ VALUES\ ('NewDev','new@devs.su','admin',true)"{}});} +\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keywordflow}{return}\ success;} +\DoxyCodeLine{00076\ \}} + +\end{DoxyCode} +\Hypertarget{class_data_base_singleton_af310f74ceebe21ef29454dd7eccac19a}\index{DataBaseSingleton@{DataBaseSingleton}!operator=@{operator=}} +\index{operator=@{operator=}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{operator=()}{operator=()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_af310f74ceebe21ef29454dd7eccac19a} +\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \& Data\+Base\+Singleton\+::operator= (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \&}]{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [delete]}} + + + +Запрещает присваивание + +\Hypertarget{class_data_base_singleton_ab2877d5184cd7af28f1ea3b31f523280}\index{DataBaseSingleton@{DataBaseSingleton}!updateStatistics@{updateStatistics}} +\index{updateStatistics@{updateStatistics}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{updateStatistics()}{updateStatistics()}} +{\footnotesize\ttfamily \label{class_data_base_singleton_ab2877d5184cd7af28f1ea3b31f523280} +bool Data\+Base\+Singleton\+::update\+Statistics (\begin{DoxyParamCaption}\item[{int}]{registrations}{, }\item[{int}]{visits}{, }\item[{int}]{generations}{}\end{DoxyParamCaption})} + + + +Обновление статистики. + + +\begin{DoxyParams}{Parameters} +{\em registrations} & Количество регистраций. \\ +\hline +{\em visits} & Количество посещений. \\ +\hline +{\em generations} & Количество генераций. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если статистика обновлена, иначе false. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00191\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00192\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}UPDATE\ statistics\ SET\ count\_registrations\ =\ :registrations,\ "{}}} +\DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}count\_visits\ =\ :visits,\ count\_generations\ =\ :generations"{}},} +\DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{\{\textcolor{stringliteral}{"{}:registrations"{}},\ registrations\},\ \{\textcolor{stringliteral}{"{}:visits"{}},\ visits\},\ \{\textcolor{stringliteral}{"{}:generations"{}},\ generations\}\}} +\DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ).exec();} +\DoxyCodeLine{00197\ \}} + +\end{DoxyCode} + + +\doxysubsection{Friends And Related Symbol Documentation} +\Hypertarget{class_data_base_singleton_aa93ce997b9645496c0e17460fba08432}\index{DataBaseSingleton@{DataBaseSingleton}!SingletonDestroyer@{SingletonDestroyer}} +\index{SingletonDestroyer@{SingletonDestroyer}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{SingletonDestroyer}{SingletonDestroyer}} +{\footnotesize\ttfamily \label{class_data_base_singleton_aa93ce997b9645496c0e17460fba08432} +friend class \mbox{\hyperlink{class_singleton_destroyer}{Singleton\+Destroyer}}\hspace{0.3cm}{\ttfamily [friend]}} + + + +Дружественный класс для доступа к деструктору + + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}\index{DataBaseSingleton@{DataBaseSingleton}!db@{db}} +\index{db@{db}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{db}{db}} +{\footnotesize\ttfamily \label{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a} +QSql\+Database Data\+Base\+Singleton\+::db\hspace{0.3cm}{\ttfamily [private]}} + + + +Объект базы данных + +\Hypertarget{class_data_base_singleton_a414f1ff51603535a839d5fc2e24b65e0}\index{DataBaseSingleton@{DataBaseSingleton}!destroyer@{destroyer}} +\index{destroyer@{destroyer}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{destroyer}{destroyer}} +{\footnotesize\ttfamily \label{class_data_base_singleton_a414f1ff51603535a839d5fc2e24b65e0} +\mbox{\hyperlink{class_singleton_destroyer}{Singleton\+Destroyer}} Data\+Base\+Singleton\+::destroyer\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}} + + + +Объект-\/разрушитель + +\Hypertarget{class_data_base_singleton_abf86267afcfebbe05658438ff0ccfdfd}\index{DataBaseSingleton@{DataBaseSingleton}!p\_instance@{p\_instance}} +\index{p\_instance@{p\_instance}!DataBaseSingleton@{DataBaseSingleton}} +\doxysubsubsection{\texorpdfstring{p\_instance}{p\_instance}} +{\footnotesize\ttfamily \label{class_data_base_singleton_abf86267afcfebbe05658438ff0ccfdfd} +\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \texorpdfstring{$\ast$}{*} Data\+Base\+Singleton\+::p\+\_\+instance = nullptr\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}} + + + +Единственный экземпляр класса + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +server/\mbox{\hyperlink{databasesingleton_8h}{databasesingleton.\+h}}\item +server/\mbox{\hyperlink{databasesingleton_8cpp}{databasesingleton.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_data_base_singleton__coll__graph.dot b/docs/doxygen/latex/class_data_base_singleton__coll__graph.dot new file mode 100644 index 0000000..e02d38d --- /dev/null +++ b/docs/doxygen/latex/class_data_base_singleton__coll__graph.dot @@ -0,0 +1,12 @@ +digraph "DataBaseSingleton" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="DataBaseSingleton",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс для работы с базой данных."]; + Node1 -> Node1 [id="edge4_Node000001_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node2 -> Node1 [id="edge5_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" destroyer",fontcolor="grey" ]; + Node2 [id="Node000002",label="SingletonDestroyer",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_singleton_destroyer.html",tooltip="Класс для разрушения экземпляра Singleton."]; + Node1 -> Node2 [id="edge6_Node000002_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; +} diff --git a/docs/doxygen/latex/class_data_base_singleton__coll__graph.md5 b/docs/doxygen/latex/class_data_base_singleton__coll__graph.md5 new file mode 100644 index 0000000..a51b0d0 --- /dev/null +++ b/docs/doxygen/latex/class_data_base_singleton__coll__graph.md5 @@ -0,0 +1 @@ +44ef20774752749ea9a8c5def98e9179 \ No newline at end of file diff --git a/docs/doxygen/latex/class_data_base_singleton__coll__graph.pdf b/docs/doxygen/latex/class_data_base_singleton__coll__graph.pdf new file mode 100644 index 0000000..dcdb1d8 Binary files /dev/null and b/docs/doxygen/latex/class_data_base_singleton__coll__graph.pdf differ diff --git a/docs/doxygen/latex/class_main_window.tex b/docs/doxygen/latex/class_main_window.tex new file mode 100644 index 0000000..f9eb116 --- /dev/null +++ b/docs/doxygen/latex/class_main_window.tex @@ -0,0 +1,519 @@ +\doxysection{Main\+Window Class Reference} +\hypertarget{class_main_window}{}\label{class_main_window}\index{MainWindow@{MainWindow}} + + +Главное окно клиента. + + + + +{\ttfamily \#include $<$mainwindow.\+h$>$} + + + +Inheritance diagram for Main\+Window\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=160pt]{class_main_window__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Main\+Window\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=160pt]{class_main_window__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Slots} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_main_window_a9a15eca3ebf289292af72b78b2cf1b56}{slot\+\_\+show}} () +\begin{DoxyCompactList}\small\item\em Показывает главное окно. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_main_window_a91a9ec299ac67e179bd9e3acbf23eb0c}{set\+\_\+current\+\_\+user}} (QString \mbox{\hyperlink{class_main_window_a9ba91413f46ab4481ab8042ac8f2b799}{id}}, QString \mbox{\hyperlink{class_main_window_a4338481359e3e8145930703e0089340f}{login}}, QString \mbox{\hyperlink{class_main_window_a46daecfbbd4056b097b3b470cc4f1618}{email}}) +\begin{DoxyCompactList}\small\item\em Устанавливает данные текущего пользователя. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_main_window_a9e4beb27bda168783b6e71d486ebcb90}{handle\+Product\+Added}} (QString name, int proteins, int fats, int carbs, int weight, int cost, int type) +\begin{DoxyCompactList}\small\item\em Обрабатывает добавление нового продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Signals} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_main_window_afa09d58e484be8e5c49e5f5b33f0e3d8}{add\+\_\+product}} () +\begin{DoxyCompactList}\small\item\em Сигнал, указывающий на необходимость открыть окно добавления продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_main_window_a996c5a2b6f77944776856f08ec30858d}{Main\+Window}} (QWidget \texorpdfstring{$\ast$}{*}parent=nullptr) +\begin{DoxyCompactList}\small\item\em Конструктор класса \doxylink{class_main_window}{Main\+Window}. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_main_window_ae98d00a93bc118200eeef9f9bba1dba7}{\texorpdfstring{$\sim$}{\string~}\+Main\+Window}} () +\begin{DoxyCompactList}\small\item\em Деструктор. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +QString \mbox{\hyperlink{class_main_window_a9ba91413f46ab4481ab8042ac8f2b799}{id}} +\begin{DoxyCompactList}\small\item\em Идентификатор текущего пользователя. \end{DoxyCompactList}\item +QString \mbox{\hyperlink{class_main_window_a4338481359e3e8145930703e0089340f}{login}} +\begin{DoxyCompactList}\small\item\em Логин пользователя. \end{DoxyCompactList}\item +QString \mbox{\hyperlink{class_main_window_a25493964c8f550b2380a12616fbc8250}{password}} +\begin{DoxyCompactList}\small\item\em Пароль пользователя. \end{DoxyCompactList}\item +QString \mbox{\hyperlink{class_main_window_a46daecfbbd4056b097b3b470cc4f1618}{email}} +\begin{DoxyCompactList}\small\item\em Электронная почта пользователя. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Slots} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_main_window_a9c7432f74a43023beb13ba1250e9c6bd}{on\+\_\+stable\+Stat\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия на кнопку "{}Стабильная статистика"{}. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_main_window_a0c422ab00483005eb0251aa551869d70}{on\+\_\+dynamic\+Stat\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия на кнопку "{}Динамическая статистика"{}. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_main_window_a2ccbff8c6af34935185f027972958b5c}{on\+\_\+table\+Users\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия на кнопку "{}Список пользователей"{}. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_main_window_a11507d87b5fb4a79fb557e8e313c90cd}{on\+\_\+product\+List\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия на кнопку "{}Список продуктов"{}. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_main_window_aa811d4e586dc8aee0fb9cbdc953342a2}{on\+\_\+create\+Men\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия на кнопку "{}Создать рацион"{}. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_main_window_a0a031c02eff36254765c9030a443ab04}{on\+\_\+add\+Product\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия на кнопку "{}Добавить продукт"{}. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_main_window_afcbbbc80001065310d2cd6221c5be55c}{on\+\_\+exit\+Button\+\_\+clicked}} () +\begin{DoxyCompactList}\small\item\em Обработчик нажатия на кнопку "{}Выход"{}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +Ui\+::\+Main\+Window \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}} +\begin{DoxyCompactList}\small\item\em Указатель на UI-\/элементы окна. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Главное окно клиента. + +Отвечает за отображение основной информации, взаимодействие с продуктами, пользователями, рационом и статистикой. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_main_window_a996c5a2b6f77944776856f08ec30858d}\index{MainWindow@{MainWindow}!MainWindow@{MainWindow}} +\index{MainWindow@{MainWindow}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{MainWindow()}{MainWindow()}} +{\footnotesize\ttfamily \label{class_main_window_a996c5a2b6f77944776856f08ec30858d} +Main\+Window\+::\+Main\+Window (\begin{DoxyParamCaption}\item[{QWidget \texorpdfstring{$\ast$}{*}}]{parent}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}} + + + +Конструктор класса \doxylink{class_main_window}{Main\+Window}. + + +\begin{DoxyParams}{Parameters} +{\em parent} & Родительский виджет. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00012\ \ \ \ \ :\ QMainWindow(parent)} +\DoxyCodeLine{00013\ \ \ \ \ ,\ \mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}(\textcolor{keyword}{new}\ Ui::MainWindow) } +\DoxyCodeLine{00014\ \{} +\DoxyCodeLine{00015\ \ \ \ \ \mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}-\/>setupUi(\textcolor{keyword}{this});} +\DoxyCodeLine{00016\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_ae98d00a93bc118200eeef9f9bba1dba7}\index{MainWindow@{MainWindow}!````~MainWindow@{\texorpdfstring{$\sim$}{\string~}MainWindow}} +\index{````~MainWindow@{\texorpdfstring{$\sim$}{\string~}MainWindow}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}MainWindow()}{\string~MainWindow()}} +{\footnotesize\ttfamily \label{class_main_window_ae98d00a93bc118200eeef9f9bba1dba7} +Main\+Window\+::\texorpdfstring{$\sim$}{\string~}\+Main\+Window (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Деструктор. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00019\ \{} +\DoxyCodeLine{00020\ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}};} +\DoxyCodeLine{00021\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_main_window_afa09d58e484be8e5c49e5f5b33f0e3d8}\index{MainWindow@{MainWindow}!add\_product@{add\_product}} +\index{add\_product@{add\_product}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{add\_product}{add\_product}} +{\footnotesize\ttfamily \label{class_main_window_afa09d58e484be8e5c49e5f5b33f0e3d8} +void Main\+Window\+::add\+\_\+product (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [signal]}} + + + +Сигнал, указывающий на необходимость открыть окно добавления продукта. + +\Hypertarget{class_main_window_a9e4beb27bda168783b6e71d486ebcb90}\index{MainWindow@{MainWindow}!handleProductAdded@{handleProductAdded}} +\index{handleProductAdded@{handleProductAdded}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{handleProductAdded}{handleProductAdded}} +{\footnotesize\ttfamily \label{class_main_window_a9e4beb27bda168783b6e71d486ebcb90} +void Main\+Window\+::handle\+Product\+Added (\begin{DoxyParamCaption}\item[{QString}]{name}{, }\item[{int}]{proteins}{, }\item[{int}]{fats}{, }\item[{int}]{carbs}{, }\item[{int}]{weight}{, }\item[{int}]{cost}{, }\item[{int}]{type}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Обрабатывает добавление нового продукта. + + +\begin{DoxyParams}{Parameters} +{\em name} & Название продукта. \\ +\hline +{\em proteins} & Белки. \\ +\hline +{\em fats} & Жиры. \\ +\hline +{\em carbs} & Углеводы. \\ +\hline +{\em weight} & Вес. \\ +\hline +{\em cost} & Стоимость. \\ +\hline +{\em type} & Тип продукта. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00179\ \{} +\DoxyCodeLine{00180\ \ \ \ \ QByteArray\ response\ =\ \mbox{\hyperlink{class_main_window_afa09d58e484be8e5c49e5f5b33f0e3d8}{::add\_product}}(\textcolor{keywordtype}{id},\ name,\ proteins,\ fats,\ carbs,\ weight,\ cost,\ type);} +\DoxyCodeLine{00181\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Response\ from\ server:"{}}\ <<\ response;} +\DoxyCodeLine{00182\ } +\DoxyCodeLine{00183\ \ \ \ \ \textcolor{keywordflow}{if}\ (response.contains(\textcolor{stringliteral}{"{}success"{}}))\ \{} +\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ QMessageBox::information(\textcolor{keyword}{this},\ \textcolor{stringliteral}{"{}Успех"{}},\ \textcolor{stringliteral}{"{}Продукт\ успешно\ добавлен!"{}});} +\DoxyCodeLine{00185\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ QMessageBox::warning(\textcolor{keyword}{this},\ \textcolor{stringliteral}{"{}Ошибка"{}},\ \textcolor{stringliteral}{"{}Не\ удалось\ добавить\ продукт:\ "{}}\ +\ response);} +\DoxyCodeLine{00187\ \ \ \ \ \}} +\DoxyCodeLine{00188\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_a0a031c02eff36254765c9030a443ab04}\index{MainWindow@{MainWindow}!on\_addProductButton\_clicked@{on\_addProductButton\_clicked}} +\index{on\_addProductButton\_clicked@{on\_addProductButton\_clicked}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{on\_addProductButton\_clicked}{on\_addProductButton\_clicked}} +{\footnotesize\ttfamily \label{class_main_window_a0a031c02eff36254765c9030a443ab04} +void Main\+Window\+::on\+\_\+add\+Product\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия на кнопку "{}Добавить продукт"{}. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00173\ \{} +\DoxyCodeLine{00174\ \ \ \ \ emit\ \mbox{\hyperlink{class_main_window_afa09d58e484be8e5c49e5f5b33f0e3d8}{add\_product}}();\ \ \textcolor{comment}{//\ Отправляем\ сигнал\ для\ открытия\ окна\ добавления\ продукта}} +\DoxyCodeLine{00175\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_aa811d4e586dc8aee0fb9cbdc953342a2}\index{MainWindow@{MainWindow}!on\_createMenButton\_clicked@{on\_createMenButton\_clicked}} +\index{on\_createMenButton\_clicked@{on\_createMenButton\_clicked}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{on\_createMenButton\_clicked}{on\_createMenButton\_clicked}} +{\footnotesize\ttfamily \label{class_main_window_aa811d4e586dc8aee0fb9cbdc953342a2} +void Main\+Window\+::on\+\_\+create\+Men\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия на кнопку "{}Создать рацион"{}. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00131\ \{} +\DoxyCodeLine{00132\ \ \ \ \ QScrollArea*\ scrollArea\ =\ qobject\_cast(\mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}-\/>mainContainer-\/>findChild(\textcolor{stringliteral}{"{}innerScrollArea"{}}));} +\DoxyCodeLine{00133\ } +\DoxyCodeLine{00134\ \ \ \ \ \textcolor{keywordflow}{if}\ (!scrollArea)\ \{} +\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ scrollArea\ =\ \textcolor{keyword}{new}\ QScrollArea(\mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}-\/>mainContainer);} +\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ scrollArea-\/>setObjectName(\textcolor{stringliteral}{"{}innerScrollArea"{}});} +\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ scrollArea-\/>setWidgetResizable(\textcolor{keyword}{false});\ \textcolor{comment}{//\ Отключаем\ авто-\/растягивание}} +\DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ scrollArea-\/>setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);} +\DoxyCodeLine{00139\ } +\DoxyCodeLine{00140\ } +\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}-\/>mainContainer-\/>layout())\ \{} +\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}-\/>mainContainer-\/>layout();} +\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}-\/>mainContainer-\/>setLayout(\textcolor{keyword}{new}\ QVBoxLayout());} +\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}-\/>mainContainer-\/>layout()-\/>addWidget(scrollArea);} +\DoxyCodeLine{00146\ \ \ \ \ \}} +\DoxyCodeLine{00147\ } +\DoxyCodeLine{00148\ \ \ \ \ QWidget*\ cardsContainer\ =\ \textcolor{keyword}{new}\ QWidget();} +\DoxyCodeLine{00149\ \ \ \ \ QHBoxLayout*\ cardsLayout\ =\ \textcolor{keyword}{new}\ QHBoxLayout(cardsContainer);} +\DoxyCodeLine{00150\ \ \ \ \ cardsLayout-\/>setSpacing(10);} +\DoxyCodeLine{00151\ } +\DoxyCodeLine{00152\ \ \ \ \ \textcolor{keyword}{const}\ QStringList\ days\ =\ \{\textcolor{stringliteral}{"{}ПОНЕДЕЛЬНИК"{}},\ \textcolor{stringliteral}{"{}ВТОРНИК"{}},\ \textcolor{stringliteral}{"{}СРЕДА"{}},\ \textcolor{stringliteral}{"{}ЧЕТВЕРГ"{}},\ \textcolor{stringliteral}{"{}ПЯТНИЦА"{}},\ \textcolor{stringliteral}{"{}СУББОТА"{}},\ \textcolor{stringliteral}{"{}ВОСКРЕСЕНЬЕ"{}}\};} +\DoxyCodeLine{00153\ } +\DoxyCodeLine{00154\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ 7;\ i++)\ \{} +\DoxyCodeLine{00155\ } +\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ QStringList\ products\ =\ \{\textcolor{stringliteral}{"{}Курица\ c\ рисом"{}},\ \textcolor{stringliteral}{"{}Овощи"{}},\ \textcolor{stringliteral}{"{}Квас"{}}\};} +\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ QVector\ pfc\ =\ \{34,\ 21,\ 113\};} +\DoxyCodeLine{00158\ } +\DoxyCodeLine{00159\ } +\DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ menuCard*\ card\ =\ \textcolor{keyword}{new}\ menuCard(days[i],\ products,\ 623,\ pfc,\ 500,\ 219,\ cardsContainer);} +\DoxyCodeLine{00161\ } +\DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ card-\/>setFixedSize(370,\ 468);} +\DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ cardsLayout-\/>addWidget(card);} +\DoxyCodeLine{00164\ \ \ \ \ \}} +\DoxyCodeLine{00165\ } +\DoxyCodeLine{00166\ \ \ \ \ \textcolor{comment}{//\ 4.\ Настраиваем\ скролл}} +\DoxyCodeLine{00167\ \ \ \ \ scrollArea-\/>setWidget(cardsContainer);} +\DoxyCodeLine{00168\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_a0c422ab00483005eb0251aa551869d70}\index{MainWindow@{MainWindow}!on\_dynamicStatButton\_clicked@{on\_dynamicStatButton\_clicked}} +\index{on\_dynamicStatButton\_clicked@{on\_dynamicStatButton\_clicked}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{on\_dynamicStatButton\_clicked}{on\_dynamicStatButton\_clicked}} +{\footnotesize\ttfamily \label{class_main_window_a0c422ab00483005eb0251aa551869d70} +void Main\+Window\+::on\+\_\+dynamic\+Stat\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия на кнопку "{}Динамическая статистика"{}. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00048\ \{} +\DoxyCodeLine{00049\ \ \ \ \ QString\ stat\ =\ \mbox{\hyperlink{func2serv_8cpp_a8a2ae0ff8263d70f4e0f30d6b0d89af7}{get\_dynamic\_stat}}();\ \textcolor{comment}{//\ вызываем\ функцию\ получения\ статистки\ из\ func\_for\_cleint\ по\ клику\ на\ кнопку}} +\DoxyCodeLine{00050\ \ \ \ \ qDebug()\ <<\ stat;} +\DoxyCodeLine{00051\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_afcbbbc80001065310d2cd6221c5be55c}\index{MainWindow@{MainWindow}!on\_exitButton\_clicked@{on\_exitButton\_clicked}} +\index{on\_exitButton\_clicked@{on\_exitButton\_clicked}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{on\_exitButton\_clicked}{on\_exitButton\_clicked}} +{\footnotesize\ttfamily \label{class_main_window_afcbbbc80001065310d2cd6221c5be55c} +void Main\+Window\+::on\+\_\+exit\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия на кнопку "{}Выход"{}. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00192\ \{} +\DoxyCodeLine{00193\ \ \ \ \ \textcolor{comment}{//\ Получаем\ путь\ к\ исполняемому\ файлу\ и\ аргументы}} +\DoxyCodeLine{00194\ \ \ \ \ QString\ program\ =\ QApplication::applicationFilePath();} +\DoxyCodeLine{00195\ \ \ \ \ QStringList\ arguments\ =\ QApplication::arguments();} +\DoxyCodeLine{00196\ \ \ \ \ arguments.removeFirst();\ \textcolor{comment}{//\ Удаляем\ первый\ аргумент\ (путь\ к\ программе)}} +\DoxyCodeLine{00197\ } +\DoxyCodeLine{00198\ \ \ \ \ \textcolor{comment}{//\ Запускаем\ новый\ экземпляр\ приложения}} +\DoxyCodeLine{00199\ \ \ \ \ QProcess::startDetached(program,\ arguments);} +\DoxyCodeLine{00200\ } +\DoxyCodeLine{00201\ \ \ \ \ \textcolor{comment}{//\ Закрываем\ текущее\ приложение}} +\DoxyCodeLine{00202\ \ \ \ \ QApplication::quit();} +\DoxyCodeLine{00203\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_a11507d87b5fb4a79fb557e8e313c90cd}\index{MainWindow@{MainWindow}!on\_productListButton\_clicked@{on\_productListButton\_clicked}} +\index{on\_productListButton\_clicked@{on\_productListButton\_clicked}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{on\_productListButton\_clicked}{on\_productListButton\_clicked}} +{\footnotesize\ttfamily \label{class_main_window_a11507d87b5fb4a79fb557e8e313c90cd} +void Main\+Window\+::on\+\_\+product\+List\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия на кнопку "{}Список продуктов"{}. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00063\ \{} +\DoxyCodeLine{00064\ \ \ \ \ \textcolor{comment}{//\ Получаем\ строку\ с\ продуктами\ (JSON)}} +\DoxyCodeLine{00065\ \ \ \ \ QByteArray\ productsJson\ =\ \mbox{\hyperlink{func2serv_8cpp_a73b3ae758a8cf3621318d27cd1a17722}{get\_products}}(\textcolor{keywordtype}{id});} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Сырой\ JSON\ продуктов:\ "{}}\ <<\ productsJson;} +\DoxyCodeLine{00068\ } +\DoxyCodeLine{00069\ \ \ \ \ \textcolor{comment}{//\ Парсим\ JSON}} +\DoxyCodeLine{00070\ \ \ \ \ QJsonParseError\ parseError;} +\DoxyCodeLine{00071\ \ \ \ \ QJsonDocument\ doc\ =\ QJsonDocument::fromJson(productsJson,\ \&parseError);} +\DoxyCodeLine{00072\ } +\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keywordflow}{if}\ (parseError.error\ !=\ QJsonParseError::NoError)\ \{} +\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Ошибка\ парсинга\ JSON:\ "{}}\ <<\ parseError.errorString();} +\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00076\ \ \ \ \ \}} +\DoxyCodeLine{00077\ } +\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keywordflow}{if}\ (!doc.isArray())\ \{} +\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Ошибка:\ ожидался\ JSON-\/массив!"{}};} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00081\ \ \ \ \ \}} +\DoxyCodeLine{00082\ } +\DoxyCodeLine{00083\ \ \ \ \ QJsonArray\ productArray\ =\ doc.array();} +\DoxyCodeLine{00084\ } +\DoxyCodeLine{00085\ \ \ \ \ \textcolor{comment}{//\ Берём\ контейнер\ и\ полностью\ очищаем\ старый\ layout\ (с\ удалением)}} +\DoxyCodeLine{00086\ \ \ \ \ QWidget*\ container\ =\ \mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}}-\/>mainContainer;} +\DoxyCodeLine{00087\ } +\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keywordflow}{if}\ (QLayout*\ oldLayout\ =\ container-\/>layout())\ \{} +\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (QLayoutItem*\ item\ =\ oldLayout-\/>takeAt(0))\ \{} +\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (QWidget*\ widget\ =\ item-\/>widget())\ \{} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ widget;\ \textcolor{comment}{//\ Удаляем\ виджет}} +\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ item;\ \textcolor{comment}{//\ Удаляем\ item}} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ oldLayout;\ \textcolor{comment}{//\ Полностью\ удаляем\ старый\ layout}} +\DoxyCodeLine{00096\ \ \ \ \ \}} +\DoxyCodeLine{00097\ } +\DoxyCodeLine{00098\ \ \ \ \ \textcolor{comment}{//\ ВСЕГДА\ создаём\ новый\ layout\ после\ удаления}} +\DoxyCodeLine{00099\ \ \ \ \ QGridLayout*\ gridLayout\ =\ \textcolor{keyword}{new}\ QGridLayout(container);} +\DoxyCodeLine{00100\ \ \ \ \ container-\/>setLayout(gridLayout);} +\DoxyCodeLine{00101\ } +\DoxyCodeLine{00102\ \ \ \ \ \textcolor{comment}{//\ Создаём\ карточки}} +\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ columns\ =\ 4;} +\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ productArray.size();\ ++i)\ \{} +\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ QJsonObject\ obj\ =\ productArray[i].toObject();} +\DoxyCodeLine{00106\ } +\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ QString\ productName\ =\ obj[\textcolor{stringliteral}{"{}name"{}}].toString();} +\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ price\ =\ obj[\textcolor{stringliteral}{"{}cost"{}}].toInt();} +\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ proteins\ =\ obj[\textcolor{stringliteral}{"{}proteins"{}}].toInt();} +\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ fatness\ =\ obj[\textcolor{stringliteral}{"{}fatness"{}}].toInt();} +\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ carbs\ =\ obj[\textcolor{stringliteral}{"{}carbs"{}}].toInt();} +\DoxyCodeLine{00112\ } +\DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Продукт\ \#"{}}\ <<\ (i\ +\ 1)} +\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}\ Name:"{}}\ <<\ productName} +\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}\ Price:"{}}\ <<\ price} +\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}\ Proteins:"{}}\ <<\ proteins} +\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}\ Fatness:"{}}\ <<\ fatness} +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}\ Carbs:"{}}\ <<\ carbs;} +\DoxyCodeLine{00119\ } +\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ productCard*\ card\ =\ \textcolor{keyword}{new}\ productCard(productName,\ price,\ proteins,\ fatness,\ carbs,\ container);} +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ gridLayout-\/>addWidget(card,\ i\ /\ columns,\ i\ \%\ columns);} +\DoxyCodeLine{00122\ \ \ \ \ \}} +\DoxyCodeLine{00123\ } +\DoxyCodeLine{00124\ \ \ \ \ container-\/>setVisible(\textcolor{keyword}{true});} +\DoxyCodeLine{00125\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_a9c7432f74a43023beb13ba1250e9c6bd}\index{MainWindow@{MainWindow}!on\_stableStatButton\_clicked@{on\_stableStatButton\_clicked}} +\index{on\_stableStatButton\_clicked@{on\_stableStatButton\_clicked}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{on\_stableStatButton\_clicked}{on\_stableStatButton\_clicked}} +{\footnotesize\ttfamily \label{class_main_window_a9c7432f74a43023beb13ba1250e9c6bd} +void Main\+Window\+::on\+\_\+stable\+Stat\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия на кнопку "{}Стабильная статистика"{}. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00041\ \{} +\DoxyCodeLine{00042\ \ \ \ \ QString\ stat\ =\ \mbox{\hyperlink{func2serv_8cpp_a2d521723770cde0e28bb41544394917b}{get\_stable\_stat}}();\ \textcolor{comment}{//\ вызываем\ функцию\ получения\ статистки\ из\ func\_for\_cleint\ по\ клику\ на\ кнопку}} +\DoxyCodeLine{00043\ \ \ \ \ qDebug()\ <<\ stat;} +\DoxyCodeLine{00044\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_a2ccbff8c6af34935185f027972958b5c}\index{MainWindow@{MainWindow}!on\_tableUsersButton\_clicked@{on\_tableUsersButton\_clicked}} +\index{on\_tableUsersButton\_clicked@{on\_tableUsersButton\_clicked}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{on\_tableUsersButton\_clicked}{on\_tableUsersButton\_clicked}} +{\footnotesize\ttfamily \label{class_main_window_a2ccbff8c6af34935185f027972958b5c} +void Main\+Window\+::on\+\_\+table\+Users\+Button\+\_\+clicked (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}, {\ttfamily [slot]}} + + + +Обработчик нажатия на кнопку "{}Список пользователей"{}. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00056\ \{} +\DoxyCodeLine{00057\ \ \ \ \ QByteArray\ users\ =\ \mbox{\hyperlink{func2serv_8cpp_ab8bda875989629df9b683e881296b32d}{get\_all\_users}}();} +\DoxyCodeLine{00058\ \ \ \ \ qDebug()\ <<\ users;} +\DoxyCodeLine{00059\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_a91a9ec299ac67e179bd9e3acbf23eb0c}\index{MainWindow@{MainWindow}!set\_current\_user@{set\_current\_user}} +\index{set\_current\_user@{set\_current\_user}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{set\_current\_user}{set\_current\_user}} +{\footnotesize\ttfamily \label{class_main_window_a91a9ec299ac67e179bd9e3acbf23eb0c} +void Main\+Window\+::set\+\_\+current\+\_\+user (\begin{DoxyParamCaption}\item[{QString}]{id}{, }\item[{QString}]{login}{, }\item[{QString}]{email}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Устанавливает данные текущего пользователя. + + +\begin{DoxyParams}{Parameters} +{\em id} & Идентификатор пользователя. \\ +\hline +{\em login} & Логин. \\ +\hline +{\em email} & Электронная почта. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00029\ \ \ \ \ this-\/>\textcolor{keywordtype}{id}\ =\ \mbox{\hyperlink{class_main_window_a9ba91413f46ab4481ab8042ac8f2b799}{id}};} +\DoxyCodeLine{00030\ \ \ \ \ this-\/>\mbox{\hyperlink{class_main_window_a4338481359e3e8145930703e0089340f}{login}}\ =\ \mbox{\hyperlink{class_main_window_a4338481359e3e8145930703e0089340f}{login}};} +\DoxyCodeLine{00031\ } +\DoxyCodeLine{00032\ \ \ \ \ this-\/>\mbox{\hyperlink{class_main_window_a46daecfbbd4056b097b3b470cc4f1618}{email}}\ =\ \mbox{\hyperlink{class_main_window_a46daecfbbd4056b097b3b470cc4f1618}{email}};} +\DoxyCodeLine{00033\ \}} + +\end{DoxyCode} +\Hypertarget{class_main_window_a9a15eca3ebf289292af72b78b2cf1b56}\index{MainWindow@{MainWindow}!slot\_show@{slot\_show}} +\index{slot\_show@{slot\_show}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{slot\_show}{slot\_show}} +{\footnotesize\ttfamily \label{class_main_window_a9a15eca3ebf289292af72b78b2cf1b56} +void Main\+Window\+::slot\+\_\+show (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Показывает главное окно. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00024\ \ \ \ \ this-\/>show();} +\DoxyCodeLine{00025\ \};} + +\end{DoxyCode} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_main_window_a46daecfbbd4056b097b3b470cc4f1618}\index{MainWindow@{MainWindow}!email@{email}} +\index{email@{email}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{email}{email}} +{\footnotesize\ttfamily \label{class_main_window_a46daecfbbd4056b097b3b470cc4f1618} +QString Main\+Window\+::email} + + + +Электронная почта пользователя. + +\Hypertarget{class_main_window_a9ba91413f46ab4481ab8042ac8f2b799}\index{MainWindow@{MainWindow}!id@{id}} +\index{id@{id}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{id}{id}} +{\footnotesize\ttfamily \label{class_main_window_a9ba91413f46ab4481ab8042ac8f2b799} +QString Main\+Window\+::id} + + + +Идентификатор текущего пользователя. + +\Hypertarget{class_main_window_a4338481359e3e8145930703e0089340f}\index{MainWindow@{MainWindow}!login@{login}} +\index{login@{login}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{login}{login}} +{\footnotesize\ttfamily \label{class_main_window_a4338481359e3e8145930703e0089340f} +QString Main\+Window\+::login} + + + +Логин пользователя. + +\Hypertarget{class_main_window_a25493964c8f550b2380a12616fbc8250}\index{MainWindow@{MainWindow}!password@{password}} +\index{password@{password}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{password}{password}} +{\footnotesize\ttfamily \label{class_main_window_a25493964c8f550b2380a12616fbc8250} +QString Main\+Window\+::password} + + + +Пароль пользователя. + +\Hypertarget{class_main_window_a35466a70ed47252a0191168126a352a5}\index{MainWindow@{MainWindow}!ui@{ui}} +\index{ui@{ui}!MainWindow@{MainWindow}} +\doxysubsubsection{\texorpdfstring{ui}{ui}} +{\footnotesize\ttfamily \label{class_main_window_a35466a70ed47252a0191168126a352a5} +Ui\+::\+Main\+Window\texorpdfstring{$\ast$}{*} Main\+Window\+::ui\hspace{0.3cm}{\ttfamily [private]}} + + + +Указатель на UI-\/элементы окна. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +client/\mbox{\hyperlink{mainwindow_8h}{mainwindow.\+h}}\item +client/\mbox{\hyperlink{mainwindow_8cpp}{mainwindow.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_main_window__coll__graph.dot b/docs/doxygen/latex/class_main_window__coll__graph.dot new file mode 100644 index 0000000..c0115bb --- /dev/null +++ b/docs/doxygen/latex/class_main_window__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "MainWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="MainWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Главное окно клиента."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_main_window__coll__graph.md5 b/docs/doxygen/latex/class_main_window__coll__graph.md5 new file mode 100644 index 0000000..86d29c6 --- /dev/null +++ b/docs/doxygen/latex/class_main_window__coll__graph.md5 @@ -0,0 +1 @@ +05db15b17be0295b4bbd2462879a138e \ No newline at end of file diff --git a/docs/doxygen/latex/class_main_window__coll__graph.pdf b/docs/doxygen/latex/class_main_window__coll__graph.pdf new file mode 100644 index 0000000..de6c43a Binary files /dev/null and b/docs/doxygen/latex/class_main_window__coll__graph.pdf differ diff --git a/docs/doxygen/latex/class_main_window__inherit__graph.dot b/docs/doxygen/latex/class_main_window__inherit__graph.dot new file mode 100644 index 0000000..c0115bb --- /dev/null +++ b/docs/doxygen/latex/class_main_window__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "MainWindow" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="MainWindow",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Главное окно клиента."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_main_window__inherit__graph.md5 b/docs/doxygen/latex/class_main_window__inherit__graph.md5 new file mode 100644 index 0000000..86d29c6 --- /dev/null +++ b/docs/doxygen/latex/class_main_window__inherit__graph.md5 @@ -0,0 +1 @@ +05db15b17be0295b4bbd2462879a138e \ No newline at end of file diff --git a/docs/doxygen/latex/class_main_window__inherit__graph.pdf b/docs/doxygen/latex/class_main_window__inherit__graph.pdf new file mode 100644 index 0000000..092addf Binary files /dev/null and b/docs/doxygen/latex/class_main_window__inherit__graph.pdf differ diff --git a/docs/doxygen/latex/class_manager_forms.tex b/docs/doxygen/latex/class_manager_forms.tex new file mode 100644 index 0000000..fdcec44 --- /dev/null +++ b/docs/doxygen/latex/class_manager_forms.tex @@ -0,0 +1,143 @@ +\doxysection{Manager\+Forms Class Reference} +\hypertarget{class_manager_forms}{}\label{class_manager_forms}\index{ManagerForms@{ManagerForms}} + + +Класс для управления окнами приложения. + + + + +{\ttfamily \#include $<$managerforms.\+h$>$} + + + +Inheritance diagram for Manager\+Forms\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=161pt]{class_manager_forms__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Manager\+Forms\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{class_manager_forms__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_manager_forms_a28520be4f92d605ac48783497f23cf96}{Manager\+Forms}} (QWidget \texorpdfstring{$\ast$}{*}parent=nullptr) +\begin{DoxyCompactList}\small\item\em Конструктор класса \doxylink{class_manager_forms}{Manager\+Forms}. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_manager_forms_a6fcef06607418dbf71c05c44847b0112}{\texorpdfstring{$\sim$}{\string~}\+Manager\+Forms}} () +\begin{DoxyCompactList}\small\item\em Деструктор. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_auth_reg_window}{Auth\+Reg\+Window}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_manager_forms_a30b01a09a0e1859c5c934d77280249c8}{curr\+\_\+auth}} +\begin{DoxyCompactList}\small\item\em Указатель на окно авторизации и регистрации. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_main_window}{Main\+Window}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_manager_forms_a55e8215156bd70da8b91860773f181a6}{main}} +\begin{DoxyCompactList}\small\item\em Указатель на главное окно приложения. \end{DoxyCompactList}\item +\mbox{\hyperlink{class_add_product_window}{Add\+Product\+Window}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_manager_forms_a35e56ed089659370d82a6ede47a35ff0}{add\+Product\+Window}} +\begin{DoxyCompactList}\small\item\em Указатель на окно добавления продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Класс для управления окнами приложения. + +Отвечает за создание и переключение между окнами авторизации, главного интерфейса и окна добавления продукта. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_manager_forms_a28520be4f92d605ac48783497f23cf96}\index{ManagerForms@{ManagerForms}!ManagerForms@{ManagerForms}} +\index{ManagerForms@{ManagerForms}!ManagerForms@{ManagerForms}} +\doxysubsubsection{\texorpdfstring{ManagerForms()}{ManagerForms()}} +{\footnotesize\ttfamily \label{class_manager_forms_a28520be4f92d605ac48783497f23cf96} +Manager\+Forms\+::\+Manager\+Forms (\begin{DoxyParamCaption}\item[{QWidget \texorpdfstring{$\ast$}{*}}]{parent}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}} + + + +Конструктор класса \doxylink{class_manager_forms}{Manager\+Forms}. + + +\begin{DoxyParams}{Parameters} +{\em parent} & Родительский виджет. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00003\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\ QMainWindow(parent) } +\DoxyCodeLine{00004\ \{} +\DoxyCodeLine{00005\ \ \ \ \ this-\/>\mbox{\hyperlink{class_manager_forms_a30b01a09a0e1859c5c934d77280249c8}{curr\_auth}}\ =\ \textcolor{keyword}{new}\ AuthRegWindow();} +\DoxyCodeLine{00006\ \ \ \ \ this-\/>\mbox{\hyperlink{class_manager_forms_a55e8215156bd70da8b91860773f181a6}{main}}\ =\ \textcolor{keyword}{new}\ MainWindow();} +\DoxyCodeLine{00007\ \ \ \ \ this-\/>\mbox{\hyperlink{class_manager_forms_a30b01a09a0e1859c5c934d77280249c8}{curr\_auth}}-\/>show();} +\DoxyCodeLine{00008\ \ \ \ \ this-\/>\mbox{\hyperlink{class_manager_forms_a35e56ed089659370d82a6ede47a35ff0}{addProductWindow}}\ =\ \textcolor{keyword}{new}\ AddProductWindow();} +\DoxyCodeLine{00009\ } +\DoxyCodeLine{00010\ \ \ \ \ connect(\mbox{\hyperlink{class_manager_forms_a55e8215156bd70da8b91860773f181a6}{main}},\ \&\mbox{\hyperlink{class_main_window_afa09d58e484be8e5c49e5f5b33f0e3d8}{MainWindow::add\_product}},\ \mbox{\hyperlink{class_manager_forms_a35e56ed089659370d82a6ede47a35ff0}{addProductWindow}},\ \&\mbox{\hyperlink{class_add_product_window_a92754fe51527bbce7e7dbe5f07542d21}{AddProductWindow::slot\_show}});} +\DoxyCodeLine{00011\ \ \ \ \ connect(\mbox{\hyperlink{class_manager_forms_a35e56ed089659370d82a6ede47a35ff0}{addProductWindow}},\ \&\mbox{\hyperlink{class_add_product_window_ab982bd5dd091137578e647c0c588fade}{AddProductWindow::productAdded}},\ \mbox{\hyperlink{class_manager_forms_a55e8215156bd70da8b91860773f181a6}{main}},\ \&\mbox{\hyperlink{class_main_window_a9e4beb27bda168783b6e71d486ebcb90}{MainWindow::handleProductAdded}});} +\DoxyCodeLine{00012\ } +\DoxyCodeLine{00013\ \ \ \ \ connect(\mbox{\hyperlink{class_manager_forms_a30b01a09a0e1859c5c934d77280249c8}{curr\_auth}},\ \&\mbox{\hyperlink{class_auth_reg_window_ae7c7188f7a51b721fa342670262d2faa}{AuthRegWindow::auth\_ok}},\ \mbox{\hyperlink{class_manager_forms_a55e8215156bd70da8b91860773f181a6}{main}},\ \&\mbox{\hyperlink{class_main_window_a9a15eca3ebf289292af72b78b2cf1b56}{MainWindow::slot\_show}});} +\DoxyCodeLine{00014\ \ \ \ \ connect(\mbox{\hyperlink{class_manager_forms_a30b01a09a0e1859c5c934d77280249c8}{curr\_auth}},\ \&\mbox{\hyperlink{class_auth_reg_window_ae7c7188f7a51b721fa342670262d2faa}{AuthRegWindow::auth\_ok}},\ \mbox{\hyperlink{class_manager_forms_a55e8215156bd70da8b91860773f181a6}{main}},\ \&\mbox{\hyperlink{class_main_window_a91a9ec299ac67e179bd9e3acbf23eb0c}{MainWindow::set\_current\_user}});} +\DoxyCodeLine{00015\ \}} + +\end{DoxyCode} +\Hypertarget{class_manager_forms_a6fcef06607418dbf71c05c44847b0112}\index{ManagerForms@{ManagerForms}!````~ManagerForms@{\texorpdfstring{$\sim$}{\string~}ManagerForms}} +\index{````~ManagerForms@{\texorpdfstring{$\sim$}{\string~}ManagerForms}!ManagerForms@{ManagerForms}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}ManagerForms()}{\string~ManagerForms()}} +{\footnotesize\ttfamily \label{class_manager_forms_a6fcef06607418dbf71c05c44847b0112} +Manager\+Forms\+::\texorpdfstring{$\sim$}{\string~}\+Manager\+Forms (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Деструктор. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00018\ \{} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_manager_forms_a35e56ed089659370d82a6ede47a35ff0}\index{ManagerForms@{ManagerForms}!addProductWindow@{addProductWindow}} +\index{addProductWindow@{addProductWindow}!ManagerForms@{ManagerForms}} +\doxysubsubsection{\texorpdfstring{addProductWindow}{addProductWindow}} +{\footnotesize\ttfamily \label{class_manager_forms_a35e56ed089659370d82a6ede47a35ff0} +\mbox{\hyperlink{class_add_product_window}{Add\+Product\+Window}}\texorpdfstring{$\ast$}{*} Manager\+Forms\+::add\+Product\+Window\hspace{0.3cm}{\ttfamily [private]}} + + + +Указатель на окно добавления продукта. + +\Hypertarget{class_manager_forms_a30b01a09a0e1859c5c934d77280249c8}\index{ManagerForms@{ManagerForms}!curr\_auth@{curr\_auth}} +\index{curr\_auth@{curr\_auth}!ManagerForms@{ManagerForms}} +\doxysubsubsection{\texorpdfstring{curr\_auth}{curr\_auth}} +{\footnotesize\ttfamily \label{class_manager_forms_a30b01a09a0e1859c5c934d77280249c8} +\mbox{\hyperlink{class_auth_reg_window}{Auth\+Reg\+Window}}\texorpdfstring{$\ast$}{*} Manager\+Forms\+::curr\+\_\+auth\hspace{0.3cm}{\ttfamily [private]}} + + + +Указатель на окно авторизации и регистрации. + +\Hypertarget{class_manager_forms_a55e8215156bd70da8b91860773f181a6}\index{ManagerForms@{ManagerForms}!main@{main}} +\index{main@{main}!ManagerForms@{ManagerForms}} +\doxysubsubsection{\texorpdfstring{main}{main}} +{\footnotesize\ttfamily \label{class_manager_forms_a55e8215156bd70da8b91860773f181a6} +\mbox{\hyperlink{class_main_window}{Main\+Window}}\texorpdfstring{$\ast$}{*} Manager\+Forms\+::main\hspace{0.3cm}{\ttfamily [private]}} + + + +Указатель на главное окно приложения. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +client/\mbox{\hyperlink{managerforms_8h}{managerforms.\+h}}\item +client/\mbox{\hyperlink{managerforms_8cpp}{managerforms.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_manager_forms__coll__graph.dot b/docs/doxygen/latex/class_manager_forms__coll__graph.dot new file mode 100644 index 0000000..4cde2d7 --- /dev/null +++ b/docs/doxygen/latex/class_manager_forms__coll__graph.dot @@ -0,0 +1,20 @@ +digraph "ManagerForms" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ManagerForms",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс для управления окнами приложения."]; + Node2 -> Node1 [id="edge8_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; + Node3 -> Node1 [id="edge9_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" curr_auth",fontcolor="grey" ]; + Node3 [id="Node000003",label="AuthRegWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_auth_reg_window.html",tooltip="Класс окна авторизации и регистрации."]; + Node2 -> Node3 [id="edge10_Node000003_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 -> Node1 [id="edge11_Node000001_Node000004",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" main",fontcolor="grey" ]; + Node4 [id="Node000004",label="MainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_main_window.html",tooltip="Главное окно клиента."]; + Node2 -> Node4 [id="edge12_Node000004_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 -> Node1 [id="edge13_Node000001_Node000005",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" addProductWindow",fontcolor="grey" ]; + Node5 [id="Node000005",label="AddProductWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_add_product_window.html",tooltip="Класс окна для добавления нового продукта."]; + Node6 -> Node5 [id="edge14_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_manager_forms__coll__graph.md5 b/docs/doxygen/latex/class_manager_forms__coll__graph.md5 new file mode 100644 index 0000000..633ee0b --- /dev/null +++ b/docs/doxygen/latex/class_manager_forms__coll__graph.md5 @@ -0,0 +1 @@ +ae001ac39507c5ab1cfbf9f00d6d25ac \ No newline at end of file diff --git a/docs/doxygen/latex/class_manager_forms__coll__graph.pdf b/docs/doxygen/latex/class_manager_forms__coll__graph.pdf new file mode 100644 index 0000000..2750164 Binary files /dev/null and b/docs/doxygen/latex/class_manager_forms__coll__graph.pdf differ diff --git a/docs/doxygen/latex/class_manager_forms__inherit__graph.dot b/docs/doxygen/latex/class_manager_forms__inherit__graph.dot new file mode 100644 index 0000000..7e18eb5 --- /dev/null +++ b/docs/doxygen/latex/class_manager_forms__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "ManagerForms" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="ManagerForms",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс для управления окнами приложения."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_manager_forms__inherit__graph.md5 b/docs/doxygen/latex/class_manager_forms__inherit__graph.md5 new file mode 100644 index 0000000..297e1e8 --- /dev/null +++ b/docs/doxygen/latex/class_manager_forms__inherit__graph.md5 @@ -0,0 +1 @@ +95e69cab856df210a7b10136e5155688 \ No newline at end of file diff --git a/docs/doxygen/latex/class_manager_forms__inherit__graph.pdf b/docs/doxygen/latex/class_manager_forms__inherit__graph.pdf new file mode 100644 index 0000000..fc8f4ea Binary files /dev/null and b/docs/doxygen/latex/class_manager_forms__inherit__graph.pdf differ diff --git a/docs/doxygen/latex/class_my_tcp_server.tex b/docs/doxygen/latex/class_my_tcp_server.tex new file mode 100644 index 0000000..bb87a08 --- /dev/null +++ b/docs/doxygen/latex/class_my_tcp_server.tex @@ -0,0 +1,248 @@ +\doxysection{My\+Tcp\+Server Class Reference} +\hypertarget{class_my_tcp_server}{}\label{class_my_tcp_server}\index{MyTcpServer@{MyTcpServer}} + + +{\ttfamily \#include $<$mytcpserver.\+h$>$} + + + +Inheritance diagram for My\+Tcp\+Server\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=154pt]{class_my_tcp_server__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for My\+Tcp\+Server\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=154pt]{class_my_tcp_server__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Slots} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_my_tcp_server_a0ba7316ffe1a26c57fabde9e74b6c8dc}{slot\+New\+Connection}} () +\begin{DoxyCompactList}\small\item\em Слот для обработки нового подключения. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_my_tcp_server_a3e040c49dbefd65b9a58ab662fc9f7a2}{slot\+Client\+Disconnected}} () +\begin{DoxyCompactList}\small\item\em Слот для обработки отключения клиента. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_my_tcp_server_ab4a64d2eab985d723090963f5c8a2882}{slot\+Server\+Read}} () +\begin{DoxyCompactList}\small\item\em Слот для чтения данных от клиента. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_my_tcp_server_acf367c4695b4d160c7a2d25c2afaaec4}{My\+Tcp\+Server}} (QObject \texorpdfstring{$\ast$}{*}parent=nullptr) +\begin{DoxyCompactList}\small\item\em Конструктор \end{DoxyCompactList}\item +\mbox{\hyperlink{class_my_tcp_server_ab39e651ff7c37c152215c02c225e79ef}{\texorpdfstring{$\sim$}{\string~}\+My\+Tcp\+Server}} () +\begin{DoxyCompactList}\small\item\em Деструктор \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +QTcp\+Server \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c}{m\+Tcp\+Server}} +\begin{DoxyCompactList}\small\item\em Сервер для обработки TCP-\/соединений \end{DoxyCompactList}\item +QTcp\+Socket \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_my_tcp_server_ab55c030e6eb6cf5d1acfe6d7d2bf0ed1}{m\+Tcp\+Socket}} +\begin{DoxyCompactList}\small\item\em Сокет для взаимодействия с клиентом \end{DoxyCompactList}\item +int \mbox{\hyperlink{class_my_tcp_server_ae0dc69dfef4f9fc3a5f031f4152e4f91}{server\+\_\+status}} +\begin{DoxyCompactList}\small\item\em Статус сервера \end{DoxyCompactList}\item +QMap$<$ int, QTcp\+Socket \texorpdfstring{$\ast$}{*} $>$ \mbox{\hyperlink{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3}{m\+Socket\+Descriptors}} +\begin{DoxyCompactList}\small\item\em Хранение дескрипторов сокетов \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_my_tcp_server_acf367c4695b4d160c7a2d25c2afaaec4}\index{MyTcpServer@{MyTcpServer}!MyTcpServer@{MyTcpServer}} +\index{MyTcpServer@{MyTcpServer}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{MyTcpServer()}{MyTcpServer()}} +{\footnotesize\ttfamily \label{class_my_tcp_server_acf367c4695b4d160c7a2d25c2afaaec4} +My\+Tcp\+Server\+::\+My\+Tcp\+Server (\begin{DoxyParamCaption}\item[{QObject \texorpdfstring{$\ast$}{*}}]{parent}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}} + + + +Конструктор + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00014\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\ QObject(parent) } +\DoxyCodeLine{00015\ \{} +\DoxyCodeLine{00016\ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c}{mTcpServer}}\ =\ \textcolor{keyword}{new}\ QTcpServer(\textcolor{keyword}{this});} +\DoxyCodeLine{00017\ } +\DoxyCodeLine{00018\ \ \ \ \ connect(\mbox{\hyperlink{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c}{mTcpServer}},\ \&QTcpServer::newConnection,\ \textcolor{keyword}{this},\ \&\mbox{\hyperlink{class_my_tcp_server_a0ba7316ffe1a26c57fabde9e74b6c8dc}{MyTcpServer::slotNewConnection}});} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c}{mTcpServer}}-\/>listen(QHostAddress::Any,\ 33333))\ \{} +\DoxyCodeLine{00021\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}server\ is\ not\ started"{}};} +\DoxyCodeLine{00022\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server_ae0dc69dfef4f9fc3a5f031f4152e4f91}{server\_status}}\ =\ 1;} +\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}server\ is\ started"{}};} +\DoxyCodeLine{00025\ \ \ \ \ \}} +\DoxyCodeLine{00026\ \}} + +\end{DoxyCode} +\Hypertarget{class_my_tcp_server_ab39e651ff7c37c152215c02c225e79ef}\index{MyTcpServer@{MyTcpServer}!````~MyTcpServer@{\texorpdfstring{$\sim$}{\string~}MyTcpServer}} +\index{````~MyTcpServer@{\texorpdfstring{$\sim$}{\string~}MyTcpServer}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}MyTcpServer()}{\string~MyTcpServer()}} +{\footnotesize\ttfamily \label{class_my_tcp_server_ab39e651ff7c37c152215c02c225e79ef} +My\+Tcp\+Server\+::\texorpdfstring{$\sim$}{\string~}\+My\+Tcp\+Server (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Деструктор + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00008\ \{} +\DoxyCodeLine{00009\ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c}{mTcpServer}}-\/>close();} +\DoxyCodeLine{00010\ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server_ae0dc69dfef4f9fc3a5f031f4152e4f91}{server\_status}}\ =\ 0;} +\DoxyCodeLine{00011\ \ \ \ \ qDeleteAll(\mbox{\hyperlink{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3}{mSocketDescriptors}});\ \textcolor{comment}{//\ Удаляем\ все\ сокеты}} +\DoxyCodeLine{00012\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_my_tcp_server_a3e040c49dbefd65b9a58ab662fc9f7a2}\index{MyTcpServer@{MyTcpServer}!slotClientDisconnected@{slotClientDisconnected}} +\index{slotClientDisconnected@{slotClientDisconnected}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{slotClientDisconnected}{slotClientDisconnected}} +{\footnotesize\ttfamily \label{class_my_tcp_server_a3e040c49dbefd65b9a58ab662fc9f7a2} +void My\+Tcp\+Server\+::slot\+Client\+Disconnected (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Слот для обработки отключения клиента. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00062\ \{} +\DoxyCodeLine{00063\ \ \ \ \ QTcpSocket\ *clientSocket\ =\ qobject\_cast(sender());} +\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keywordflow}{if}\ (!clientSocket)\ \{} +\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00066\ \ \ \ \ \}} +\DoxyCodeLine{00067\ } +\DoxyCodeLine{00068\ \ \ \ \ \textcolor{comment}{//\ Получаем\ дескриптор\ сокета\ из\ контейнера}} +\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keywordtype}{int}\ socketDescriptor\ =\ -\/1;} +\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\ it\ =\ \mbox{\hyperlink{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3}{mSocketDescriptors}}.begin();\ it\ !=\ \mbox{\hyperlink{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3}{mSocketDescriptors}}.end();\ ++it)\ \{} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (it.value()\ ==\ clientSocket)\ \{} +\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ socketDescriptor\ =\ it.key();} +\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};} +\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00075\ \ \ \ \ \}} +\DoxyCodeLine{00076\ } +\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keywordflow}{if}\ (socketDescriptor\ !=\ -\/1)\ \{} +\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3}{mSocketDescriptors}}.remove(socketDescriptor);\ \textcolor{comment}{//\ Удаляем\ сокет\ из\ контейнера}} +\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Client\ disconnected,\ socket\ descriptor:"{}}\ <<\ socketDescriptor;} +\DoxyCodeLine{00080\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Client\ disconnected,\ but\ socket\ descriptor\ not\ found!"{}};} +\DoxyCodeLine{00082\ \ \ \ \ \}} +\DoxyCodeLine{00083\ } +\DoxyCodeLine{00084\ \ \ \ \ clientSocket-\/>deleteLater();\ \textcolor{comment}{//\ Удаляем\ сокет}} +\DoxyCodeLine{00085\ \}} + +\end{DoxyCode} +\Hypertarget{class_my_tcp_server_a0ba7316ffe1a26c57fabde9e74b6c8dc}\index{MyTcpServer@{MyTcpServer}!slotNewConnection@{slotNewConnection}} +\index{slotNewConnection@{slotNewConnection}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{slotNewConnection}{slotNewConnection}} +{\footnotesize\ttfamily \label{class_my_tcp_server_a0ba7316ffe1a26c57fabde9e74b6c8dc} +void My\+Tcp\+Server\+::slot\+New\+Connection (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Слот для обработки нового подключения. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00029\ \{} +\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_my_tcp_server_ae0dc69dfef4f9fc3a5f031f4152e4f91}{server\_status}}\ ==\ 1)\ \{} +\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ QTcpSocket\ *clientSocket\ =\ \mbox{\hyperlink{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c}{mTcpServer}}-\/>nextPendingConnection();} +\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ socketDescriptor\ =\ clientSocket-\/>socketDescriptor();\ \textcolor{comment}{//\ Получаем\ дескриптор\ сокета}} +\DoxyCodeLine{00033\ } +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (socketDescriptor\ ==\ -\/1)\ \{} +\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Invalid\ socket\ descriptor!"{}};} +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \ \ \ \ clientSocket-\/>deleteLater();\ \textcolor{comment}{//\ Удаляем\ сокет,\ если\ дескриптор\ недействителен}} +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00039\ } +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3}{mSocketDescriptors}}.insert(socketDescriptor,\ clientSocket);\ \textcolor{comment}{//\ Сохраняем\ сокет\ в\ контейнере}} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}New\ connection,\ socket\ descriptor:"{}}\ <<\ socketDescriptor;} +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ connect(clientSocket,\ \&QTcpSocket::readyRead,\ \textcolor{keyword}{this},\ \&\mbox{\hyperlink{class_my_tcp_server_ab4a64d2eab985d723090963f5c8a2882}{MyTcpServer::slotServerRead}});} +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ connect(clientSocket,\ \&QTcpSocket::disconnected,\ \textcolor{keyword}{this},\ \&\mbox{\hyperlink{class_my_tcp_server_a3e040c49dbefd65b9a58ab662fc9f7a2}{MyTcpServer::slotClientDisconnected}});} +\DoxyCodeLine{00046\ \ \ \ \ \}} +\DoxyCodeLine{00047\ \}} + +\end{DoxyCode} +\Hypertarget{class_my_tcp_server_ab4a64d2eab985d723090963f5c8a2882}\index{MyTcpServer@{MyTcpServer}!slotServerRead@{slotServerRead}} +\index{slotServerRead@{slotServerRead}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{slotServerRead}{slotServerRead}} +{\footnotesize\ttfamily \label{class_my_tcp_server_ab4a64d2eab985d723090963f5c8a2882} +void My\+Tcp\+Server\+::slot\+Server\+Read (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [slot]}} + + + +Слот для чтения данных от клиента. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00050\ \ \ \ \ QTcpSocket\ *clientSocket\ =\ qobject\_cast(sender());} +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keywordflow}{if}\ (!clientSocket)\ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \ \ \ \ QByteArray\ data\ =\ clientSocket-\/>readAll();} +\DoxyCodeLine{00054\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Received\ data:"{}}\ <<\ data;} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \ \ \ \ \textcolor{comment}{//\ Обрабатываем\ данные\ сразу,\ без\ накопления}} +\DoxyCodeLine{00057\ \ \ \ \ QByteArray\ response\ =\ \mbox{\hyperlink{func2serv_8cpp_a99bd96103155e73697cc47518a5559a4}{parsing}}(QString(data).trimmed(),\ clientSocket-\/>socketDescriptor());} +\DoxyCodeLine{00058\ \ \ \ \ clientSocket-\/>write(response);} +\DoxyCodeLine{00059\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3}\index{MyTcpServer@{MyTcpServer}!mSocketDescriptors@{mSocketDescriptors}} +\index{mSocketDescriptors@{mSocketDescriptors}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{mSocketDescriptors}{mSocketDescriptors}} +{\footnotesize\ttfamily \label{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3} +QMap$<$int, QTcp\+Socket\texorpdfstring{$\ast$}{*}$>$ My\+Tcp\+Server\+::m\+Socket\+Descriptors\hspace{0.3cm}{\ttfamily [private]}} + + + +Хранение дескрипторов сокетов + +\Hypertarget{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c}\index{MyTcpServer@{MyTcpServer}!mTcpServer@{mTcpServer}} +\index{mTcpServer@{mTcpServer}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{mTcpServer}{mTcpServer}} +{\footnotesize\ttfamily \label{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c} +QTcp\+Server\texorpdfstring{$\ast$}{*} My\+Tcp\+Server\+::m\+Tcp\+Server\hspace{0.3cm}{\ttfamily [private]}} + + + +Сервер для обработки TCP-\/соединений + +\Hypertarget{class_my_tcp_server_ab55c030e6eb6cf5d1acfe6d7d2bf0ed1}\index{MyTcpServer@{MyTcpServer}!mTcpSocket@{mTcpSocket}} +\index{mTcpSocket@{mTcpSocket}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{mTcpSocket}{mTcpSocket}} +{\footnotesize\ttfamily \label{class_my_tcp_server_ab55c030e6eb6cf5d1acfe6d7d2bf0ed1} +QTcp\+Socket\texorpdfstring{$\ast$}{*} My\+Tcp\+Server\+::m\+Tcp\+Socket\hspace{0.3cm}{\ttfamily [private]}} + + + +Сокет для взаимодействия с клиентом + +\Hypertarget{class_my_tcp_server_ae0dc69dfef4f9fc3a5f031f4152e4f91}\index{MyTcpServer@{MyTcpServer}!server\_status@{server\_status}} +\index{server\_status@{server\_status}!MyTcpServer@{MyTcpServer}} +\doxysubsubsection{\texorpdfstring{server\_status}{server\_status}} +{\footnotesize\ttfamily \label{class_my_tcp_server_ae0dc69dfef4f9fc3a5f031f4152e4f91} +int My\+Tcp\+Server\+::server\+\_\+status\hspace{0.3cm}{\ttfamily [private]}} + + + +Статус сервера + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +server/\mbox{\hyperlink{mytcpserver_8h}{mytcpserver.\+h}}\item +server/\mbox{\hyperlink{mytcpserver_8cpp}{mytcpserver.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_my_tcp_server__coll__graph.dot b/docs/doxygen/latex/class_my_tcp_server__coll__graph.dot new file mode 100644 index 0000000..ea21642 --- /dev/null +++ b/docs/doxygen/latex/class_my_tcp_server__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "MyTcpServer" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="MyTcpServer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_my_tcp_server__coll__graph.md5 b/docs/doxygen/latex/class_my_tcp_server__coll__graph.md5 new file mode 100644 index 0000000..ffc2c98 --- /dev/null +++ b/docs/doxygen/latex/class_my_tcp_server__coll__graph.md5 @@ -0,0 +1 @@ +c9fd94764ac24ff5ecd3a0ac4fb20286 \ No newline at end of file diff --git a/docs/doxygen/latex/class_my_tcp_server__coll__graph.pdf b/docs/doxygen/latex/class_my_tcp_server__coll__graph.pdf new file mode 100644 index 0000000..1f7c425 Binary files /dev/null and b/docs/doxygen/latex/class_my_tcp_server__coll__graph.pdf differ diff --git a/docs/doxygen/latex/class_my_tcp_server__inherit__graph.dot b/docs/doxygen/latex/class_my_tcp_server__inherit__graph.dot new file mode 100644 index 0000000..ea21642 --- /dev/null +++ b/docs/doxygen/latex/class_my_tcp_server__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "MyTcpServer" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="MyTcpServer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/class_my_tcp_server__inherit__graph.md5 b/docs/doxygen/latex/class_my_tcp_server__inherit__graph.md5 new file mode 100644 index 0000000..ffc2c98 --- /dev/null +++ b/docs/doxygen/latex/class_my_tcp_server__inherit__graph.md5 @@ -0,0 +1 @@ +c9fd94764ac24ff5ecd3a0ac4fb20286 \ No newline at end of file diff --git a/docs/doxygen/latex/class_my_tcp_server__inherit__graph.pdf b/docs/doxygen/latex/class_my_tcp_server__inherit__graph.pdf new file mode 100644 index 0000000..6b14a70 Binary files /dev/null and b/docs/doxygen/latex/class_my_tcp_server__inherit__graph.pdf differ diff --git a/docs/doxygen/latex/class_singleton_destroyer.tex b/docs/doxygen/latex/class_singleton_destroyer.tex new file mode 100644 index 0000000..a671e58 --- /dev/null +++ b/docs/doxygen/latex/class_singleton_destroyer.tex @@ -0,0 +1,97 @@ +\doxysection{Singleton\+Destroyer Class Reference} +\hypertarget{class_singleton_destroyer}{}\label{class_singleton_destroyer}\index{SingletonDestroyer@{SingletonDestroyer}} + + +Класс для разрушения экземпляра Singleton. + + + + +{\ttfamily \#include $<$databasesingleton.\+h$>$} + + + +Collaboration diagram for Singleton\+Destroyer\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=248pt]{class_singleton_destroyer__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_singleton_destroyer_a8ac3166871f4c5411edfdb13594dee15}{\texorpdfstring{$\sim$}{\string~}\+Singleton\+Destroyer}} () +\begin{DoxyCompactList}\small\item\em Деструктор для удаления Singleton. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_singleton_destroyer_abcaf525b6af81fbb5717c7dae73af8ec}{initialize}} (\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \texorpdfstring{$\ast$}{*}p) +\begin{DoxyCompactList}\small\item\em Инициализация указателя на экземпляр Singleton. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_singleton_destroyer_a66a75552c83eb8515e6d458d7a6b0178}{p\+\_\+instance}} +\begin{DoxyCompactList}\small\item\em Указатель на экземпляр Singleton. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Класс для разрушения экземпляра Singleton. + +Используется для корректного удаления экземпляра \doxylink{class_data_base_singleton}{Data\+Base\+Singleton}. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_singleton_destroyer_a8ac3166871f4c5411edfdb13594dee15}\index{SingletonDestroyer@{SingletonDestroyer}!````~SingletonDestroyer@{\texorpdfstring{$\sim$}{\string~}SingletonDestroyer}} +\index{````~SingletonDestroyer@{\texorpdfstring{$\sim$}{\string~}SingletonDestroyer}!SingletonDestroyer@{SingletonDestroyer}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}SingletonDestroyer()}{\string~SingletonDestroyer()}} +{\footnotesize\ttfamily \label{class_singleton_destroyer_a8ac3166871f4c5411edfdb13594dee15} +Singleton\+Destroyer\+::\texorpdfstring{$\sim$}{\string~}\+Singleton\+Destroyer (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Деструктор для удаления Singleton. + +Уничтожает экземпляр Singleton, если он существует. +\begin{DoxyCode}{0} +\DoxyCodeLine{00211\ \{\ \textcolor{keyword}{delete}\ \mbox{\hyperlink{class_singleton_destroyer_a66a75552c83eb8515e6d458d7a6b0178}{p\_instance}};\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_singleton_destroyer_abcaf525b6af81fbb5717c7dae73af8ec}\index{SingletonDestroyer@{SingletonDestroyer}!initialize@{initialize}} +\index{initialize@{initialize}!SingletonDestroyer@{SingletonDestroyer}} +\doxysubsubsection{\texorpdfstring{initialize()}{initialize()}} +{\footnotesize\ttfamily \label{class_singleton_destroyer_abcaf525b6af81fbb5717c7dae73af8ec} +void Singleton\+Destroyer\+::initialize (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} \texorpdfstring{$\ast$}{*}}]{p}{}\end{DoxyParamCaption})} + + + +Инициализация указателя на экземпляр Singleton. + + +\begin{DoxyParams}{Parameters} +{\em p} & Указатель на экземпляр Singleton. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00212\ \{\ \mbox{\hyperlink{class_singleton_destroyer_a66a75552c83eb8515e6d458d7a6b0178}{p\_instance}}\ =\ p;\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_singleton_destroyer_a66a75552c83eb8515e6d458d7a6b0178}\index{SingletonDestroyer@{SingletonDestroyer}!p\_instance@{p\_instance}} +\index{p\_instance@{p\_instance}!SingletonDestroyer@{SingletonDestroyer}} +\doxysubsubsection{\texorpdfstring{p\_instance}{p\_instance}} +{\footnotesize\ttfamily \label{class_singleton_destroyer_a66a75552c83eb8515e6d458d7a6b0178} +\mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}}\texorpdfstring{$\ast$}{*} Singleton\+Destroyer\+::p\+\_\+instance\hspace{0.3cm}{\ttfamily [private]}} + + + +Указатель на экземпляр Singleton. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +server/\mbox{\hyperlink{databasesingleton_8h}{databasesingleton.\+h}}\item +server/\mbox{\hyperlink{databasesingleton_8cpp}{databasesingleton.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/class_singleton_destroyer__coll__graph.dot b/docs/doxygen/latex/class_singleton_destroyer__coll__graph.dot new file mode 100644 index 0000000..e54d129 --- /dev/null +++ b/docs/doxygen/latex/class_singleton_destroyer__coll__graph.dot @@ -0,0 +1,12 @@ +digraph "SingletonDestroyer" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="SingletonDestroyer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Класс для разрушения экземпляра Singleton."]; + Node2 -> Node1 [id="edge4_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node2 [id="Node000002",label="DataBaseSingleton",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$class_data_base_singleton.html",tooltip="Класс для работы с базой данных."]; + Node2 -> Node2 [id="edge5_Node000002_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" p_instance",fontcolor="grey" ]; + Node1 -> Node2 [id="edge6_Node000002_Node000001",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" destroyer",fontcolor="grey" ]; +} diff --git a/docs/doxygen/latex/class_singleton_destroyer__coll__graph.md5 b/docs/doxygen/latex/class_singleton_destroyer__coll__graph.md5 new file mode 100644 index 0000000..4dbc36c --- /dev/null +++ b/docs/doxygen/latex/class_singleton_destroyer__coll__graph.md5 @@ -0,0 +1 @@ +31edfa26cde3525c1592e47d1cac70a6 \ No newline at end of file diff --git a/docs/doxygen/latex/class_singleton_destroyer__coll__graph.pdf b/docs/doxygen/latex/class_singleton_destroyer__coll__graph.pdf new file mode 100644 index 0000000..a62e626 Binary files /dev/null and b/docs/doxygen/latex/class_singleton_destroyer__coll__graph.pdf differ diff --git a/docs/doxygen/latex/classmenu_card.tex b/docs/doxygen/latex/classmenu_card.tex new file mode 100644 index 0000000..fe9cf42 --- /dev/null +++ b/docs/doxygen/latex/classmenu_card.tex @@ -0,0 +1,157 @@ +\doxysection{menu\+Card Class Reference} +\hypertarget{classmenu_card}{}\label{classmenu_card}\index{menuCard@{menuCard}} + + +Виджет отображения информации о рационе питания. + + + + +{\ttfamily \#include $<$menu\+Card.\+h$>$} + + + +Inheritance diagram for menu\+Card\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=141pt]{classmenu_card__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for menu\+Card\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=141pt]{classmenu_card__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classmenu_card_a2031e638510376289c988f8c9799ab5b}{menu\+Card}} (QString day, QString\+List products, int calories, QVector$<$ int $>$ \&pfc, int weight, int price, QWidget \texorpdfstring{$\ast$}{*}parent=nullptr) +\begin{DoxyCompactList}\small\item\em Конструктор виджета \doxylink{classmenu_card}{menu\+Card}. \end{DoxyCompactList}\item +\mbox{\hyperlink{classmenu_card_af0a4efa29020e128e125a4693b989024}{\texorpdfstring{$\sim$}{\string~}menu\+Card}} () +\begin{DoxyCompactList}\small\item\em Деструктор. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Private Attributes} +\begin{DoxyCompactItemize} +\item +Ui\+::menu\+Card \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}} +\begin{DoxyCompactList}\small\item\em UI-\/компоненты, сгенерированные Qt Designer. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Виджет отображения информации о рационе питания. + +Показывает данные за определённый день\+: список продуктов, калорийность, содержание БЖУ, вес и цену. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classmenu_card_a2031e638510376289c988f8c9799ab5b}\index{menuCard@{menuCard}!menuCard@{menuCard}} +\index{menuCard@{menuCard}!menuCard@{menuCard}} +\doxysubsubsection{\texorpdfstring{menuCard()}{menuCard()}} +{\footnotesize\ttfamily \label{classmenu_card_a2031e638510376289c988f8c9799ab5b} +menu\+Card\+::menu\+Card (\begin{DoxyParamCaption}\item[{QString}]{day}{, }\item[{QString\+List}]{products}{, }\item[{int}]{calories}{, }\item[{QVector$<$ int $>$ \&}]{pfc}{, }\item[{int}]{weight}{, }\item[{int}]{price}{, }\item[{QWidget \texorpdfstring{$\ast$}{*}}]{parent}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}} + + + +Конструктор виджета \doxylink{classmenu_card}{menu\+Card}. + + +\begin{DoxyParams}{Parameters} +{\em day} & День недели или дата. \\ +\hline +{\em products} & Список продуктов в рационе. \\ +\hline +{\em calories} & Общее количество калорий. \\ +\hline +{\em pfc} & Вектор, содержащий значения белков, жиров и углеводов. \\ +\hline +{\em weight} & Общий вес рациона. \\ +\hline +{\em price} & Общая стоимость рациона. \\ +\hline +{\em parent} & Родительский виджет. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00011\ \ \ \ \ \ :\ QWidget(parent)} +\DoxyCodeLine{00012\ \ \ \ \ \ ,\ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}(\textcolor{keyword}{new}\ Ui::menuCard) } +\DoxyCodeLine{00013\ \ \{} +\DoxyCodeLine{00014\ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>setupUi(\textcolor{keyword}{this});} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ } +\DoxyCodeLine{00017\ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>dayLabel-\/>setText(day);} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ \ \ \ \ \ \textcolor{comment}{//\ 1.\ Добавляем\ продукты\ в\ menuVerticalLayout}} +\DoxyCodeLine{00021\ \ \ \ \ \ \textcolor{keywordflow}{for}(\textcolor{keyword}{const}\ QString\&\ product\ :\ products)\ \{} +\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \ QLabel*\ productLabel\ =\ \textcolor{keyword}{new}\ QLabel(product,\ \textcolor{keyword}{this});} +\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ productLabel-\/>setStyleSheet(\textcolor{stringliteral}{"{}font-\/size:\ 16px;\ font-\/weight:\ bold"{}});} +\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>menuVerticalLayout-\/>addWidget(productLabel);} +\DoxyCodeLine{00025\ \ \ \ \ \ \}} +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ \ \ \ \ \ \textcolor{comment}{//\ 2.\ Добавляем\ параметры\ в\ paramsVerticalLayout}} +\DoxyCodeLine{00028\ \ \ \ \ \ QLabel*\ caloriesLabel\ =\ \textcolor{keyword}{new}\ QLabel(QString(\textcolor{stringliteral}{"{}Калории:\ \%1"{}}).arg(calories),\ \textcolor{keyword}{this});} +\DoxyCodeLine{00029\ \ \ \ \ \ QLabel*\ pfcLabel\ =\ \textcolor{keyword}{new}\ QLabel(QString(\textcolor{stringliteral}{"{}БЖУ:\ \%1-\/\%2-\/\%3"{}}).arg(pfc[0]).arg(pfc[1]).arg(pfc[2]),\ \textcolor{keyword}{this});} +\DoxyCodeLine{00030\ \ \ \ \ \ QLabel*\ weightLabel\ =\ \textcolor{keyword}{new}\ QLabel(QString(\textcolor{stringliteral}{"{}Вес:\ \%1\ г"{}}).arg(weight),\ \textcolor{keyword}{this});} +\DoxyCodeLine{00031\ \ \ \ \ \ QLabel*\ priceLabel\ =\ \textcolor{keyword}{new}\ QLabel(QString(\textcolor{stringliteral}{"{}Цена:\ \%1\ руб."{}}).arg(price),\ \textcolor{keyword}{this});} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ \ \ \ \ \ \textcolor{comment}{//\ Настройка\ стилей\ для\ параметров}} +\DoxyCodeLine{00034\ \ \ \ \ \ QString\ paramStyle\ =\ \textcolor{stringliteral}{"{}font-\/size:\ 14px;\ color:\ black;\ font-\/weight:\ bold"{}};} +\DoxyCodeLine{00035\ \ \ \ \ \ caloriesLabel-\/>setStyleSheet(paramStyle);} +\DoxyCodeLine{00036\ \ \ \ \ \ pfcLabel-\/>setStyleSheet(paramStyle);} +\DoxyCodeLine{00037\ \ \ \ \ \ weightLabel-\/>setStyleSheet(paramStyle);} +\DoxyCodeLine{00038\ \ \ \ \ \ priceLabel-\/>setStyleSheet(paramStyle);} +\DoxyCodeLine{00039\ } +\DoxyCodeLine{00040\ \ \ \ \ \ \textcolor{comment}{//\ Добавление\ в\ layout}} +\DoxyCodeLine{00041\ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>paramsVerticalLayout-\/>addWidget(caloriesLabel);} +\DoxyCodeLine{00042\ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>paramsVerticalLayout-\/>addWidget(pfcLabel);} +\DoxyCodeLine{00043\ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>paramsVerticalLayout-\/>addWidget(weightLabel);} +\DoxyCodeLine{00044\ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>paramsVerticalLayout-\/>addWidget(priceLabel);} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ \ \ \ \ \ \textcolor{comment}{//\ Добавляем\ растягивающийся\ элемент\ в\ конец}} +\DoxyCodeLine{00047\ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>menuVerticalLayout-\/>addStretch();} +\DoxyCodeLine{00048\ \ \ \ \ \ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}}-\/>paramsVerticalLayout-\/>addStretch();} +\DoxyCodeLine{00049\ \ \}} + +\end{DoxyCode} +\Hypertarget{classmenu_card_af0a4efa29020e128e125a4693b989024}\index{menuCard@{menuCard}!````~menuCard@{\texorpdfstring{$\sim$}{\string~}menuCard}} +\index{````~menuCard@{\texorpdfstring{$\sim$}{\string~}menuCard}!menuCard@{menuCard}} +\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}menuCard()}{\string~menuCard()}} +{\footnotesize\ttfamily \label{classmenu_card_af0a4efa29020e128e125a4693b989024} +menu\+Card\+::\texorpdfstring{$\sim$}{\string~}menu\+Card (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Деструктор. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00052\ \{} +\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}};} +\DoxyCodeLine{00054\ \}} + +\end{DoxyCode} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}\index{menuCard@{menuCard}!ui@{ui}} +\index{ui@{ui}!menuCard@{menuCard}} +\doxysubsubsection{\texorpdfstring{ui}{ui}} +{\footnotesize\ttfamily \label{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77} +Ui\+::menu\+Card\texorpdfstring{$\ast$}{*} menu\+Card\+::ui\hspace{0.3cm}{\ttfamily [private]}} + + + +UI-\/компоненты, сгенерированные Qt Designer. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +client/\mbox{\hyperlink{menu_card_8h}{menu\+Card.\+h}}\item +client/\mbox{\hyperlink{menucard_8cpp}{menucard.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/classmenu_card__coll__graph.dot b/docs/doxygen/latex/classmenu_card__coll__graph.dot new file mode 100644 index 0000000..b746dad --- /dev/null +++ b/docs/doxygen/latex/classmenu_card__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "menuCard" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="menuCard",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Виджет отображения информации о рационе питания."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/classmenu_card__coll__graph.md5 b/docs/doxygen/latex/classmenu_card__coll__graph.md5 new file mode 100644 index 0000000..be99942 --- /dev/null +++ b/docs/doxygen/latex/classmenu_card__coll__graph.md5 @@ -0,0 +1 @@ +f94ee23c043b805629dd729057502780 \ No newline at end of file diff --git a/docs/doxygen/latex/classmenu_card__coll__graph.pdf b/docs/doxygen/latex/classmenu_card__coll__graph.pdf new file mode 100644 index 0000000..0b2082c Binary files /dev/null and b/docs/doxygen/latex/classmenu_card__coll__graph.pdf differ diff --git a/docs/doxygen/latex/classmenu_card__inherit__graph.dot b/docs/doxygen/latex/classmenu_card__inherit__graph.dot new file mode 100644 index 0000000..b746dad --- /dev/null +++ b/docs/doxygen/latex/classmenu_card__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "menuCard" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="menuCard",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Виджет отображения информации о рационе питания."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/classmenu_card__inherit__graph.md5 b/docs/doxygen/latex/classmenu_card__inherit__graph.md5 new file mode 100644 index 0000000..be99942 --- /dev/null +++ b/docs/doxygen/latex/classmenu_card__inherit__graph.md5 @@ -0,0 +1 @@ +f94ee23c043b805629dd729057502780 \ No newline at end of file diff --git a/docs/doxygen/latex/classmenu_card__inherit__graph.pdf b/docs/doxygen/latex/classmenu_card__inherit__graph.pdf new file mode 100644 index 0000000..ca1ab43 Binary files /dev/null and b/docs/doxygen/latex/classmenu_card__inherit__graph.pdf differ diff --git a/docs/doxygen/latex/classproduct_card.tex b/docs/doxygen/latex/classproduct_card.tex new file mode 100644 index 0000000..5476d60 --- /dev/null +++ b/docs/doxygen/latex/classproduct_card.tex @@ -0,0 +1,148 @@ +\doxysection{product\+Card Class Reference} +\hypertarget{classproduct_card}{}\label{classproduct_card}\index{productCard@{productCard}} + + +Виджет карточки продукта. + + + + +{\ttfamily \#include $<$product\+Card.\+h$>$} + + + +Inheritance diagram for product\+Card\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=149pt]{classproduct_card__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for product\+Card\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=149pt]{classproduct_card__coll__graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classproduct_card_a095d77b284258000ed61c1a7e41c84ab}{product\+Card}} (QString name, int price, int proteins, int fatness, int carbs, QWidget \texorpdfstring{$\ast$}{*}parent=nullptr) +\begin{DoxyCompactList}\small\item\em Конструктор карточки продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Виджет карточки продукта. + +Отображает информацию о продукте\+: название, цену и пищевую ценность (белки, жиры, углеводы). + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classproduct_card_a095d77b284258000ed61c1a7e41c84ab}\index{productCard@{productCard}!productCard@{productCard}} +\index{productCard@{productCard}!productCard@{productCard}} +\doxysubsubsection{\texorpdfstring{productCard()}{productCard()}} +{\footnotesize\ttfamily \label{classproduct_card_a095d77b284258000ed61c1a7e41c84ab} +product\+Card\+::product\+Card (\begin{DoxyParamCaption}\item[{QString}]{name}{, }\item[{int}]{price}{, }\item[{int}]{proteins}{, }\item[{int}]{fatness}{, }\item[{int}]{carbs}{, }\item[{QWidget \texorpdfstring{$\ast$}{*}}]{parent}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}} + + + +Конструктор карточки продукта. + + +\begin{DoxyParams}{Parameters} +{\em name} & Название продукта. \\ +\hline +{\em price} & Стоимость продукта. \\ +\hline +{\em proteins} & Количество белков. \\ +\hline +{\em fatness} & Количество жиров. \\ +\hline +{\em carbs} & Количество углеводов. \\ +\hline +{\em parent} & Родительский виджет. \\ +\hline +\end{DoxyParams} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00006\ \ \ \ \ :\ QWidget(parent) } +\DoxyCodeLine{00007\ \{} +\DoxyCodeLine{00008\ \ \ \ \ \textcolor{comment}{//\ Устанавливаем\ оптимальный\ размер\ с\ минимальными\ и\ максимальными\ ограничениями}} +\DoxyCodeLine{00009\ \ \ \ \ this-\/>setMinimumSize(150,\ 200);} +\DoxyCodeLine{00010\ \ \ \ \ this-\/>setMaximumSize(200,\ 250);} +\DoxyCodeLine{00011\ \ \ \ \ this-\/>setSizePolicy(QSizePolicy::Preferred,\ QSizePolicy::Preferred);} +\DoxyCodeLine{00012\ } +\DoxyCodeLine{00013\ \ \ \ \ QVBoxLayout*\ mainLayout\ =\ \textcolor{keyword}{new}\ QVBoxLayout(\textcolor{keyword}{this});} +\DoxyCodeLine{00014\ \ \ \ \ mainLayout-\/>setContentsMargins(10,\ 10,\ 10,\ 10);} +\DoxyCodeLine{00015\ \ \ \ \ mainLayout-\/>setSpacing(8);} +\DoxyCodeLine{00016\ } +\DoxyCodeLine{00017\ \ \ \ \ \textcolor{comment}{//\ Стили\ для\ улучшения\ читаемости}} +\DoxyCodeLine{00018\ \ \ \ \ QString\ labelStyle\ =\ \textcolor{stringliteral}{"{}QLabel\ \{\ font-\/size:\ 16px;\ color:\ black;\ \}"{}};} +\DoxyCodeLine{00019\ \ \ \ \ QString\ titleStyle\ =\ \textcolor{stringliteral}{"{}QLabel\ \{\ font-\/weight:\ bold;\ font-\/size:\ 18px;\ color:\ black;\ \}"{}};} +\DoxyCodeLine{00020\ \ \ \ \ QString\ priceStyle\ =\ \textcolor{stringliteral}{"{}QLabel\ \{\ font-\/weight:\ bold;\ font-\/size:\ 16px;\ color:\ green;\ \}"{}};} +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00022\ \ \ \ \ \textcolor{comment}{//\ Название\ продукта}} +\DoxyCodeLine{00023\ \ \ \ \ QLabel*\ nameLabel\ =\ \textcolor{keyword}{new}\ QLabel(name);} +\DoxyCodeLine{00024\ \ \ \ \ nameLabel-\/>setStyleSheet(titleStyle);} +\DoxyCodeLine{00025\ \ \ \ \ nameLabel-\/>setWordWrap(\textcolor{keyword}{true});} +\DoxyCodeLine{00026\ \ \ \ \ nameLabel-\/>setAlignment(Qt::AlignCenter);} +\DoxyCodeLine{00027\ \ \ \ \ mainLayout-\/>addWidget(nameLabel);} +\DoxyCodeLine{00028\ } +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{comment}{//\ Цена}} +\DoxyCodeLine{00030\ \ \ \ \ QLabel*\ priceLabel\ =\ \textcolor{keyword}{new}\ QLabel(\textcolor{stringliteral}{"{}Цена:\ "{}}\ +\ QString::number(price)\ +\ \textcolor{stringliteral}{"{}₽"{}});} +\DoxyCodeLine{00031\ \ \ \ \ priceLabel-\/>setStyleSheet(priceStyle);} +\DoxyCodeLine{00032\ \ \ \ \ priceLabel-\/>setAlignment(Qt::AlignCenter);} +\DoxyCodeLine{00033\ \ \ \ \ mainLayout-\/>addWidget(priceLabel);} +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{comment}{//\ Разделительная\ линия}} +\DoxyCodeLine{00036\ \ \ \ \ QFrame*\ line\ =\ \textcolor{keyword}{new}\ QFrame();} +\DoxyCodeLine{00037\ \ \ \ \ line-\/>setFrameShape(QFrame::HLine);} +\DoxyCodeLine{00038\ \ \ \ \ line-\/>setFrameShadow(QFrame::Sunken);} +\DoxyCodeLine{00039\ \ \ \ \ line-\/>setStyleSheet(\textcolor{stringliteral}{"{}color:\ black;"{}});} +\DoxyCodeLine{00040\ \ \ \ \ mainLayout-\/>addWidget(line);} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \ \ \ \ \textcolor{comment}{//\ Панель\ с\ пищевой\ ценностью}} +\DoxyCodeLine{00043\ \ \ \ \ QWidget*\ nutritionPanel\ =\ \textcolor{keyword}{new}\ QWidget();} +\DoxyCodeLine{00044\ \ \ \ \ QGridLayout*\ nutritionLayout\ =\ \textcolor{keyword}{new}\ QGridLayout(nutritionPanel);} +\DoxyCodeLine{00045\ \ \ \ \ nutritionLayout-\/>setContentsMargins(5,\ 5,\ 5,\ 5);} +\DoxyCodeLine{00046\ \ \ \ \ nutritionLayout-\/>setHorizontalSpacing(10);} +\DoxyCodeLine{00047\ \ \ \ \ nutritionLayout-\/>setVerticalSpacing(5);} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{comment}{//\ Заголовки\ и\ значения\ БЖУ}} +\DoxyCodeLine{00050\ \ \ \ \ QLabel*\ proteinTitle\ =\ \textcolor{keyword}{new}\ QLabel(\textcolor{stringliteral}{"{}Белки:"{}});} +\DoxyCodeLine{00051\ \ \ \ \ QLabel*\ proteinValue\ =\ \textcolor{keyword}{new}\ QLabel(QString::number(proteins)\ +\ \textcolor{stringliteral}{"{}\ г"{}});} +\DoxyCodeLine{00052\ \ \ \ \ QLabel*\ fatTitle\ =\ \textcolor{keyword}{new}\ QLabel(\textcolor{stringliteral}{"{}Жиры:"{}});} +\DoxyCodeLine{00053\ \ \ \ \ QLabel*\ fatValue\ =\ \textcolor{keyword}{new}\ QLabel(QString::number(fatness)\ +\ \textcolor{stringliteral}{"{}\ г"{}});} +\DoxyCodeLine{00054\ \ \ \ \ QLabel*\ carbsTitle\ =\ \textcolor{keyword}{new}\ QLabel(\textcolor{stringliteral}{"{}Углеводы:"{}});} +\DoxyCodeLine{00055\ \ \ \ \ QLabel*\ carbsValue\ =\ \textcolor{keyword}{new}\ QLabel(QString::number(carbs)\ +\ \textcolor{stringliteral}{"{}\ г"{}});} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00057\ \ \ \ \ \textcolor{comment}{//\ Применяем\ стили}} +\DoxyCodeLine{00058\ \ \ \ \ proteinTitle-\/>setStyleSheet(labelStyle);} +\DoxyCodeLine{00059\ \ \ \ \ proteinValue-\/>setStyleSheet(labelStyle);} +\DoxyCodeLine{00060\ \ \ \ \ fatTitle-\/>setStyleSheet(labelStyle);} +\DoxyCodeLine{00061\ \ \ \ \ fatValue-\/>setStyleSheet(labelStyle);} +\DoxyCodeLine{00062\ \ \ \ \ carbsTitle-\/>setStyleSheet(labelStyle);} +\DoxyCodeLine{00063\ \ \ \ \ carbsValue-\/>setStyleSheet(labelStyle);} +\DoxyCodeLine{00064\ } +\DoxyCodeLine{00065\ \ \ \ \ \textcolor{comment}{//\ Добавляем\ в\ layout}} +\DoxyCodeLine{00066\ \ \ \ \ nutritionLayout-\/>addWidget(proteinTitle,\ 0,\ 0);} +\DoxyCodeLine{00067\ \ \ \ \ nutritionLayout-\/>addWidget(proteinValue,\ 0,\ 1);} +\DoxyCodeLine{00068\ \ \ \ \ nutritionLayout-\/>addWidget(fatTitle,\ 1,\ 0);} +\DoxyCodeLine{00069\ \ \ \ \ nutritionLayout-\/>addWidget(fatValue,\ 1,\ 1);} +\DoxyCodeLine{00070\ \ \ \ \ nutritionLayout-\/>addWidget(carbsTitle,\ 2,\ 0);} +\DoxyCodeLine{00071\ \ \ \ \ nutritionLayout-\/>addWidget(carbsValue,\ 2,\ 1);} +\DoxyCodeLine{00072\ } +\DoxyCodeLine{00073\ \ \ \ \ mainLayout-\/>addWidget(nutritionPanel);} +\DoxyCodeLine{00074\ \}} + +\end{DoxyCode} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +client/\mbox{\hyperlink{product_card_8h}{product\+Card.\+h}}\item +client/\mbox{\hyperlink{product_card_8cpp}{product\+Card.\+cpp}}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/classproduct_card__coll__graph.dot b/docs/doxygen/latex/classproduct_card__coll__graph.dot new file mode 100644 index 0000000..f73785c --- /dev/null +++ b/docs/doxygen/latex/classproduct_card__coll__graph.dot @@ -0,0 +1,10 @@ +digraph "productCard" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="productCard",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Виджет карточки продукта."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/classproduct_card__coll__graph.md5 b/docs/doxygen/latex/classproduct_card__coll__graph.md5 new file mode 100644 index 0000000..ea9974a --- /dev/null +++ b/docs/doxygen/latex/classproduct_card__coll__graph.md5 @@ -0,0 +1 @@ +6f829ab53c5dcff3a1fc4545593a90e2 \ No newline at end of file diff --git a/docs/doxygen/latex/classproduct_card__coll__graph.pdf b/docs/doxygen/latex/classproduct_card__coll__graph.pdf new file mode 100644 index 0000000..9f1f6b2 Binary files /dev/null and b/docs/doxygen/latex/classproduct_card__coll__graph.pdf differ diff --git a/docs/doxygen/latex/classproduct_card__inherit__graph.dot b/docs/doxygen/latex/classproduct_card__inherit__graph.dot new file mode 100644 index 0000000..f73785c --- /dev/null +++ b/docs/doxygen/latex/classproduct_card__inherit__graph.dot @@ -0,0 +1,10 @@ +digraph "productCard" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="productCard",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Виджет карточки продукта."]; + Node2 -> Node1 [id="edge2_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/classproduct_card__inherit__graph.md5 b/docs/doxygen/latex/classproduct_card__inherit__graph.md5 new file mode 100644 index 0000000..ea9974a --- /dev/null +++ b/docs/doxygen/latex/classproduct_card__inherit__graph.md5 @@ -0,0 +1 @@ +6f829ab53c5dcff3a1fc4545593a90e2 \ No newline at end of file diff --git a/docs/doxygen/latex/classproduct_card__inherit__graph.pdf b/docs/doxygen/latex/classproduct_card__inherit__graph.pdf new file mode 100644 index 0000000..9f1f6b2 Binary files /dev/null and b/docs/doxygen/latex/classproduct_card__inherit__graph.pdf differ diff --git a/docs/doxygen/latex/client_2main_8cpp.tex b/docs/doxygen/latex/client_2main_8cpp.tex new file mode 100644 index 0000000..54d121a --- /dev/null +++ b/docs/doxygen/latex/client_2main_8cpp.tex @@ -0,0 +1,37 @@ +\doxysection{client/main.cpp File Reference} +\hypertarget{client_2main_8cpp}{}\label{client_2main_8cpp}\index{client/main.cpp@{client/main.cpp}} +{\ttfamily \#include "{}managerforms.\+h"{}}\newline +{\ttfamily \#include $<$QApplication$>$}\newline +Include dependency graph for main.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{client_2main_8cpp__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Functions} +\begin{DoxyCompactItemize} +\item +int \mbox{\hyperlink{client_2main_8cpp_a0ddf1224851353fc92bfbff6f499fa97}{main}} (int argc, char \texorpdfstring{$\ast$}{*}argv\mbox{[}$\,$\mbox{]}) +\end{DoxyCompactItemize} + + +\doxysubsection{Function Documentation} +\Hypertarget{client_2main_8cpp_a0ddf1224851353fc92bfbff6f499fa97}\index{main.cpp@{main.cpp}!main@{main}} +\index{main@{main}!main.cpp@{main.cpp}} +\doxysubsubsection{\texorpdfstring{main()}{main()}} +{\footnotesize\ttfamily \label{client_2main_8cpp_a0ddf1224851353fc92bfbff6f499fa97} +int main (\begin{DoxyParamCaption}\item[{int}]{argc}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{argv}{\mbox{[}$\,$\mbox{]}}\end{DoxyParamCaption})} + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00006\ \{} +\DoxyCodeLine{00007\ } +\DoxyCodeLine{00008\ \ \ \ \ QApplication\ a(argc,\ argv);} +\DoxyCodeLine{00009\ \ \ \ \ \mbox{\hyperlink{class_manager_forms}{ManagerForms}}\ w;} +\DoxyCodeLine{00010\ \ \ \ \ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00011\ \ \ \ \ \textcolor{keywordflow}{return}\ a.exec();} +\DoxyCodeLine{00012\ \}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/client_2main_8cpp__incl.dot b/docs/doxygen/latex/client_2main_8cpp__incl.dot new file mode 100644 index 0000000..d6b8462 --- /dev/null +++ b/docs/doxygen/latex/client_2main_8cpp__incl.dot @@ -0,0 +1,53 @@ +digraph "client/main.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/main.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge27_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge28_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge29_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge30_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge31_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge32_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node7 -> Node3 [id="edge33_Node000007_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node7 -> Node8 [id="edge34_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node8 -> Node9 [id="edge35_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node10 [id="edge36_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node10 -> Node11 [id="edge37_Node000010_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node12 [id="edge38_Node000010_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node13 [id="edge39_Node000010_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node14 [id="edge40_Node000010_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node15 [id="edge41_Node000010_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node16 [id="edge42_Node000010_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node17 [id="edge43_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node17 -> Node3 [id="edge44_Node000017_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node8 [id="edge45_Node000017_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node18 [id="edge46_Node000017_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node18 -> Node5 [id="edge47_Node000018_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node19 [id="edge48_Node000017_Node000019",color="steelblue1",style="solid",tooltip=" "]; + Node19 [id="Node000019",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node19 -> Node5 [id="edge49_Node000019_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node6 [id="edge50_Node000017_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node2 -> Node10 [id="edge51_Node000002_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node20 [id="edge52_Node000001_Node000020",color="steelblue1",style="solid",tooltip=" "]; + Node20 [id="Node000020",label="QApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/client_2main_8cpp__incl.md5 b/docs/doxygen/latex/client_2main_8cpp__incl.md5 new file mode 100644 index 0000000..7ab7fd9 --- /dev/null +++ b/docs/doxygen/latex/client_2main_8cpp__incl.md5 @@ -0,0 +1 @@ +a7b3f39d07e236e31779d3092720a5a9 \ No newline at end of file diff --git a/docs/doxygen/latex/client_2main_8cpp__incl.pdf b/docs/doxygen/latex/client_2main_8cpp__incl.pdf new file mode 100644 index 0000000..d3370c4 Binary files /dev/null and b/docs/doxygen/latex/client_2main_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/databasesingleton_8cpp.tex b/docs/doxygen/latex/databasesingleton_8cpp.tex new file mode 100644 index 0000000..4737cec --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8cpp.tex @@ -0,0 +1,10 @@ +\doxysection{server/databasesingleton.cpp File Reference} +\hypertarget{databasesingleton_8cpp}{}\label{databasesingleton_8cpp}\index{server/databasesingleton.cpp@{server/databasesingleton.cpp}} +{\ttfamily \#include "{}databasesingleton.\+h"{}}\newline +Include dependency graph for databasesingleton.\+cpp\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{databasesingleton_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/databasesingleton_8cpp__incl.dot b/docs/doxygen/latex/databasesingleton_8cpp__incl.dot new file mode 100644 index 0000000..95e3e99 --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8cpp__incl.dot @@ -0,0 +1,22 @@ +digraph "server/databasesingleton.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/databasesingleton.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge8_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="databasesingleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge9_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge10_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node5 [id="edge11_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node6 [id="edge12_Node000002_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge13_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node8 [id="edge14_Node000002_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/databasesingleton_8cpp__incl.md5 b/docs/doxygen/latex/databasesingleton_8cpp__incl.md5 new file mode 100644 index 0000000..265733e --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8cpp__incl.md5 @@ -0,0 +1 @@ +e8684dcf8ba1a393668ff29c2bffff54 \ No newline at end of file diff --git a/docs/doxygen/latex/databasesingleton_8cpp__incl.pdf b/docs/doxygen/latex/databasesingleton_8cpp__incl.pdf new file mode 100644 index 0000000..4cf7627 Binary files /dev/null and b/docs/doxygen/latex/databasesingleton_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/databasesingleton_8h.tex b/docs/doxygen/latex/databasesingleton_8h.tex new file mode 100644 index 0000000..6edf660 --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8h.tex @@ -0,0 +1,30 @@ +\doxysection{server/databasesingleton.h File Reference} +\hypertarget{databasesingleton_8h}{}\label{databasesingleton_8h}\index{server/databasesingleton.h@{server/databasesingleton.h}} +{\ttfamily \#include $<$QSql\+Database$>$}\newline +{\ttfamily \#include $<$QSql\+Query$>$}\newline +{\ttfamily \#include $<$QSql\+Error$>$}\newline +{\ttfamily \#include $<$QDebug$>$}\newline +{\ttfamily \#include $<$QVariant\+Map$>$}\newline +{\ttfamily \#include $<$QVector$>$}\newline +Include dependency graph for databasesingleton.\+h\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{databasesingleton_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{databasesingleton_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_singleton_destroyer}{Singleton\+Destroyer}} +\begin{DoxyCompactList}\small\item\em Класс для разрушения экземпляра Singleton. \end{DoxyCompactList}\item +class \mbox{\hyperlink{class_data_base_singleton}{Data\+Base\+Singleton}} +\begin{DoxyCompactList}\small\item\em Класс для работы с базой данных. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/databasesingleton_8h__dep__incl.dot b/docs/doxygen/latex/databasesingleton_8h__dep__incl.dot new file mode 100644 index 0000000..4dd19fb --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8h__dep__incl.dot @@ -0,0 +1,14 @@ +digraph "server/databasesingleton.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/databasesingleton.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge4_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="server/databasesingleton.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge5_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="server/func2serv.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$func2serv_8cpp.html",tooltip=" "]; + Node1 -> Node4 [id="edge6_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="server/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$server_2main_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/databasesingleton_8h__dep__incl.md5 b/docs/doxygen/latex/databasesingleton_8h__dep__incl.md5 new file mode 100644 index 0000000..573908c --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8h__dep__incl.md5 @@ -0,0 +1 @@ +7396521b9ad9188835f2bbd567d89f5d \ No newline at end of file diff --git a/docs/doxygen/latex/databasesingleton_8h__dep__incl.pdf b/docs/doxygen/latex/databasesingleton_8h__dep__incl.pdf new file mode 100644 index 0000000..afd6036 Binary files /dev/null and b/docs/doxygen/latex/databasesingleton_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/databasesingleton_8h__incl.dot b/docs/doxygen/latex/databasesingleton_8h__incl.dot new file mode 100644 index 0000000..5f1f711 --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8h__incl.dot @@ -0,0 +1,20 @@ +digraph "server/databasesingleton.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/databasesingleton.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge7_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge8_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge9_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge10_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge11_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge12_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/databasesingleton_8h__incl.md5 b/docs/doxygen/latex/databasesingleton_8h__incl.md5 new file mode 100644 index 0000000..01a7330 --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8h__incl.md5 @@ -0,0 +1 @@ +b83af22251153875a6379b18a8eac25c \ No newline at end of file diff --git a/docs/doxygen/latex/databasesingleton_8h__incl.pdf b/docs/doxygen/latex/databasesingleton_8h__incl.pdf new file mode 100644 index 0000000..88c0e98 Binary files /dev/null and b/docs/doxygen/latex/databasesingleton_8h__incl.pdf differ diff --git a/docs/doxygen/latex/databasesingleton_8h_source.tex b/docs/doxygen/latex/databasesingleton_8h_source.tex new file mode 100644 index 0000000..f421419 --- /dev/null +++ b/docs/doxygen/latex/databasesingleton_8h_source.tex @@ -0,0 +1,67 @@ +\doxysection{databasesingleton.\+h} +\hypertarget{databasesingleton_8h_source}{}\label{databasesingleton_8h_source}\index{server/databasesingleton.h@{server/databasesingleton.h}} +\mbox{\hyperlink{databasesingleton_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ DATABASESINGLETON\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ DATABASESINGLETON\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}};} +\DoxyCodeLine{00012\ } +\DoxyCodeLine{00018\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_singleton_destroyer}{SingletonDestroyer}}\ \{} +\DoxyCodeLine{00019\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00020\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ \mbox{\hyperlink{class_singleton_destroyer_a66a75552c83eb8515e6d458d7a6b0178}{p\_instance}};\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00027\ \ \ \ \ \mbox{\hyperlink{class_singleton_destroyer_a8ac3166871f4c5411edfdb13594dee15}{\string~SingletonDestroyer}}();} +\DoxyCodeLine{00028\ } +\DoxyCodeLine{00034\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_singleton_destroyer_abcaf525b6af81fbb5717c7dae73af8ec}{initialize}}(\mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ p);} +\DoxyCodeLine{00035\ \};} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00043\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{DataBaseSingleton}}\ \{} +\DoxyCodeLine{00044\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{DataBaseSingleton}}*\ \mbox{\hyperlink{class_data_base_singleton_abf86267afcfebbe05658438ff0ccfdfd}{p\_instance}};\ \ \ } +\DoxyCodeLine{00046\ \ \ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_data_base_singleton_aa93ce997b9645496c0e17460fba08432}{SingletonDestroyer}}\ \mbox{\hyperlink{class_data_base_singleton_a414f1ff51603535a839d5fc2e24b65e0}{destroyer}};\ \ \ \ } +\DoxyCodeLine{00047\ \ \ \ \ QSqlDatabase\ \mbox{\hyperlink{class_data_base_singleton_a929da7bbfe9e068b4c3bc5a095e6156a}{db}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00054\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{DataBaseSingleton}}();} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton_abe02a9a0f33a2664ba969d20d777d4d9}{DataBaseSingleton}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{DataBaseSingleton}}\&)\ =\ \textcolor{keyword}{delete};\ } +\DoxyCodeLine{00057\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{DataBaseSingleton}}\&\ \mbox{\hyperlink{class_data_base_singleton_af310f74ceebe21ef29454dd7eccac19a}{operator=}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{DataBaseSingleton}}\&)\ =\ \textcolor{keyword}{delete};\ } +\DoxyCodeLine{00058\ } +\DoxyCodeLine{00064\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton_aa0d2615a21bdb8d7367a513c802e32c1}{\string~DataBaseSingleton}}()\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00065\ } +\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_data_base_singleton_aa93ce997b9645496c0e17460fba08432}{SingletonDestroyer}};\ \ \ \ \ \ \ \ } +\DoxyCodeLine{00067\ } +\DoxyCodeLine{00068\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_data_base_singleton_aa289e69de3195fef9593052246b9b1b0}{DataBaseSingleton}}*\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{getInstance}}();} +\DoxyCodeLine{00075\ } +\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_data_base_singleton_a59bda63308000a018c5bdc1989582e50}{initialize}}(\textcolor{keyword}{const}\ QString\&\ databaseName);} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00093\ \ \ \ \ QSqlQuery\ \mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(\textcolor{keyword}{const}\ QString\&\ query,\ \textcolor{keyword}{const}\ QVariantMap\&\ params\ =\ QVariantMap());} +\DoxyCodeLine{00094\ } +\DoxyCodeLine{00102\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_data_base_singleton_a51bd7dc4507c5f3d04a2903899e13d42}{checkUserCredentials}}(\textcolor{keyword}{const}\ QString\&\ login,\ \textcolor{keyword}{const}\ QString\&\ password);} +\DoxyCodeLine{00103\ } +\DoxyCodeLine{00113\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_data_base_singleton_af17db97dfc40b0fa48b3ed9abeacca76}{addUser}}(\textcolor{keyword}{const}\ QString\&\ name,\ \textcolor{keyword}{const}\ QString\&\ email,\ \textcolor{keyword}{const}\ QString\&\ password,\ \textcolor{keywordtype}{bool}\ isAdmin\ =\ \textcolor{keyword}{false});} +\DoxyCodeLine{00114\ } +\DoxyCodeLine{00128\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_data_base_singleton_a3fe2a5e1f41a408023066e8caf63b523}{addProduct}}(\textcolor{keywordtype}{int}\ userId,\ \textcolor{keyword}{const}\ QString\&\ name,\ \textcolor{keywordtype}{int}\ proteins,\ \textcolor{keywordtype}{int}\ fatness,\ \textcolor{keywordtype}{int}\ carbs,\ \textcolor{keywordtype}{int}\ weight,\ \textcolor{keywordtype}{int}\ cost,\ \textcolor{keywordtype}{int}\ type);} +\DoxyCodeLine{00129\ } +\DoxyCodeLine{00136\ \ \ \ \ QVector\ \mbox{\hyperlink{class_data_base_singleton_a84fe7936dd15c077eff86d7884ce3049}{getProductsByUser}}(\textcolor{keywordtype}{int}\ userId);} +\DoxyCodeLine{00137\ } +\DoxyCodeLine{00148\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_data_base_singleton_a515aed6cbbb34fe71f254943a70d504b}{addFavoriteRation}}(\textcolor{keywordtype}{int}\ userId,\ \textcolor{keyword}{const}\ QVector\&\ productIds,\ \textcolor{keywordtype}{int}\ calories,\ \textcolor{keywordtype}{int}\ allCost,\ \textcolor{keywordtype}{int}\ allWeight);} +\DoxyCodeLine{00149\ } +\DoxyCodeLine{00156\ \ \ \ \ QVector\ \mbox{\hyperlink{class_data_base_singleton_afee32779221eaa5f92eb0c8a8666bb50}{getFavoritesByUser}}(\textcolor{keywordtype}{int}\ userId);} +\DoxyCodeLine{00157\ } +\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_data_base_singleton_ab2877d5184cd7af28f1ea3b31f523280}{updateStatistics}}(\textcolor{keywordtype}{int}\ registrations,\ \textcolor{keywordtype}{int}\ visits,\ \textcolor{keywordtype}{int}\ generations);} +\DoxyCodeLine{00167\ } +\DoxyCodeLine{00173\ \ \ \ \ QVariantMap\ \mbox{\hyperlink{class_data_base_singleton_aad20b90cdb02aab3df1f27a9e4f882a3}{getStatistics}}();} +\DoxyCodeLine{00174\ \};} +\DoxyCodeLine{00175\ } +\DoxyCodeLine{00176\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ DATABASESINGLETON\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/dir_41e1742e44e2de38b3bc91f993fed282.tex b/docs/doxygen/latex/dir_41e1742e44e2de38b3bc91f993fed282.tex new file mode 100644 index 0000000..95cea88 --- /dev/null +++ b/docs/doxygen/latex/dir_41e1742e44e2de38b3bc91f993fed282.tex @@ -0,0 +1,19 @@ +\doxysection{server Directory Reference} +\hypertarget{dir_41e1742e44e2de38b3bc91f993fed282}{}\label{dir_41e1742e44e2de38b3bc91f993fed282}\index{server Directory Reference@{server Directory Reference}} +\doxysubsubsection*{Files} +\begin{DoxyCompactItemize} +\item +file \mbox{\hyperlink{databasesingleton_8cpp}{databasesingleton.\+cpp}} +\item +file \mbox{\hyperlink{databasesingleton_8h}{databasesingleton.\+h}} +\item +file \mbox{\hyperlink{func2serv_8cpp}{func2serv.\+cpp}} +\item +file \mbox{\hyperlink{func2serv_8h}{func2serv.\+h}} +\item +file \mbox{\hyperlink{server_2main_8cpp}{main.\+cpp}} +\item +file \mbox{\hyperlink{mytcpserver_8cpp}{mytcpserver.\+cpp}} +\item +file \mbox{\hyperlink{mytcpserver_8h}{mytcpserver.\+h}} +\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/dir_db3a54907829b36871118d03417739cd.tex b/docs/doxygen/latex/dir_db3a54907829b36871118d03417739cd.tex new file mode 100644 index 0000000..eb59b64 --- /dev/null +++ b/docs/doxygen/latex/dir_db3a54907829b36871118d03417739cd.tex @@ -0,0 +1,39 @@ +\doxysection{client Directory Reference} +\hypertarget{dir_db3a54907829b36871118d03417739cd}{}\label{dir_db3a54907829b36871118d03417739cd}\index{client Directory Reference@{client Directory Reference}} +\doxysubsubsection*{Files} +\begin{DoxyCompactItemize} +\item +file \mbox{\hyperlink{add__product_8cpp}{add\+\_\+product.\+cpp}} +\item +file \mbox{\hyperlink{add__product_8h}{add\+\_\+product.\+h}} +\item +file \mbox{\hyperlink{authregwindow_8cpp}{authregwindow.\+cpp}} +\item +file \mbox{\hyperlink{authregwindow_8h}{authregwindow.\+h}} +\item +file \mbox{\hyperlink{functions__for__client_8cpp}{functions\+\_\+for\+\_\+client.\+cpp}} +\item +file \mbox{\hyperlink{functions__for__client_8h}{functions\+\_\+for\+\_\+client.\+h}} +\item +file \mbox{\hyperlink{client_2main_8cpp}{main.\+cpp}} +\item +file \mbox{\hyperlink{mainwindow_8cpp}{mainwindow.\+cpp}} +\item +file \mbox{\hyperlink{mainwindow_8h}{mainwindow.\+h}} +\item +file \mbox{\hyperlink{managerforms_8cpp}{managerforms.\+cpp}} +\item +file \mbox{\hyperlink{managerforms_8h}{managerforms.\+h}} +\item +file \mbox{\hyperlink{menucard_8cpp}{menucard.\+cpp}} +\item +file \mbox{\hyperlink{menu_card_8h}{menu\+Card.\+h}} +\item +file \mbox{\hyperlink{product_card_8cpp}{product\+Card.\+cpp}} +\item +file \mbox{\hyperlink{product_card_8h}{product\+Card.\+h}} +\item +file \mbox{\hyperlink{_singleton_8cpp}{Singleton.\+cpp}} +\item +file \mbox{\hyperlink{_singleton_8h}{Singleton.\+h}} +\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/doxygen.sty b/docs/doxygen/latex/doxygen.sty new file mode 100644 index 0000000..66a07a5 --- /dev/null +++ b/docs/doxygen/latex/doxygen.sty @@ -0,0 +1,714 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{doxygen} + +% Packages used by this style file +\RequirePackage{alltt} +%%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{calc} +\RequirePackage{float} +%%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{verbatim} +\RequirePackage[table]{xcolor} +\RequirePackage{longtable_doxygen} +\RequirePackage{tabu_doxygen} +\RequirePackage{fancyvrb} +\RequirePackage{tabularx} +\RequirePackage{multicol} +\RequirePackage{multirow} +\RequirePackage{hanging} +\RequirePackage{ifpdf} +\RequirePackage{adjustbox} +\RequirePackage{amssymb} +\RequirePackage{stackengine} +\RequirePackage{enumitem} +\RequirePackage{alphalph} +\RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis + +%---------- Internal commands used in this style file ---------------- + +\newcommand{\ensurespace}[1]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip% hide the previous |\vskip| from |\addvspace| + \endgroup% +} + +\newcommand{\DoxyHorRuler}[1]{% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{#1=0}% + {% + \hrule% + }% + {% + \hrulefilll% + }% +} +\newcommand{\DoxyLabelFont}{} +\newcommand{\entrylabel}[1]{% + {% + \parbox[b]{\labelwidth-4pt}{% + \makebox[0pt][l]{\DoxyLabelFont#1}% + \vspace{1.5\baselineskip}% + }% + }% +} + +\newenvironment{DoxyDesc}[1]{% + \ensurespace{4\baselineskip}% + \begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + %\setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + }% + \item[#1]% +}{% + \end{list}% +} + +\newsavebox{\xrefbox} +\newlength{\xreflength} +\newcommand{\xreflabel}[1]{% + \sbox{\xrefbox}{#1}% + \setlength{\xreflength}{\wd\xrefbox}% + \ifthenelse{\xreflength>\labelwidth}{% + \begin{minipage}{\textwidth}% + \setlength{\parindent}{0pt}% + \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}% + \end{minipage}% + }{% + \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}% + }% +} + +%---------- Commands used by doxygen LaTeX output generator ---------- + +% Used by
 ... 
+\newenvironment{DoxyPre}{% + \small% + \begin{alltt}% +}{% + \end{alltt}% + \normalsize% +} +% Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output. +\newlength{\CodeWidthChar} +\newlength{\CodeHeightChar} +\settowidth{\CodeWidthChar}{?} +\settoheight{\CodeHeightChar}{?} +% Necessary for hanging indent +\newlength{\DoxyCodeWidth} + +\newcommand\DoxyCodeLine[1]{ + \ifthenelse{\equal{\detokenize{#1}}{}} + { + \vspace*{\baselineskip} + } + { + \hangpara{\DoxyCodeWidth}{1}{#1}\par + } +} + +\newcommand\NiceSpace{% + \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}% +} + +% Used by @code ... @endcode +\newenvironment{DoxyCode}[1]{% + \par% + \vspace{2pt}% + \scriptsize% + \normalfont\ttfamily% + \rightskip0pt plus 1fil% + \settowidth{\DoxyCodeWidth}{000000}% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{\equal{#1}{0}}% + {% + {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces% + }% + {% + {\lccode`~32 \lowercase{\global\let~}}\obeyspaces% + }% + \vspace{2pt}% +}{% + \normalfont% + \normalsize% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% +} + +% Redefining not defined characters, i.e. "Replacement Character" in tex output. +\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{% + \textcolor{white}{\sffamily\bfseries\small ?}}{% + \rotatebox{45}{$\blacksquare$}}}} + +% Used by @example, @include, @includelineno and @dontinclude +\newenvironment{DoxyCodeInclude}[1]{% + \DoxyCode{#1}% +}{% + \endDoxyCode% +} + +% Used by @verbatim ... @endverbatim +\newenvironment{DoxyVerb}{% + \par% + \footnotesize% + \verbatim% +}{% + \endverbatim% + \normalsize% +} + +% Used by @verbinclude +\newenvironment{DoxyVerbInclude}{% + \DoxyVerb% +}{% + \endDoxyVerb% +} + +% Used by numbered lists (using '-#' or
    ...
) +\setlistdepth{12} +\newlist{DoxyEnumerate}{enumerate}{12} +\setlist[DoxyEnumerate,1]{label=\arabic*.} +\setlist[DoxyEnumerate,2]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,3]{label=\roman*.} +\setlist[DoxyEnumerate,4]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,5]{label=\arabic*.} +\setlist[DoxyEnumerate,6]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,7]{label=\roman*.} +\setlist[DoxyEnumerate,8]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,9]{label=\arabic*.} +\setlist[DoxyEnumerate,10]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,11]{label=\roman*.} +\setlist[DoxyEnumerate,12]{label=\enumAlphAlphcnt*.} + +% Used by bullet lists (using '-', @li, @arg, or
    ...
) +\setlistdepth{12} +\newlist{DoxyItemize}{itemize}{12} +\setlist[DoxyItemize]{label=\textperiodcentered} + +\setlist[DoxyItemize,1]{label=\textbullet} +\setlist[DoxyItemize,2]{label=\normalfont\bfseries \textendash} +\setlist[DoxyItemize,3]{label=\textasteriskcentered} +\setlist[DoxyItemize,4]{label=\textperiodcentered} + +% Used for check boxes +\newcommand{\DoxyUnchecked}{$\square$} +\newcommand{\DoxyChecked}{\rlap{\raisebox{0.3ex}{\hspace{0.4ex}\tiny \checkmark}}$\square$} + +% Used by description lists (using
...
) +\newenvironment{DoxyDescription}{% + \description% +}{% + \enddescription% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if caption is specified) +\newenvironment{DoxyImage}{% + \begin{figure}[H]% + \centering% +}{% + \end{figure}% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if no caption is specified) +\newenvironment{DoxyImageNoCaption}{% + \begin{center}% +}{% + \end{center}% +} + +% Used by @image +% (only if inline is specified) +\newenvironment{DoxyInlineImage}{% +}{% +} + +% Used by @attention +\newenvironment{DoxyAttention}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @important +\newenvironment{DoxyImportant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @author and @authors +\newenvironment{DoxyAuthor}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @date +\newenvironment{DoxyDate}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @invariant +\newenvironment{DoxyInvariant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @note +\newenvironment{DoxyNote}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @post +\newenvironment{DoxyPostcond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @pre +\newenvironment{DoxyPrecond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @copyright +\newenvironment{DoxyCopyright}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @remark +\newenvironment{DoxyRemark}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @return and @returns +\newenvironment{DoxyReturn}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @since +\newenvironment{DoxySince}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @see +\newenvironment{DoxySeeAlso}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @version +\newenvironment{DoxyVersion}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @warning +\newenvironment{DoxyWarning}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @par and @paragraph +\newenvironment{DoxyParagraph}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by parameter lists +\newenvironment{DoxyParams}[2][]{% + \tabulinesep=1mm% + \par% + \ifthenelse{\equal{#1}{}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description + {\ifthenelse{\equal{#1}{1}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc + } + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields of simple structs +\newenvironment{DoxyFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields simple class style enums +\newenvironment{DoxyEnumFields}[2][]{% + \tabulinesep=1mm% + \par% + \ifthenelse{\equal{#1}{2}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,r]|X[-1,l]|}}% with init value + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for parameters within a detailed function description +\newenvironment{DoxyParamCaption}{% + \renewcommand{\item}[3][]{\\ \hspace*{2.0cm} ##1 {\em ##2}##3}% +}{% +} + +% Used by return value lists +\newenvironment{DoxyRetVals}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by exception lists +\newenvironment{DoxyExceptions}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by template parameter lists +\newenvironment{DoxyTemplParams}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for member lists +\newenvironment{DoxyCompactItemize}{% + \begin{itemize}% + \setlength{\itemsep}{-3pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \setlength{\partopsep}{0pt}% +}{% + \end{itemize}% +} + +% Used for member descriptions +\newenvironment{DoxyCompactList}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \renewcommand{\makelabel}{\hfill}% + }% +}{% + \end{list}% +} + +% Used for reference lists (@bug, @deprecated, @todo, etc.) +\newenvironment{DoxyRefList}{% + \begin{list}{}{% + \setlength{\labelwidth}{10pt}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \renewcommand{\makelabel}{\xreflabel}% + }% +}{% + \end{list}% +} + +% Used by @bug, @deprecated, @todo, etc. +\newenvironment{DoxyRefDesc}[1]{% + \begin{list}{}{% + \renewcommand\makelabel[1]{\textbf{##1}}% + \settowidth\labelwidth{\makelabel{#1}}% + \setlength\leftmargin{\labelwidth+\labelsep}% + }% +}{% + \end{list}% +} + +% Used by parameter lists and simple sections +\newenvironment{Desc} +{\begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + } +}{% + \end{list}% +} + +% Used by tables +\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}% +\newenvironment{TabularC}[1]% +{\tabulinesep=1mm +\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}% +{\end{longtabu*}\par}% + +\newenvironment{TabularNC}[1]% +{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}% +{\end{tabu}\par}% + +% Used for member group headers +\newenvironment{Indent}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + }% + \item[]\ignorespaces% +}{% + \unskip% + \end{list}% +} + +% Used when hyperlinks are turned on +\newcommand{\doxylink}[2]{% + \mbox{\hyperlink{#1}{#2}}% +} + +% Used when hyperlinks are turned on +% Third argument is the SectionType, see the doxygen internal +% documentation for the values (relevant: Page ... Subsubsection). +\newcommand{\doxysectlink}[3]{% + \mbox{\hyperlink{#1}{#2}}% +} +% Used when hyperlinks are turned off +\newcommand{\doxyref}[3]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used when hyperlinks are turned off +% Fourth argument is the SectionType, see the doxygen internal +% documentation for the values (relevant: Page ... Subsubsection). +\newcommand{\doxysectref}[4]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used to link to a table when hyperlinks are turned on +\newcommand{\doxytablelink}[2]{% + \ref{#1}% +} + +% Used to link to a table when hyperlinks are turned off +\newcommand{\doxytableref}[3]{% + \ref{#3}% +} + +% Used by @addindex +\newcommand{\lcurly}{\{} +\newcommand{\rcurly}{\}} + +% Colors used for syntax highlighting +\definecolor{comment}{rgb}{0.5,0.0,0.0} +\definecolor{keyword}{rgb}{0.0,0.5,0.0} +\definecolor{keywordtype}{rgb}{0.38,0.25,0.125} +\definecolor{keywordflow}{rgb}{0.88,0.5,0.0} +\definecolor{preprocessor}{rgb}{0.5,0.38,0.125} +\definecolor{stringliteral}{rgb}{0.0,0.125,0.25} +\definecolor{charliteral}{rgb}{0.0,0.5,0.5} +\definecolor{xmlcdata}{rgb}{0.0,0.0,0.0} +\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0} +\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43} +\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0} +\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0} + +% Color used for table heading +\newcommand{\tableheadbgcolor}{lightgray}% + +% Version of hypertarget with correct landing location +\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}} + +% possibility to have sections etc. be within the margins +% unfortunately had to copy part of book.cls and add \raggedright +\makeatletter +\newcounter{subsubsubsection}[subsubsection] +\newcounter{subsubsubsubsection}[subsubsubsection] +\newcounter{subsubsubsubsubsection}[subsubsubsubsection] +\newcounter{subsubsubsubsubsubsection}[subsubsubsubsubsection] +\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}} +\renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}} +\renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsubsection.\arabic{subsubsubsubsubsection}} +\renewcommand{\thesubsubsubsubsubsubsection}{\thesubsubsubsubsubsection.\arabic{subsubsubsubsubsubsection}} +\newcommand{\subsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsubsubsectionmark}[1]{} +\def\toclevel@subsubsubsection{4} +\def\toclevel@subsubsubsubsection{5} +\def\toclevel@subsubsubsubsubsection{6} +\def\toclevel@subsubsubsubsubsubsection{7} +\def\toclevel@paragraph{8} +\def\toclevel@subparagraph{9} + +\newcommand\doxysection{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\raggedright\normalfont\Large\bfseries}} +\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\large\bfseries}} +\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsection{\@startsection{subsubsubsection}{4}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsection{\@startsection{subsubsubsubsection}{5}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsubsection{\@startsection{subsubsubsubsubsection}{6}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsubsubsection{\@startsection{subsubsubsubsubsubsection}{7}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxyparagraph{\@startsection{paragraph}{8}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubparagraph{\@startsection{subparagraph}{9}{\parindent}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} + +\newcommand\l@subsubsubsection{\@dottedtocline{4}{10.0em}{7.8em}} +\newcommand\l@subsubsubsubsection{\@dottedtocline{5}{13.0em}{9.4em}} +\newcommand\l@subsubsubsubsubsection{\@dottedtocline{6}{15.0em}{11em}} +\newcommand\l@subsubsubsubsubsubsection{\@dottedtocline{7}{18.0em}{12.6em}} +\renewcommand\l@paragraph{\@dottedtocline{8}{21.0em}{14.2em}} +\renewcommand\l@subparagraph{\@dottedtocline{9}{24.0em}{15.8em}} +\makeatother +% the sectsty doesn't look to be maintained but gives, in our case, some warning like: +% LaTeX Warning: Command \underline has changed. +% Check if current package is valid. +% unfortunately had to copy the relevant part +\newcommand*{\doxypartfont} [1] + {\gdef\SS@partnumberfont{\SS@sectid{0}\SS@nopart\SS@makeulinepartchap#1} + \gdef\SS@parttitlefont{\SS@sectid{0}\SS@titlepart\SS@makeulinepartchap#1}} +\newcommand*{\doxychapterfont} [1] + {\gdef\SS@chapnumfont{\SS@sectid{1}\SS@nopart\SS@makeulinepartchap#1} + \gdef\SS@chaptitlefont{\SS@sectid{1}\SS@titlepart\SS@makeulinepartchap#1}} +\newcommand*{\doxysectionfont} [1] + {\gdef\SS@sectfont{\SS@sectid{2}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubsectionfont} [1] + {\gdef\SS@subsectfont{\SS@sectid{3}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubsubsectionfont} [1] + {\gdef\SS@subsubsectfont{\SS@sectid{4}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxyparagraphfont} [1] + {\gdef\SS@parafont{\SS@sectid{5}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubparagraphfont} [1] + {\gdef\SS@subparafont{\SS@sectid{6}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxyminisecfont} [1] + {\gdef\SS@minisecfont{\SS@sectid{7}\SS@rr\SS@makeulinepartchap#1}} +\newcommand*{\doxyallsectionsfont} [1] {\doxypartfont{#1}% + \doxychapterfont{#1}% + \doxysectionfont{#1}% + \doxysubsectionfont{#1}% + \doxysubsubsectionfont{#1}% + \doxyparagraphfont{#1}% + \doxysubparagraphfont{#1}% + \doxyminisecfont{#1}}% +% Define caption that is also suitable in a table +% for usage with hyperlinks +\makeatletter +\def\doxyfigcaption{% +\H@refstepcounter{figure}% +\@dblarg{\@caption{figure}}} + +% for usage without hyperlinks +\def\doxyfigcaptionnolink{% +\refstepcounter{figure}% +\@dblarg{\@caption{figure}}} +\makeatother + +% Define alpha enumarative names for counters > 26 +\makeatletter +\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} +\def\@enumalphalphcnt#1{\alphalph{#1}} +\def\enumAlphAlphcnt#1{\expandafter\@enumAlphAlphcnt\csname c@#1\endcsname} +\def\@enumAlphAlphcnt#1{\AlphAlph{#1}} +\makeatother +\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{aa} +\AddEnumerateCounter{\enumAlphAlphcnt}{\@enumAlphAlphcnt}{AA} diff --git a/docs/doxygen/latex/etoc_doxygen.sty b/docs/doxygen/latex/etoc_doxygen.sty new file mode 100644 index 0000000..5f7e127 --- /dev/null +++ b/docs/doxygen/latex/etoc_doxygen.sty @@ -0,0 +1,2178 @@ +%% +%% This is file etoc_doxygen.sty +%% +%% Apart from this header notice and the renaming from etoc to +%% etoc_doxygen (also in \ProvidesPackage) it is an identical +%% copy of +%% +%% etoc.sty +%% +%% at version 1.2b of 2023/07/01. +%% +%% This file has been provided to Doxygen team courtesy of the +%% author for benefit of users having a LaTeX installation not +%% yet providing version 1.2a or later of etoc, whose +%% deeplevels feature is required. +%% +%% The original source etoc.dtx (only of the latest version at +%% any given time) is available at +%% +%% https://ctan.org/pkg/etoc +%% +%% and contains the terms for copying and modification as well +%% as author contact information. +%% +%% In brief any modified versions of this file must be renamed +%% with new filenames distinct from etoc.sty. +%% +%% Package: etoc +%% Version: 1.2b +%% License: LPPL 1.3c +%% Copyright (C) 2012-2023 Jean-Francois B. +\NeedsTeXFormat{LaTeX2e}[2003/12/01] +\ProvidesPackage{etoc_doxygen}[2023/07/01 v1.2b Completely customisable TOCs (JFB)] +\newif\ifEtoc@oldLaTeX +\@ifl@t@r\fmtversion{2020/10/01} + {} + {\Etoc@oldLaTeXtrue + \PackageInfo{etoc}{Old LaTeX (\fmtversion) detected!\MessageBreak + Since 1.1a (2023/01/14), etoc prefers LaTeX at least\MessageBreak + as recent as 2020-10-01, for reasons of the .toc file,\MessageBreak + and used to require it (from 1.1a to 1.2).\MessageBreak + This etoc (1.2b) does not *require* it, but has not been\MessageBreak + tested thoroughly on old LaTeX (especially if document\MessageBreak + does not use hyperref) and retrofitting was done only\MessageBreak + on basis of author partial remembrances of old context.\MessageBreak + Reported}} +\RequirePackage{kvoptions} +\SetupKeyvalOptions{prefix=Etoc@} +\newif\ifEtoc@lof +\DeclareVoidOption{lof}{\Etoc@loftrue + \PackageInfo{etoc}{Experimental support for \string\locallistoffigures.\MessageBreak + Barely tested, use at own risk}% +} +\newif\ifEtoc@lot +\DeclareVoidOption{lot}{\Etoc@lottrue + \PackageInfo{etoc}{Experimental support for \string\locallistoftables.\MessageBreak + Barely tested, use at own risk}% +} +\@ifclassloaded{memoir}{ +\PackageInfo{etoc} + {As this is with memoir class, all `...totoc' options\MessageBreak + are set true by default. Reported} +\DeclareBoolOption[true]{maintoctotoc} +\DeclareBoolOption[true]{localtoctotoc} +\DeclareBoolOption[true]{localloftotoc} +\DeclareBoolOption[true]{locallottotoc} +}{ +\DeclareBoolOption[false]{maintoctotoc} +\DeclareBoolOption[false]{localtoctotoc} +\DeclareBoolOption[false]{localloftotoc} +\DeclareBoolOption[false]{locallottotoc} +} +\DeclareBoolOption[true]{ouroboros} +\DeclareBoolOption[false]{deeplevels} +\DeclareDefaultOption{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}} +\ProcessKeyvalOptions* +\DisableKeyvalOption[action=error,package=etoc]{etoc}{lof} +\DisableKeyvalOption[action=error,package=etoc]{etoc}{lot} +\DisableKeyvalOption[action=error,package=etoc]{etoc}{deeplevels} +\def\etocsetup#1{\setkeys{etoc}{#1}} +\def\etocifmaintoctotoc{\ifEtoc@maintoctotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocaltoctotoc{\ifEtoc@localtoctotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocalloftotoc{\ifEtoc@localloftotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocallottotoc{\ifEtoc@locallottotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\RequirePackage{multicol} +\def\etoc@{\etoc@} +\long\def\Etoc@gobtoetoc@ #1\etoc@{} +\newtoks\Etoc@toctoks +\def\Etoc@par{\par} +\def\etocinline{\def\Etoc@par{}} +\let\etocnopar\etocinline +\def\etocdisplay{\def\Etoc@par{\par}} +\let\Etoc@global\@empty +\def\etocglobaldefs{\let\Etoc@global\global\let\tof@global\global} +\def\etoclocaldefs {\let\Etoc@global\@empty\let\tof@global\@empty} +\newif\ifEtoc@numbered +\newif\ifEtoc@hyperref +\newif\ifEtoc@parskip +\newif\ifEtoc@tocwithid +\newif\ifEtoc@standardlines +\newif\ifEtoc@etocstyle +\newif\ifEtoc@classstyle +\newif\ifEtoc@keeporiginaltoc +\newif\ifEtoc@skipprefix +\newif\ifEtoc@isfirst +\newif\ifEtoc@localtoc +\newif\ifEtoc@skipthisone +\newif\ifEtoc@stoptoc +\newif\ifEtoc@notactive +\newif\ifEtoc@mustclosegroup +\newif\ifEtoc@isemptytoc +\newif\ifEtoc@checksemptiness +\def\etocchecksemptiness {\Etoc@checksemptinesstrue } +\def\etocdoesnotcheckemptiness {\Etoc@checksemptinessfalse } +\newif\ifEtoc@notocifnotoc +\def\etocnotocifnotoc {\Etoc@checksemptinesstrue\Etoc@notocifnotoctrue } +\newcounter{etoc@tocid} +\def\Etoc@tocext{toc} +\def\Etoc@lofext{lof} +\def\Etoc@lotext{lot} +\let\Etoc@currext\Etoc@tocext +\def\etocifislocal{\ifEtoc@localtoc\expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi + } +\def\etocifislocaltoc{\etocifislocal{\ifx\Etoc@currext\Etoc@tocext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\def\etocifislocallof{\etocifislocal{\ifx\Etoc@currext\Etoc@lofext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\def\etocifislocallot{\etocifislocal{\ifx\Etoc@currext\Etoc@lotext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\expandafter\def\csname Etoc@-3@@\endcsname {-\thr@@} +\expandafter\def\csname Etoc@-2@@\endcsname {-\tw@} +\expandafter\let\csname Etoc@-1@@\endcsname \m@ne +\expandafter\let\csname Etoc@0@@\endcsname \z@ +\expandafter\let\csname Etoc@1@@\endcsname \@ne +\expandafter\let\csname Etoc@2@@\endcsname \tw@ +\expandafter\let\csname Etoc@3@@\endcsname \thr@@ +\expandafter\chardef\csname Etoc@4@@\endcsname 4 +\expandafter\chardef\csname Etoc@5@@\endcsname 5 +\expandafter\chardef\csname Etoc@6@@\endcsname 6 +\ifEtoc@deeplevels + \expandafter\chardef\csname Etoc@7@@\endcsname 7 + \expandafter\chardef\csname Etoc@8@@\endcsname 8 + \expandafter\chardef\csname Etoc@9@@\endcsname 9 + \expandafter\chardef\csname Etoc@10@@\endcsname 10 + \expandafter\chardef\csname Etoc@11@@\endcsname 11 + \expandafter\chardef\csname Etoc@12@@\endcsname 12 +\fi +\expandafter\let\expandafter\Etoc@maxlevel + \csname Etoc@\ifEtoc@deeplevels12\else6\fi @@\endcsname +\edef\etocthemaxlevel{\number\Etoc@maxlevel} +\@ifclassloaded{memoir}{\def\Etoc@minf{-\thr@@}}{\def\Etoc@minf{-\tw@}} +\let\Etoc@none@@ \Etoc@minf +\expandafter\let\expandafter\Etoc@all@@ + \csname Etoc@\ifEtoc@deeplevels11\else5\fi @@\endcsname +\let\Etoc@dolevels\@empty +\def\Etoc@newlevel #1{\expandafter\def\expandafter\Etoc@dolevels\expandafter + {\Etoc@dolevels\Etoc@do{#1}}} +\ifdefined\expanded + \def\etocsetlevel#1#2{\expanded{\noexpand\etoc@setlevel{#1}{#2}}}% +\else + \def\etocsetlevel#1#2{{\edef\Etoc@tmp{\noexpand\etoc@setlevel{#1}{#2}}\expandafter}\Etoc@tmp}% +\fi +\def\etoc@setlevel#1#2{% + \edef\Etoc@tmp{\the\numexpr#2}% + \if1\ifnum\Etoc@tmp>\Etoc@maxlevel0\fi\unless\ifnum\Etoc@minf<\Etoc@tmp;\fi1% + \ifEtoc@deeplevels + \in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,% + .7,.8,.9,.10,.11,.12,}% + \else + \in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,}% + \fi + \ifin@\else\if\@car#1\@nil @\in@true\fi\fi + \ifin@ + \PackageWarning{etoc} + {Sorry, but `#1' is forbidden as level name.\MessageBreak + \if\@car#1\@nil @% + (because of the @ as first character)\MessageBreak\fi + Reported}% + \else + \etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}% + \expandafter\let\csname Etoc@#1@@\expandafter\endcsname + \csname Etoc@\Etoc@tmp @@\endcsname + \expandafter\edef\csname Etoc@@#1@@\endcsname + {\expandafter\noexpand\csname Etoc@#1@@\endcsname}% + \expandafter\edef\csname toclevel@@#1\endcsname + {\expandafter\noexpand\csname toclevel@#1\endcsname}% + \fi + \else + \PackageWarning{etoc} + {Argument `\detokenize{#2}' of \string\etocsetlevel\space should + represent one of\MessageBreak + \ifnum\Etoc@minf=-\thr@@-2, \fi-1, 0, 1, 2, \ifEtoc@deeplevels ...\else3, 4\fi, + \the\numexpr\Etoc@maxlevel-1, or \number\Etoc@maxlevel\space + but evaluates to \Etoc@tmp.\MessageBreak + The level of `#1' will be set to \number\Etoc@maxlevel.\MessageBreak + Tables of contents will ignore `#1' as long\MessageBreak + as its level is \number\Etoc@maxlevel\space (=\string\etocthemaxlevel).% + \MessageBreak + Reported}% + \etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}% + \expandafter\let\csname Etoc@#1@@\endcsname\Etoc@maxlevel + \fi +} +\def\etoclevel#1{\csname Etoc@#1@@\endcsname} +\def\etocthelevel#1{\number\csname Etoc@#1@@\endcsname} +\def\etocifunknownlevelTF#1{\@ifundefined{Etoc@#1@@}} +\@ifclassloaded{memoir}{\etocsetlevel{book}{-2}}{} +\etocsetlevel{part}{-1} +\etocsetlevel{chapter}{0} +\etocsetlevel{section}{1} +\etocsetlevel{subsection}{2} +\etocsetlevel{subsubsection}{3} +\etocsetlevel{paragraph}{4} +\etocsetlevel{subparagraph}{5} +\ifdefined\c@chapter + \etocsetlevel{appendix}{0} +\else + \etocsetlevel{appendix}{1} +\fi +\def\Etoc@do#1{\@namedef{l@@#1}{\csname l@#1\endcsname}} +\Etoc@dolevels +\let\Etoc@figure@@\Etoc@maxlevel +\let\Etoc@table@@ \Etoc@maxlevel +\let\Etoc@gobblethreeorfour\@gobblefour +\ifdefined\@gobblethree + \let\Etoc@gobblethree\@gobblethree +\else + \long\def\Etoc@gobblethree#1#2#3{}% +\fi +\AtBeginDocument{% +\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}% +\@ifpackageloaded{hyperref} + {\Etoc@hyperreftrue} + {\ifEtoc@oldLaTeX + \let\Etoc@gobblethreeorfour\Etoc@gobblethree + \let\Etoc@etoccontentsline@fourargs\Etoc@etoccontentsline@ + \long\def\Etoc@etoccontentsline@#1#2#3{% + \Etoc@etoccontentsline@fourargs{#1}{#2}{#3}{}% + }% + \fi + }% +} +\def\etocskipfirstprefix {\global\Etoc@skipprefixtrue } +\def\Etoc@updatestackofends#1\etoc@{\gdef\Etoc@stackofends{#1}} +\def\Etoc@stackofends{{-3}{}} +\def\Etoc@doendsandbegin{% + \expandafter\Etoc@traversestackofends\Etoc@stackofends\etoc@ +} +\def\Etoc@traversestackofends#1{% + \ifnum#1>\Etoc@level + \csname Etoc@end@#1\endcsname + \expandafter\Etoc@traversestackofends + \else + \Etoc@traversestackofends@done{#1}% + \fi +} +\def\Etoc@traversestackofends@done#1#2{#2% + \ifnum#1<\Etoc@level + \csname Etoc@begin@\the\numexpr\Etoc@level\endcsname + \Etoc@global\Etoc@isfirsttrue + \edef\Etoc@tmp{{\the\numexpr\Etoc@level}}% + \else + \Etoc@global\Etoc@isfirstfalse + \let\Etoc@tmp\@empty + \fi + \expandafter\Etoc@updatestackofends\Etoc@tmp{#1}% +} +\def\Etoc@etoccontentsline #1{% + \let\Etoc@next\Etoc@gobblethreeorfour + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \Etoc@skipthisonefalse + \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname + \if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi + \ifEtoc@localtoc + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \else + \ifEtoc@notactive + \Etoc@skipthisonetrue + \else + \unless\ifnum\Etoc@level>\etoclocaltop + \Etoc@skipthisonetrue + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \ifEtoc@skipthisone + \else + \unless\ifnum\Etoc@level>\c@tocdepth + \ifEtoc@standardlines + \let\Etoc@next\Etoc@savedcontentsline + \else + \let\Etoc@next\Etoc@etoccontentsline@ + \fi + \fi + \fi + \fi + \Etoc@next{#1}% +} +\def\Etoc@etoccontentsline@ #1#2#3#4{% + \Etoc@doendsandbegin + \Etoc@global\edef\Etoc@prefix {\expandafter\noexpand + \csname Etoc@prefix@\the\numexpr\Etoc@level\endcsname }% + \Etoc@global\edef\Etoc@contents{\expandafter\noexpand + \csname Etoc@contents@\the\numexpr\Etoc@level\endcsname }% + \ifEtoc@skipprefix \Etoc@global\def\Etoc@prefix{\@empty}\fi + \global\Etoc@skipprefixfalse + \Etoc@lxyz{#2}{#3}{#4}% + \Etoc@prefix + \Etoc@contents +} +\def\Etoc@lxyz #1#2#3{% + \ifEtoc@hyperref + \Etoc@global\def\etocthelink##1{\hyperlink{#3}{##1}}% + \else + \Etoc@global\let\etocthelink\@firstofone + \fi + \Etoc@global\def\etocthepage {#2}% + \ifEtoc@hyperref + \ifx\etocthepage\@empty + \Etoc@global\let\etocthelinkedpage\@empty + \else + \Etoc@global\def\etocthelinkedpage{\hyperlink {#3}{#2}}% + \fi + \else + \Etoc@global\let\etocthelinkedpage\etocthepage + \fi + \Etoc@global\def\etocthename{#1}% + \futurelet\Etoc@getnb@token\Etoc@@getnb #1\hspace\etoc@ + \ifEtoc@hyperref + \def\Etoc@tmp##1##2{\Etoc@global\def##2{\hyperlink{#3}{##1}}}% + \expandafter\Etoc@tmp\expandafter{\etocthename}\etocthelinkedname + \ifEtoc@numbered + \expandafter\Etoc@tmp\expandafter{\etocthenumber}\etocthelinkednumber + \else + \Etoc@global\let\etocthelinkednumber\@empty + \fi + \else + \Etoc@global\let\etocthelinkedname \etocthename + \Etoc@global\let\etocthelinkednumber\etocthenumber + \fi + \Etoc@global\expandafter\let\csname etoclink \endcsname \etocthelink + \Etoc@global\expandafter\let\csname etocname \endcsname \etocthename + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthenumber + \Etoc@global\expandafter\let\csname etocpage \endcsname \etocthepage + \ifEtoc@hyperref + \Etoc@lxyz@linktoc + \fi +} +\def\Etoc@lxyz@linktoc{% + \ifcase\Hy@linktoc + \or + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \or % page + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \else % all + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \fi +} +\def\Etoc@@getnb {% + \let\Etoc@next\Etoc@getnb + \ifx\Etoc@getnb@token\@sptoken\let\Etoc@next\Etoc@getnb@nonbr\fi + \ifx\Etoc@getnb@token\bgroup \let\Etoc@next\Etoc@getnb@nonbr\fi + \Etoc@next +} +\def\Etoc@getnb #1{% + \in@{#1}{\numberline\chapternumberline\partnumberline\booknumberline}% + \ifin@ + \let\Etoc@next\Etoc@getnb@nmbrd + \else + \ifnum\Etoc@level=\m@ne + \let\Etoc@next\Etoc@@getit + \else + \let\Etoc@next\Etoc@getnb@nonbr + \fi + \in@{#1}{\nonumberline}% + \ifin@ + \let\Etoc@next\Etoc@getnb@nonumberline + \fi + \fi + \Etoc@next #1% +} +\def\Etoc@getnb@nmbrd #1#2{% + \Etoc@global\Etoc@numberedtrue + \Etoc@global\def\etocthenumber {#2}% + \Etoc@getnb@nmbrd@getname\@empty +}% +\def\Etoc@getnb@nmbrd@getname #1\hspace\etoc@ {% + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% +} +\def\Etoc@getnb@nonbr #1\etoc@ {% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty +} +\def\Etoc@getnb@nonumberline #1\hspace\etoc@ {% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{\@gobble#1}% +} +\def\Etoc@@getit #1\hspace#2{% + \ifx\etoc@#2% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty + \else + \Etoc@global\Etoc@numberedtrue + \Etoc@global\def\etocthenumber {#1}% + \expandafter\Etoc@getit@getname \expandafter\@empty + \fi +} +\def\Etoc@getit@getname #1\hspace\etoc@ {% + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% +} +\let\etocthename \@empty +\let\etocthenumber \@empty +\let\etocthepage \@empty +\let\etocthelinkedname \@empty +\let\etocthelinkednumber \@empty +\let\etocthelinkedpage \@empty +\let\etocthelink \@firstofone +\DeclareRobustCommand*{\etocname} {} +\DeclareRobustCommand*{\etocnumber}{} +\DeclareRobustCommand*{\etocpage} {} +\DeclareRobustCommand*{\etoclink} {\@firstofone} +\DeclareRobustCommand*{\etocifnumbered} + {\ifEtoc@numbered\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\expandafter\let\expandafter\etocxifnumbered\csname etocifnumbered \endcsname +\DeclareRobustCommand*{\etociffirst} + {\ifEtoc@isfirst\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\expandafter\let\expandafter\etocxiffirst\csname etociffirst \endcsname +\def\Etoc@readtoc {% + \ifeof \Etoc@tf + \else + \read \Etoc@tf to \Etoc@buffer + \Etoc@toctoks=\expandafter\expandafter\expandafter + {\expandafter\the\expandafter\Etoc@toctoks\Etoc@buffer}% + \expandafter\Etoc@readtoc + \fi +} +\Etoc@toctoks {}% (superfluous, but for clarity) +\AtBeginDocument{\IfFileExists{\jobname.toc} + {{\endlinechar=\m@ne + \makeatletter + \newread\Etoc@tf + \openin\Etoc@tf\@filef@und + \Etoc@readtoc + \global\Etoc@toctoks=\expandafter{\the\Etoc@toctoks}% + \closein\Etoc@tf}} + {\typeout{No file \jobname.toc.}}} +\def\Etoc@openouttoc{% + \ifEtoc@hyperref + \ifx\hyper@last\@undefined + \IfFileExists{\jobname .toc} + {\Hy@WarningNoLine + {old toc file detected; run LaTeX again (cheers from `etoc')}% + \global\Etoc@toctoks={}% + } + {}% + \fi + \fi + \if@filesw + \newwrite \tf@toc + \immediate \openout \tf@toc \jobname .toc\relax + \fi + \global\let\Etoc@openouttoc\empty +} +\def\Etoc@toctoc{% + \gdef\Etoc@stackofends{{-3}{}}% + \global\let\Etoc@level\Etoc@minf + \global\let\Etoc@virtualtop\Etoc@minf + \the\Etoc@toctoks + \ifEtoc@notactive + \else + \gdef\Etoc@level{-\thr@@}% + \Etoc@doendsandbegin + \fi +} +\def\Etoc@@startlocaltoc#1#2{% + \ifEtoc@localtoc + \ifnum #1=#2\relax + \global\let\etoclocaltop\Etoc@virtualtop + \Etoc@@startlocaltochook + \etoclocaltableofcontentshook + \ifEtoc@etocstyle + \etocetoclocaltocmaketitle + \fi + \ifx\Etoc@aftertitlehook\@empty + \else + \ifEtoc@localtoctotoc + \ifEtoc@ouroboros + \else + \let\Etoc@tmp\contentsline + \def\contentsline{\let\contentsline\Etoc@tmp\Etoc@gobblethreeorfour}% + \fi + \fi + \fi + \global\Etoc@notactivefalse + \fi + \fi +} +\let\etoc@startlocaltoc\@gobble +\let\Etoc@@startlocaltoc@toc\Etoc@@startlocaltoc +\let\Etoc@@startlocaltochook\@empty +\unless\ifEtoc@deeplevels + \def\etocdivisionnameatlevel#1{% + \ifcase\numexpr#1\relax + \ifdefined\c@chapter chapter\else section\fi% + \or section% + \or subsection% + \or subsubsection% + \or paragraph% + \or subparagraph% + \or empty% + \else\ifnum\numexpr#1<\m@ne + book% + \else + part% + \fi + \fi + } +\else + \def\etocdivisionnameatlevel#1{% + \ifcase\numexpr#1\relax + \ifdefined\c@chapter chapter\else section\fi% + \or section% + \or subsection% + \or subsubsection% + \or subsubsubsection% + \or subsubsubsubsection% + \or subsubsubsubsubsection% + \or subsubsubsubsubsubsection% + \or paragraph% + \or subparagraph% + \else\ifnum\numexpr#1>\z@ + empty% + \else\ifnum\numexpr#1=\m@ne + part% + \else + book% + \fi\fi + \fi + } +\fi +\def\etoclocalheadtotoc#1#2{\addcontentsline{toc}{@#1}{#2}} +\def\etocglobalheadtotoc{\addcontentsline{toc}} +\providecommand*\UseName{\@nameuse} +\def\etocetoclocaltocmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\localcontentsname}% + \if@noskipsec\leavevmode\par\fi + \etociflocaltoctotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\localcontentsname}% + }% + }% + {}% +}% +\def\localcontentsname {\contentsname}% +\let\etoclocaltableofcontentshook\@empty +\if1\ifEtoc@lof0\fi\ifEtoc@lot0\fi1% +\else +\AtBeginDocument{% + \let\Etoc@originaladdcontentsline\addcontentsline + \def\addcontentsline{\Etoc@hackedaddcontentsline}% +}% +\fi +\ifEtoc@lof + \ifEtoc@lot + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lof,.lot,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} + \else + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lof,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} + \fi +\else + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lot,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} +\fi +\def\Etoc@hackedaddcontentsline@i#1#2#3{% + \expanded{\noexpand\in@{.#1;#2,}}{.lof;figure,.lot;table,}% + \ifin@ + \addtocontents {toc}{% + \protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% + \fi + \Etoc@originaladdcontentsline{#1}{#2}{#3}% +} +\unless\ifdefined\expanded + \def\Etoc@hackedaddcontentsline#1{% + {\edef\Etoc@tmp{\noexpand\in@{.#1,}{\ifEtoc@lof.lof,\fi\ifEtoc@lot.lot,\fi}}\expandafter}% + \Etoc@tmp + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}% + } + \def\Etoc@hackedaddcontentsline@i#1#2#3{% + {\edef\Etoc@tmp{\noexpand\in@{.#1;#2,}}\expandafter}% + \Etoc@tmp{.lof;figure,.lot;table,}% + \ifin@ + \addtocontents {toc}{% + \protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% + \fi + \Etoc@originaladdcontentsline{#1}{#2}{#3}% + } +\fi +\def\Etoc@@startlocallistof#1#2#3{% + \ifEtoc@localtoc + \ifnum #2=#3\relax + \global\let\etoclocaltop\Etoc@virtualtop + \global\Etoc@notactivefalse + \Etoc@@startlocaltochook + \csname etoclocallistof#1shook\endcsname + \ifEtoc@etocstyle + \csname etocetoclistof#1smaketitle\endcsname + \fi + \fi + \fi +} +\def\Etoc@@startlocallistof@setlevels#1{% + \ifnum\etoclocaltop<\z@ + \expandafter\let\csname Etoc@#1@@\endcsname\@ne + \else + \expandafter\let\csname Etoc@#1@@\expandafter\endcsname + \csname Etoc@\the\numexpr\etoclocaltop+\@ne @@\endcsname + \fi + \def\Etoc@do##1{% + \ifnum\etoclevel{##1}>\etoclocaltop + \expandafter\let\csname Etoc@##1@@\endcsname\Etoc@maxlevel + \fi}% + \Etoc@dolevels +} +\def\etoclocallistoffigureshook{\etocstandardlines} +\def\etoclocallistoftableshook {\etocstandardlines} +\def\locallistfigurename{\listfigurename} +\def\locallisttablename {\listtablename} +\def\etocetoclistoffiguresmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallistfigurename}% + \ifnum\etoclocaltop>\tw@\mbox{}\par\fi + \etociflocalloftotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\locallistfigurename}% + }% + }% + {}% +}% +\def\etocetoclistoftablesmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallisttablename}% + \ifnum\etoclocaltop>\tw@\mbox{}\par\fi + \etociflocallottotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\locallisttablename}% + }% + }% + {}% +}% +\let\Etoc@listofreset\@empty +\ifEtoc@lof + \def\locallistoffigures{% + \def\Etoc@listofreset{% + \let\Etoc@currext\Etoc@tocext + \let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc + \let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty + \let\Etoc@listofhook\@empty + }% + \let\Etoc@currext\Etoc@lofext + \def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{figure}}% + \def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{figure}}% + \def\Etoc@listofhook{% + \def\Etoc@do####1{% + \expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel + }% + \Etoc@dolevels + }% + \localtableofcontents + } +\else + \def\locallistoffigures{% + \PackageError{etoc}{% + \string\locallistoffigures \on@line\space but\MessageBreak + package was loaded without `lof' option}% + {Try again with \string\usepackage[lof]{etoc}}% + } +\fi +\ifEtoc@lot + \def\locallistoftables{% + \def\Etoc@listofreset{% + \let\Etoc@currext\Etoc@tocext + \let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc + \let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty + \let\Etoc@listofhook\@empty + }% + \let\Etoc@currext\Etoc@lotext + \def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{table}}% + \def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{table}}% + \def\Etoc@listofhook{% + \def\Etoc@do####1{% + \expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel + }% + \Etoc@dolevels + }% + \localtableofcontents + } +\else + \def\locallistoftables{% + \PackageError{etoc}{% + \string\locallistoftable \on@line\space but\MessageBreak + package was loaded without `lot' option}% + {Try again with \string\usepackage[lot]{etoc}}% + } +\fi +\def\Etoc@checkifempty {% + \global\Etoc@isemptytoctrue + \global\Etoc@stoptocfalse + \global\let\Etoc@level\Etoc@minf + \global\let\Etoc@virtualtop\Etoc@minf + \gdef\Etoc@stackofends{{-3}{}}% + \begingroup + \ifEtoc@localtoc + \def\etoc@startlocaltoc##1{% + \ifnum##1=\Etoc@tocid\relax + \global\let\etoclocaltop\Etoc@virtualtop + \Etoc@@startlocaltochook + \global\Etoc@notactivefalse + \fi + }% + \let\contentsline\Etoc@testingcontentslinelocal + \else + \let\contentsline\Etoc@testingcontentsline + \fi + \Etoc@storetocdepth + \let\Etoc@setlocaltop@doendsandbegin\@empty + \the\Etoc@toctoks + \Etoc@restoretocdepth + \endgroup +} +\DeclareRobustCommand*\etocifwasempty + {\ifEtoc@isemptytoc\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi } +\expandafter\let\expandafter\etocxifwasempty\csname etocifwasempty \endcsname +\def\Etoc@testingcontentslinelocal #1{% + \ifEtoc@stoptoc + \else + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname + \if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi + \ifEtoc@notactive + \else + \ifnum\Etoc@level>\etoclocaltop + \unless\ifnum\Etoc@level>\c@tocdepth + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \fi + \else + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \Etoc@gobblethreeorfour{}% +} +\def\Etoc@testingcontentsline #1{% + \ifEtoc@stoptoc + \else + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \unless\ifnum\csname Etoc@#1@@\endcsname>\c@tocdepth + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \Etoc@gobblethreeorfour{}% +} +\def\Etoc@localtableofcontents#1{% + \gdef\etoclocaltop{-\@m}% + \Etoc@localtoctrue + \global\Etoc@isemptytocfalse + \edef\Etoc@tocid{#1}% + \ifnum\Etoc@tocid<\@ne + \setbox0\hbox{\ref{Unknown toc ref \@secondoftwo#1. \space Rerun LaTeX}}% + \global\Etoc@stoptoctrue + \gdef\etoclocaltop{-\thr@@}% + \Etoc@tableofcontents + \expandafter\Etoc@gobtoetoc@ + \fi + \global\Etoc@notactivetrue + \ifEtoc@checksemptiness + \Etoc@checkifempty + \fi + \ifEtoc@isemptytoc + \ifEtoc@notactive + \setbox0\hbox{\ref{Unknown toc ID \number\Etoc@tocid. \space Rerun LaTeX}}% + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \gdef\etoclocaltop{-\thr@@}% + \Etoc@tableofcontents + \expandafter\expandafter\expandafter\Etoc@gobtoetoc@ + \fi + \else + \global\Etoc@stoptocfalse + \global\Etoc@notactivetrue + \edef\etoc@startlocaltoc##1% + {\noexpand\Etoc@@startlocaltoc{##1}{\Etoc@tocid}}% + \Etoc@tableofcontents + \fi + \@gobble\etoc@ + \endgroup\ifEtoc@mustclosegroup\endgroup\fi + \Etoc@tocdepthreset + \Etoc@listofreset + \etocaftertochook +}% \Etoc@localtableofcontents +\def\Etoc@getref #1{% + \@ifundefined{r@#1} + {0} + {\expandafter\Etoc@getref@i\romannumeral-`0% + \expandafter\expandafter\expandafter + \@car\csname r@#1\endcsname0\@nil\@etoc + }% +} +\def\Etoc@getref@i#1#2\@etoc{\ifnum9<1\string#1 #1#2\else 0\fi} +\def\Etoc@ref#1{\Etoc@localtableofcontents{\Etoc@getref{#1}}} +\def\Etoc@label#1{\label{#1}\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} +\@firstofone{\def\Etoc@again} {\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} +\def\Etoc@dothis #1#2\etoc@ {\fi #1} +\def\Etoc@t@bleofcontents{% + \gdef\etoclocaltop{-\@M}% + \ifx\Etoc@nexttoken\label\Etoc@dothis{\expandafter\Etoc@label\@gobble}\fi + \ifx\Etoc@nexttoken\@sptoken\Etoc@dothis{\Etoc@again}\fi + \ifx\Etoc@nexttoken\ref\Etoc@dothis{\expandafter\Etoc@ref\@gobble}\fi + \ifEtoc@tocwithid\Etoc@dothis{\Etoc@localtableofcontents{\c@etoc@tocid}}\fi + \global\Etoc@isemptytocfalse + \ifEtoc@checksemptiness\Etoc@checkifempty\fi + \ifEtoc@isemptytoc + \ifEtoc@notocifnotoc + \expandafter\expandafter\expandafter\@gobble + \fi + \fi + \Etoc@tableofcontents + \endgroup + \ifEtoc@mustclosegroup\endgroup\fi + \Etoc@tocdepthreset + \Etoc@listofreset + \etocaftertochook + \@gobble\etoc@ + }% \Etoc@t@bleofcontents +\def\Etoc@table@fcontents{% + \refstepcounter{etoc@tocid}% + \Etoc@tocwithidfalse + \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents +} +\def\Etoc@localtable@fcontents{% + \refstepcounter{etoc@tocid}% + \addtocontents{toc}{\string\etoc@startlocaltoc{\the\c@etoc@tocid}}% + \Etoc@tocwithidtrue + \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents +} +\def\etoctableofcontents{% + \Etoc@openouttoc + \Etoc@tocdepthset + \begingroup + \@ifstar + {\let\Etoc@aftertitlehook\@empty\Etoc@table@fcontents} + {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@table@fcontents}% +}% \etoctableofcontents +\def\etocifisstarred{\ifx\Etoc@aftertitlehook\@empty + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo + \fi} +\let\etocoriginaltableofcontents\tableofcontents +\let\tableofcontents\etoctableofcontents +\let\Etoc@listofhook\@empty +\newcommand*\localtableofcontents{% + \Etoc@openouttoc + \Etoc@tocdepthset + \begingroup + \Etoc@listofhook + \@ifstar + {\let\Etoc@aftertitlehook\@empty\Etoc@localtable@fcontents} + {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@localtable@fcontents}% +}% \localtableofcontents +\newcommand*\localtableofcontentswithrelativedepth[1]{% + \def\Etoc@@startlocaltochook{% + \global\c@tocdepth\numexpr\etoclocaltop+#1\relax + }% + \def\Etoc@listofreset{\let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty}% + \localtableofcontents +}% \localtableofcontentswithrelativedepth +\newcommand\etocsettocstyle[2]{% + \Etoc@etocstylefalse + \Etoc@classstylefalse + \def\Etoc@tableofcontents@user@before{#1}% + \def\Etoc@tableofcontents@user@after {#2}% +}% +\def\etocstoretocstyleinto#1{% +%% \@ifdefinable#1{% + \edef#1{\noexpand\Etoc@etocstylefalse\noexpand\Etoc@classstylefalse + \def\noexpand\Etoc@tableofcontents@user@before{% + \unexpanded\expandafter{\Etoc@tableofcontents@user@before}% + }% + \def\noexpand\Etoc@tableofcontents@user@after{% + \unexpanded\expandafter{\Etoc@tableofcontents@user@after}% + }% + }% +%% }% +}% +\def\Etoc@tableofcontents {% + \Etoc@tableofcontents@etoc@before + \ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi + \Etoc@tableofcontents@user@before + \Etoc@tableofcontents@contents + \ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi + \Etoc@tableofcontents@user@after + \Etoc@tableofcontents@etoc@after + \@gobble\etoc@ +} +\def\Etoc@tableofcontents@etoc@before{% + \ifnum\c@tocdepth>\Etoc@minf + \else + \expandafter\Etoc@gobtoetoc@ + \fi + \Etoc@par + \Etoc@beforetitlehook + \etocbeforetitlehook + \Etoc@storetocdepth + \let\Etoc@savedcontentsline\contentsline + \let\contentsline\Etoc@etoccontentsline + \ifEtoc@standardlines + \else + \def\Etoc@do##1{% + \expandafter\def\csname etocsaved##1tocline\endcsname + {\PackageError{etoc}{% + \expandafter\string\csname etocsaved##1tocline\endcsname\space + has been deprecated\MessageBreak + at 1.1a and is removed at 1.2.\MessageBreak + Use \expandafter\string\csname l@##1\endcsname\space directly.\MessageBreak + Reported \on@line}% + {I will use \expandafter\string + \csname l@##1\endcsname\space myself for this time.% + }% + \csname l@##1\endcsname + }% + }% + \Etoc@dolevels + \fi +}% +\def\Etoc@tableofcontents@contents{% + \Etoc@tocdepthset + \ifEtoc@parskip\parskip\z@skip\fi + \Etoc@aftertitlehook + \gdef\etoclocaltop{-\thr@@}% + \Etoc@toctoc + \etocaftercontentshook +}% +\def\Etoc@tableofcontents@etoc@after{% + \@nobreakfalse + \Etoc@restoretocdepth + \ifx\Etoc@global\global + \@ifundefined{tof@finish} + {} + {\ifx\tof@finish\@empty + \else + \global\let\contentsline\Etoc@savedcontentsline + \fi + }% + \fi +} +\def\etocsetstyle#1{\ifcsname Etoc@#1@@\endcsname + \expandafter\Etoc@setstyle@a + \else + \expandafter\Etoc@setstyle@error + \fi {#1}% +} +\def\Etoc@setstyle@error #1{% + \PackageWarning{etoc}{`#1' is unknown to etoc. \space Did you\MessageBreak + forget some \string\etocsetlevel{#1}{}?\MessageBreak + Reported}% + \@gobblefour +} +\def\Etoc@setstyle@a #1{% + \edef\Etoc@tmp{\the\numexpr\csname Etoc@#1@@\endcsname}% + \if1\unless\ifnum\Etoc@tmp<\Etoc@maxlevel 0\fi + \unless\ifnum\Etoc@tmp>\Etoc@minf 0\fi1% + \Etoc@standardlinesfalse + \expandafter\Etoc@setstyle@b\expandafter\Etoc@tmp + \else + \ifnum\Etoc@tmp=\Etoc@maxlevel + \in@{.#1,}{.figure,.table,}% + \ifin@ + \PackageWarning{etoc} + {You can not use \string\etocsetstyle\space with `#1'.\MessageBreak + Check the package documentation (in particular about\MessageBreak + \string\etoclocallistoffigureshook/\string\etoclocallistoftableshook)% + \MessageBreak on how to customize + figure and table entries in local\MessageBreak lists. Reported}% + \else + \PackageInfo{etoc} + {Attempt to set the style of `#1',\MessageBreak + whose level is currently the maximal one \etocthemaxlevel,\MessageBreak + which is never displayed. \space This will be ignored\MessageBreak + but note that we do quit compatibility mode.\MessageBreak + Reported}% + \Etoc@standardlinesfalse + \fi + \else + \PackageWarning{etoc}{This should not happen. Reported}% + \fi + \expandafter\@gobblefour + \fi +} +\long\def\Etoc@setstyle@b#1#2#3#4#5{% + \expandafter\def\csname Etoc@begin@#1\endcsname {#2}% + \expandafter\def\csname Etoc@prefix@#1\endcsname {#3}% + \expandafter\def\csname Etoc@contents@#1\endcsname {#4}% + \expandafter\def\csname Etoc@end@#1\endcsname {#5}% +} +\def\Etoc@setstyle@e#1{% + \expandafter\let\csname Etoc@begin@#1\endcsname \@empty + \expandafter\let\csname Etoc@prefix@#1\endcsname \@empty + \expandafter\let\csname Etoc@contents@#1\endcsname \@empty + \expandafter\let\csname Etoc@end@#1\endcsname \@empty +} +\def\Etoc@storelines@a#1{% + \noexpand\Etoc@setstyle@b{#1}% + {\expandafter\Etoc@expandonce\csname Etoc@begin@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@prefix@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@contents@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@end@#1\endcsname}% +} +\def\Etoc@expandonce#1{\unexpanded\expandafter{#1}} +\def\etocstorelinestylesinto#1{% + \edef#1{\Etoc@storelines@a{-2}\Etoc@storelines@a{-1}\Etoc@storelines@a{0}% + \Etoc@storelines@a {1}\Etoc@storelines@a {2}\Etoc@storelines@a{3}% + \Etoc@storelines@a {4}\Etoc@storelines@a {5}% + \ifEtoc@deeplevels + \Etoc@storelines@a{6}\Etoc@storelines@a{7}\Etoc@storelines@a{8}% + \Etoc@storelines@a{9}\Etoc@storelines@a{10}\Etoc@storelines@a{11}% + \fi + }% +} +\def\etocstorethislinestyleinto#1#2{% + \edef#2{\expandafter\Etoc@storelines@a\expandafter{\number\etoclevel{#1}}}% +}% +\def\etocfontminustwo {\normalfont \LARGE \bfseries} +\def\etocfontminusone {\normalfont \large \bfseries} +\def\etocfontzero {\normalfont \large \bfseries} +\def\etocfontone {\normalfont \normalsize \bfseries} +\def\etocfonttwo {\normalfont \normalsize} +\def\etocfontthree {\normalfont \footnotesize} +\def\etocsepminustwo {4ex \@plus .5ex \@minus .5ex} +\def\etocsepminusone {4ex \@plus .5ex \@minus .5ex} +\def\etocsepzero {2.5ex \@plus .4ex \@minus .4ex} +\def\etocsepone {1.5ex \@plus .3ex \@minus .3ex} +\def\etocseptwo {.5ex \@plus .1ex \@minus .1ex} +\def\etocsepthree {.25ex \@plus .05ex \@minus .05ex} +\def\etocbaselinespreadminustwo {1} +\def\etocbaselinespreadminusone {1} +\def\etocbaselinespreadzero {1} +\def\etocbaselinespreadone {1} +\def\etocbaselinespreadtwo {1} +\def\etocbaselinespreadthree {.9} +\def\etocminustwoleftmargin {1.5em plus 0.5fil} +\def\etocminustworightmargin {1.5em plus -0.5fil} +\def\etocminusoneleftmargin {1em} +\def\etocminusonerightmargin {1em} +\def\etoctoclineleaders + {\hbox{\normalfont\normalsize\hb@xt@2ex {\hss.\hss}}} +\def\etocabbrevpagename {p.~} +\def\etocpartname {Part} +\def\etocbookname {Book} +\def\etocdefaultlines{% + \Etoc@standardlinesfalse + \etocdefaultlines@setbook + \etocdefaultlines@setpart + \etocdefaultlines@setchapter + \etocdefaultlines@setsection + \etocdefaultlines@setsubsection + \etocdefaultlines@setsubsubsection + \etocdefaultlines@setdeeperones +} +\def\etocnoprotrusion{\leavevmode\kern-\p@\kern\p@} +\@ifclassloaded{memoir}{% + \def\etocdefaultlines@setbook{% + \Etoc@setstyle@b + {-2}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@secpenalty} + {\begingroup + \etocfontminustwo + \addvspace{\etocsepminustwo}% + \parindent \z@ + \leftskip \etocminustwoleftmargin + \rightskip \etocminustworightmargin + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etoclink{\etocbookname\enspace\etocthenumber:\quad}}{}% + \etocname + \baselineskip\etocbaselinespreadminustwo\baselineskip + \par}% + \addpenalty\@M\addvspace{\etocsepminusone}% + \endgroup} + {}% + } + }{\let\etocdefaultlines@setbook\@empty} +\def\etocdefaultlines@setpart{% +\Etoc@setstyle@b + {-1}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@secpenalty} + {\begingroup + \etocfontminusone + \addvspace{\etocsepminusone}% + \parindent \z@ + \leftskip \etocminusoneleftmargin + \rightskip \etocminusonerightmargin + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etoclink{\etocpartname\enspace\etocthenumber.\quad}}{}% + \etocname + \baselineskip\etocbaselinespreadminusone\baselineskip + \par}% + \addpenalty\@M\addvspace{\etocsepzero}% + \endgroup} + {}% +} +\def\etocdefaultlines@setchapter{% +\Etoc@setstyle@b + {0}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfontzero + \addvspace{\etocsepzero}% + \parindent \z@ \parfillskip \@flushglue + \vbox{\etocifnumbered{\etocnumber.\enspace}{}\etocname + \baselineskip\etocbaselinespreadzero\baselineskip + \par}% + \endgroup} + {\addpenalty{-\@highpenalty}\addvspace{\etocsepminusone}}% +} +\def\etocdefaultlines@setsection{% +\Etoc@setstyle@b + {1}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfontone + \addvspace{\etocsepone}% + \parindent \z@ \parfillskip \z@ + \setbox\z@\vbox{\parfillskip\@flushglue + \etocname\par + \setbox\tw@\lastbox + \global\setbox\@ne\hbox{\unhbox\tw@\ }}% + \dimen\z@=\wd\@ne + \setbox\z@=\etoctoclineleaders + \advance\dimen\z@\wd\z@ + \etocifnumbered + {\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}} + {\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}% + \advance\dimen\z@\wd\tw@ + \ifdim\dimen\z@ < \linewidth + \vbox{\etocname~% + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip + \par}% + \else + \vbox{\etocname~% + \leaders\copy\z@\hfil\break + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip + \par}% + \fi + \endgroup} + {\addpenalty\@secpenalty\addvspace{\etocsepzero}}% +} +\def\etocdefaultlines@setsubsection{% +\Etoc@setstyle@b + {2}% + {\addpenalty\@medpenalty\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfonttwo + \addvspace{\etocseptwo}% + \parindent \z@ \parfillskip \z@ + \setbox\z@\vbox{\parfillskip\@flushglue + \etocname\par\setbox\tw@\lastbox + \global\setbox\@ne\hbox{\unhbox\tw@}}% + \dimen\z@=\wd\@ne + \setbox\z@=\etoctoclineleaders + \advance\dimen\z@\wd\z@ + \etocifnumbered + {\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}} + {\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}% + \advance\dimen\z@\wd\tw@ + \ifdim\dimen\z@ < \linewidth + \vbox{\etocname~% + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip + \par}% + \else + \vbox{\etocname~% + \leaders\copy\z@\hfil\break + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip + \par}% + \fi + \endgroup} + {\addpenalty\@secpenalty\addvspace{\etocsepone}}% +} +\def\etocdefaultlines@setsubsubsection{% +\Etoc@setstyle@b + {3}% + {\addpenalty\@M + \etocfontthree + \vspace{\etocsepthree}% + \noindent + \etocskipfirstprefix} + {\allowbreak\,--\,} + {\etocname} + {.\hfil + \begingroup + \baselineskip\etocbaselinespreadthree\baselineskip + \par + \endgroup + \addpenalty{-\@highpenalty}} +} +\def\etocdefaultlines@setdeeperones{% +\Etoc@setstyle@e{4}% +\Etoc@setstyle@e{5}% +\ifEtoc@deeplevels + \Etoc@setstyle@e{6}% + \Etoc@setstyle@e{7}% + \Etoc@setstyle@e{8}% + \Etoc@setstyle@e{9}% + \Etoc@setstyle@e{10}% + \Etoc@setstyle@e{11}% +\fi +} +\def\etocabovetocskip{3.5ex \@plus 1ex \@minus .2ex} +\def\etocbelowtocskip{3.5ex \@plus 1ex \@minus .2ex} +\def\etoccolumnsep{2em} +\def\etocmulticolsep{0ex} +\def\etocmulticolpretolerance{-1} +\def\etocmulticoltolerance{200} +\def\etocdefaultnbcol{2} +\def\etocinnertopsep{2ex} +\newcommand\etocmulticolstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle + {\let\etocoldpar\par + \addvspace{\etocabovetocskip}% + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[#2\etocoldpar\addvspace{\etocinnertopsep}]} + {#2\ifvmode\else\begingroup\interlinepenalty\@M\parskip\z@skip + \@@par\endgroup + \fi + \nobreak\addvspace{\etocinnertopsep}% + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}% + }% + {\ifnum #1>\@ne + \expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}}% + \addvspace{\etocbelowtocskip}}% +} +\def\etocinnerbottomsep{3.5ex} +\def\etocinnerleftsep{2em} +\def\etocinnerrightsep{2em} +\def\etoctoprule{\hrule} +\def\etocleftrule{\vrule} +\def\etocrightrule{\vrule} +\def\etocbottomrule{\hrule} +\def\etoctoprulecolorcmd{\relax} +\def\etocbottomrulecolorcmd{\relax} +\def\etocleftrulecolorcmd{\relax} +\def\etocrightrulecolorcmd{\relax} +\def\etoc@ruledheading #1{% + \hb@xt@\linewidth{\color@begingroup + \hss #1\hss\hskip-\linewidth + \etoctoprulecolorcmd\leaders\etoctoprule\hss + \phantom{#1}% + \leaders\etoctoprule\hss\color@endgroup}% + \nointerlineskip\nobreak\vskip\etocinnertopsep} +\newcommand*\etocruledstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle + {\addvspace{\etocabovetocskip}% + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[\etoc@ruledheading{#2}]} + {\etoc@ruledheading{#2}% + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}}% + \addvspace{\etocbelowtocskip}}} +\def\etocframedmphook{\relax} +\long\def\etocbkgcolorcmd{\relax} +\long\def\Etoc@relax{\relax} +\newbox\etoc@framed@titlebox +\newbox\etoc@framed@contentsbox +\newcommand*\etocframedstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle{% + \addvspace{\etocabovetocskip}% + \sbox\z@{#2}% + \dimen\z@\dp\z@ + \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi + \setbox\etoc@framed@titlebox=\hb@xt@\linewidth{\color@begingroup + \hss + \ifx\etocbkgcolorcmd\Etoc@relax + \else + \sbox\tw@{\color{white}% + \vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}% + \ifdim\wd\z@<\linewidth \dp\tw@\z@\fi + \box\tw@ + \hskip-\wd\z@ + \fi + \copy\z@ + \hss + \hskip-\linewidth + \etoctoprulecolorcmd\leaders\etoctoprule\hss + \hskip\wd\z@ + \etoctoprulecolorcmd\leaders\etoctoprule\hss\color@endgroup}% + \setbox\z@\hbox{\etocleftrule\etocrightrule}% + \dimen\tw@\linewidth\advance\dimen\tw@-\wd\z@ + \advance\dimen\tw@-\etocinnerleftsep + \advance\dimen\tw@-\etocinnerrightsep + \setbox\etoc@framed@contentsbox=\vbox\bgroup + \hsize\dimen\tw@ + \kern\dimen\z@ + \vskip\etocinnertopsep + \hbox\bgroup + \begin{minipage}{\hsize}% + \etocframedmphook + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}} + {\pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}\unskip }% + \end{minipage}% + \egroup + \vskip\etocinnerbottomsep + \egroup + \vbox{\hsize\linewidth + \ifx\etocbkgcolorcmd\Etoc@relax + \else + \kern\ht\etoc@framed@titlebox + \kern\dp\etoc@framed@titlebox + \hb@xt@\linewidth{\color@begingroup + \etocleftrulecolorcmd\etocleftrule + \etocbkgcolorcmd + \leaders\vrule + \@height\ht\etoc@framed@contentsbox + \@depth\dp\etoc@framed@contentsbox + \hss + \etocrightrulecolorcmd\etocrightrule + \color@endgroup}\nointerlineskip + \vskip-\dp\etoc@framed@contentsbox + \vskip-\ht\etoc@framed@contentsbox + \vskip-\dp\etoc@framed@titlebox + \vskip-\ht\etoc@framed@titlebox + \fi + \box\etoc@framed@titlebox\nointerlineskip + \hb@xt@\linewidth{\color@begingroup + {\etocleftrulecolorcmd\etocleftrule}% + \hss\box\etoc@framed@contentsbox\hss + \etocrightrulecolorcmd\etocrightrule\color@endgroup} + \nointerlineskip + \vskip\ht\etoc@framed@contentsbox + \vskip\dp\etoc@framed@contentsbox + \hb@xt@\linewidth{\color@begingroup\etocbottomrulecolorcmd + \leaders\etocbottomrule\hss\color@endgroup}} + \addvspace{\etocbelowtocskip}}} +\newcommand\etoc@multicoltoc[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \tableofcontents} +\newcommand\etoc@multicoltoci[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \tableofcontents*} +\newcommand\etoc@local@multicoltoc[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \localtableofcontents} +\newcommand\etoc@local@multicoltoci[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \localtableofcontents*} +\newcommand*\etoc@ruledtoc[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \tableofcontents} +\newcommand*\etoc@ruledtoci[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \tableofcontents*} +\newcommand*\etoc@local@ruledtoc[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \localtableofcontents} +\newcommand*\etoc@local@ruledtoci[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \localtableofcontents*} +\newcommand*\etoc@framedtoc[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \tableofcontents} +\newcommand*\etoc@framedtoci[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \tableofcontents*} +\newcommand*\etoc@local@framedtoc[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \localtableofcontents} +\newcommand*\etoc@local@framedtoci[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \localtableofcontents*} +\def\etocmulticol{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@multicoltoci} + {\etoc@multicoltoc}} +\def\etocruled{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@ruledtoci} + {\etoc@ruledtoc}} +\def\etocframed{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@framedtoci} + {\etoc@framedtoc}} +\def\etoclocalmulticol{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@multicoltoci} + {\etoc@local@multicoltoc}} +\def\etoclocalruled{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@ruledtoci} + {\etoc@local@ruledtoc}} +\def\etoclocalframed{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@framedtoci} + {\etoc@local@framedtoc}} +\def\etocmemoirtoctotocfmt #1#2{% + \PackageWarning{etoc} + {\string\etocmemoirtoctotocfmt\space is deprecated.\MessageBreak + Use in its place \string\etocsettoclineforclasstoc,\MessageBreak + and \string\etocsettoclineforclasslistof{toc} (or {lof}, {lot}). + I will do this now.\MessageBreak + Reported}% + \etocsettoclineforclasstoc{#1}{#2}% + \etocsettoclineforclasslistof{toc}{#1}{#2}% +} +\def\etocsettoclineforclasstoc #1#2{% + \def\etocclassmaintocaddtotoc{\etocglobalheadtotoc{#1}{#2}}% +} +\def\etocsettoclineforclasslistof #1#2#3{% + \@namedef{etocclasslocal#1addtotoc}{\etoclocalheadtotoc{#2}{#3}}% +} +\let\etocclasslocaltocaddtotoc\@empty +\let\etocclasslocallofaddtotoc\@empty +\let\etocclasslocallotaddtotoc\@empty +\ifdefined\c@chapter + \def\etocclasslocaltocmaketitle{\section*{\localcontentsname}} + \def\etocclasslocallofmaketitle{\section*{\locallistfigurename}} + \def\etocclasslocallotmaketitle{\section*{\locallisttablename}} + \etocsettoclineforclasstoc {chapter}{\contentsname} + \etocsettoclineforclasslistof{toc}{section}{\localcontentsname} + \etocsettoclineforclasslistof{lof}{section}{\locallistfigurename} + \etocsettoclineforclasslistof{lot}{section}{\locallisttablename} +\else + \def\etocclasslocaltocmaketitle{\subsection*{\localcontentsname}}% + \def\etocclasslocallofmaketitle{\subsection*{\locallistfigurename}}% + \def\etocclasslocallotmaketitle{\subsection*{\locallisttablename}}% + \etocsettoclineforclasstoc {section}{\contentsname} + \etocsettoclineforclasslistof{toc}{subsection}{\localcontentsname} + \etocsettoclineforclasslistof{lof}{subsection}{\locallistfigurename} + \etocsettoclineforclasslistof{lot}{subsection}{\locallisttablename} +\fi +\def\etocclasslocalperhapsaddtotoc #1{% + \etocifisstarred + {} + {\csname ifEtoc@local#1totoc\endcsname + \csname etocclasslocal#1addtotoc\endcsname + \fi + }% +} +\def\etocarticlestyle{% + \etocsettocstyle + {\ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \section *{\contentsname + \@mkboth {\MakeUppercase \contentsname} + {\MakeUppercase \contentsname}}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + } + {}% +} +\def\etocarticlestylenomarks{% + \etocsettocstyle + {\ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \section *{\contentsname}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + } + {}% +} +\def\etocbookstyle{% + \etocsettocstyle + {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \chapter *{\contentsname + \@mkboth {\MakeUppercase \contentsname} + {\MakeUppercase \contentsname}}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + }% + {\if@restonecol \twocolumn \fi}% +} +\def\etocbookstylenomarks{% + \etocsettocstyle + {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \chapter *{\contentsname}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + }% + {\if@restonecol \twocolumn \fi}% +} +\let\etocreportstyle\etocbookstyle +\let\etocreportstylenomarks\etocbookstylenomarks +\def\etocmemoirstyle{% + \etocsettocstyle + {\ensureonecol \par \begingroup \phantomsection + \ifx\Etoc@aftertitlehook\@empty + \else + \ifmem@em@starred@listof + \else + \ifEtoc@localtoc + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \ifEtoc@maintoctotoc + \etocclassmaintocaddtotoc + \fi + \fi + \fi + \fi + \ifEtoc@localtoc + \@namedef{@\Etoc@currext maketitle}{% + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + }% + \fi + \@nameuse {@\Etoc@currext maketitle} %<< space token here from memoir code + \ifx\Etoc@aftertitlehook\@empty + \else + \Etoc@aftertitlehook \let \Etoc@aftertitlehook \relax + \fi + \parskip \cftparskip \@nameuse {cft\Etoc@currext beforelisthook}% + }% + {\@nameuse {cft\Etoc@currext afterlisthook}% + \endgroup\restorefromonecol + }% +} +\let\Etoc@beforetitlehook\@empty +\if1\@ifclassloaded{scrartcl}0{\@ifclassloaded{scrbook}0{\@ifclassloaded{scrreprt}01}}% +\expandafter\@gobble +\else + \ifdefined\setuptoc + \def\Etoc@beforetitlehook{% + \ifEtoc@localtoc + \etocclasslocalperhapsaddtotoc\Etoc@currext + \setuptoc{\Etoc@currext}{leveldown}% + \else + \etocifisstarred{}{\etocifmaintoctotoc{\setuptoc{toc}{totoc}}}% + \fi + }% + \fi +\expandafter\@firstofone +\fi +{\def\etocclasslocalperhapsaddtotoc #1{% + \etocifisstarred + {}% + {\csname ifEtoc@local#1totoc\endcsname + \setuptoc{\Etoc@currext}{totoc}% + \fi + }% + }% +} +\ifdefined\Iftocfeature + \def\etoc@Iftocfeature{\Iftocfeature}% +\else + \def\etoc@Iftocfeature{\iftocfeature}% +\fi +\def\etocscrartclstyle{% + \etocsettocstyle + {\ifx\Etoc@currext\Etoc@tocext + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi + {\let\if@dynlist\if@tocleft}% + \edef\@currext{\Etoc@currext}% + \@ifundefined{listof\@currext name}% + {\def\list@fname{\listofname~\@currext}}% + {\expandafter\let\expandafter\list@fname + \csname listof\@currext name\endcsname}% + \etoc@Iftocfeature {\@currext}{onecolumn} + {\etoc@Iftocfeature {\@currext}{leveldown} + {} + {\if@twocolumn \aftergroup \twocolumn \onecolumn \fi }} + {}% + \etoc@Iftocfeature {\@currext}{numberline}% + {\def \nonumberline {\numberline {}}}{}% + \expandafter\tocbasic@listhead\expandafter {\list@fname}% + \begingroup \expandafter \expandafter \expandafter + \endgroup \expandafter + \ifx + \csname microtypesetup\endcsname \relax + \else + \etoc@Iftocfeature {\@currext}{noprotrusion}{} + {\microtypesetup {protrusion=false}% + \PackageInfo {tocbasic}% + {character protrusion at \@currext\space deactivated}}% + \fi + \etoc@Iftocfeature{\@currext}{noparskipfake}{}{% + \ifvmode \@tempskipa\lastskip \vskip-\lastskip + \addtolength{\@tempskipa}{\parskip}\vskip\@tempskipa\fi + }% + \setlength {\parskip }{\z@ }% + \setlength {\parindent }{\z@ }% + \setlength {\parfillskip }{\z@ \@plus 1fil}% + \csname tocbasic@@before@hook\endcsname + \csname tb@\@currext @before@hook\endcsname + }% end of before_toc + {% start of after_toc + \providecommand\tocbasic@end@toc@file{}\tocbasic@end@toc@file + \edef\@currext{\Etoc@currext}% + \csname tb@\@currext @after@hook\endcsname + \csname tocbasic@@after@hook\endcsname + }% end of after_toc +} +\let\etocscrbookstyle\etocscrartclstyle +\let\etocscrreprtstyle\etocscrartclstyle +\def\etocclasstocstyle{\etocarticlestyle} +\newcommand*\etocmarkboth[1]{% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} +\newcommand*\etocmarkbothnouc[1]{\@mkboth{#1}{#1}} +\newcommand\etoctocstyle[3][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3}}} +\newcommand\etoctocstylewithmarks[4][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3\etocmarkboth{#4}}}} +\newcommand\etoctocstylewithmarksnouc[4][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3\etocmarkbothnouc{#4}}}} +\def\Etoc@redefetocstylesforchapters{% + \renewcommand\etoctocstylewithmarks[4][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkboth{##4}}}% + } + \renewcommand\etoctocstylewithmarksnouc[4][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkbothnouc{##4}}}% + } + \renewcommand\etoctocstyle[3][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3}} + } +} +\@ifclassloaded{scrartcl} + {\renewcommand*\etocclasstocstyle{\etocscrartclstyle}}{} +\@ifclassloaded{book} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocbookstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{report} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocreportstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{scrbook} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocscrbookstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{scrreprt} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocscrreprtstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{memoir} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocmemoirstyle} + \Etoc@redefetocstylesforchapters}{} +\def\etoctocloftstyle {% + \etocsettocstyle{% + \@cfttocstart + \par + \begingroup + \parindent\z@ \parskip\cftparskip + \@nameuse{@cftmake\Etoc@currext title}% + \ifEtoc@localtoc + \etoctocloftlocalperhapsaddtotoc\Etoc@currext + \else + \etocifisstarred {}{\ifEtoc@maintoctotoc\@cftdobibtoc\fi}% + \fi + }% + {% + \endgroup + \@cfttocfinish + }% +} +\def\etoctocloftlocalperhapsaddtotoc#1{% + \etocifisstarred + {}% + {\csname ifEtoc@local#1totoc\endcsname + \ifdefined\c@chapter\def\@tocextra{@section}\else\def\@tocextra{@subsection}\fi + \csname @cftdobib#1\endcsname + \fi + }% +} +\def\etoctocbibindstyle {% + \etocsettocstyle {% + \toc@start + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \etoc@tocbibind@dotoctitle + \fi + }% + {\toc@finish}% +} +\def\etoc@tocbibind@dotoctitle {% + \if@bibchapter + \etocifisstarred + {\chapter*{\contentsname}\prw@mkboth{\contentsname} % id. + }% + {\ifEtoc@maintoctotoc + \toc@chapter{\contentsname} %<-space from original + \else + \chapter*{\contentsname}\prw@mkboth{\contentsname} % id. + \fi + }% + \else + \etocifisstarred + {\@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} %<-space + } + {\ifEtoc@maintoctotoc + \toc@section{\@tocextra}{\contentsname} %<-space from original + \else + \@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} % id. + \fi + }% + \fi +}% +\@ifclassloaded{memoir} +{} +{% memoir not loaded + \@ifpackageloaded{tocloft} + {\if@cftnctoc\else + \ifEtoc@keeporiginaltoc + \else + \AtBeginDocument{\let\tableofcontents\etoctableofcontents}% + \fi + \fi } + {\AtBeginDocument + {\@ifpackageloaded{tocloft} + {\if@cftnctoc\else + \PackageWarningNoLine {etoc} + {Package `tocloft' was loaded after `etoc'.\MessageBreak + To prevent it from overwriting \protect\tableofcontents, it will\MessageBreak + be tricked into believing to have been loaded with its\MessageBreak + option `titles'. \space But this will cause the `tocloft'\MessageBreak + customization of the titles of the main list of figures\MessageBreak + and list of tables to not apply either.\MessageBreak + You should load `tocloft' before `etoc'.}% + \AtEndDocument{\PackageWarning{etoc} + {Please load `tocloft' before `etoc'!\@gobbletwo}}% + \fi + \@cftnctoctrue }% + {}% + }% + }% +} +\@ifclassloaded{memoir} +{} +{% memoir not loaded + \AtBeginDocument{% + \@ifpackageloaded{tocloft} + {% + \def\etocclasstocstyle{% + \etoctocloftstyle + \Etoc@classstyletrue + }% + \ifEtoc@etocstyle + \ifEtoc@classstyle + \etocclasstocstyle + \Etoc@etocstyletrue + \fi + \else + \ifEtoc@classstyle + \etocclasstocstyle + \fi + \fi + }% + {% no tocloft + \@ifpackageloaded {tocbibind} + {\if@dotoctoc + \def\etocclasstocstyle{% + \etoctocbibindstyle + \Etoc@classstyletrue + }% + \ifEtoc@etocstyle + \ifEtoc@classstyle + \etocclasstocstyle + \Etoc@etocstyletrue + \fi + \else + \ifEtoc@classstyle + \etocclasstocstyle + \fi + \fi + \ifEtoc@keeporiginaltoc + \else + \let\tableofcontents\etoctableofcontents + \fi + }% + {}% + }% + \@ifpackageloaded{tocbibind} + {% tocbibind, perhaps with tocloft + \if@dotoctoc + \ifEtoc@keeporiginaltoc + \else + \let\tableofcontents\etoctableofcontents + \fi + \etocsetup{maintoctotoc,localtoctotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) the options `maintoctotoc' and\MessageBreak + `localtoctotoc' to true as tocbibind was detected and\MessageBreak + found to be configured for `TOC to toc'.\MessageBreak + Reported at begin document}% + \fi + \if@dotoclof + \ifEtoc@lof + \etocsetup{localloftotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) `localloftotoc=true' as the\MessageBreak + package tocbibind was detected and is configured for\MessageBreak + `LOF to toc'. Reported at begin document}% + \fi + \fi + \if@dotoclot + \ifEtoc@lot + \etocsetup{locallottotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) `locallottotoc=true' as the\MessageBreak + package tocbibind was detected and is configured for\MessageBreak + `LOT to toc'. Reported at begin document}% + \fi + \fi + }% end of tocbibind branch + {}% + }% end of at begin document +}% end of not with memoir branch +\def\Etoc@addtocontents #1#2{% + \addtocontents {toc}{% + \protect\contentsline{#1}{#2}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% +} +\def\Etoc@addcontentsline@ #1#2#3{% + \@namedef{toclevel@#1}{#3}\addcontentsline {toc}{#1}{#2}% +} +\DeclareRobustCommand*{\etoctoccontentsline} + {\@ifstar{\Etoc@addcontentsline@}{\Etoc@addtocontents}} +\def\Etoc@addtocontents@immediately#1#2{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \Etoc@addtocontents{#1}{#2}% + \endgroup +} +\def\Etoc@addcontentsline@@immediately#1#2#3{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \Etoc@addcontentsline@{#1}{#2}{#3}% + \endgoroup +} +\DeclareRobustCommand*{\etocimmediatetoccontentsline} + {\@ifstar{\Etoc@addcontentsline@@immediately}{\Etoc@addtocontents@immediately}} +\def\Etoc@storetocdepth {\xdef\Etoc@savedtocdepth{\number\c@tocdepth}} +\def\Etoc@restoretocdepth {\global\c@tocdepth\Etoc@savedtocdepth\relax} +\def\etocobeytoctocdepth {\def\etoc@settocdepth + {\afterassignment\Etoc@@nottoodeep \global\c@tocdepth}} +\def\Etoc@@nottoodeep {\ifnum\Etoc@savedtocdepth<\c@tocdepth + \global\c@tocdepth\Etoc@savedtocdepth\relax\fi } +\def\etocignoretoctocdepth {\let\etoc@settocdepth\@gobble } +\def\etocsettocdepth {\futurelet\Etoc@nexttoken\Etoc@set@tocdepth } +\def\Etoc@set@tocdepth {\ifx\Etoc@nexttoken\bgroup + \expandafter\Etoc@set@tocdepth@ + \else\expandafter\Etoc@set@toctocdepth + \fi } +\def\Etoc@set@tocdepth@ #1{\@ifundefined {Etoc@#1@@} + {\PackageWarning{etoc} + {Unknown sectioning unit #1, \protect\etocsettocdepth\space ignored}} + {\global\c@tocdepth\csname Etoc@#1@@\endcsname}% +} +\def\Etoc@set@toctocdepth #1#{\Etoc@set@toctocdepth@ } +\def\Etoc@set@toctocdepth@ #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocsettocdepth.toc ignored}}% + {\addtocontents {toc} + {\protect\etoc@settocdepth\expandafter\protect\csname Etoc@#1@@\endcsname}}% +} +\def\etocimmediatesettocdepth #1#{\Etoc@set@toctocdepth@immediately} +\def\Etoc@set@toctocdepth@immediately #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocimmediatesettocdepth.toc ignored}}% + {\begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc} + {\protect\etoc@settocdepth\expandafter\protect + \csname Etoc@#1@@\endcsname}% + \endgroup + }% +} +\def\etocdepthtag #1#{\Etoc@depthtag } +\def\Etoc@depthtag #1{\addtocontents {toc}{\protect\etoc@depthtag {#1}}} +\def\etocimmediatedepthtag #1#{\Etoc@depthtag@immediately } +\def\Etoc@depthtag@immediately #1{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc}{\protect\etoc@depthtag {#1}}% + \endgroup +} +\def\etocignoredepthtags {\let\etoc@depthtag \@gobble } +\def\etocobeydepthtags {\let\etoc@depthtag \Etoc@depthtag@ } +\def\Etoc@depthtag@ #1{\@ifundefined{Etoc@depthof@#1}% + {}% ignore in silence if tag has no associated depth + {\afterassignment\Etoc@@nottoodeep + \global\c@tocdepth\csname Etoc@depthof@#1\endcsname}% +} +\def\etocsettagdepth #1#2{\@ifundefined{Etoc@#2@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #2, \protect\etocsettagdepth\space ignored}}% + {\@namedef{Etoc@depthof@#1}{\@nameuse{Etoc@#2@@}}}% +} +\def\Etoc@tocvsec@err #1{\PackageError {etoc} + {The command \protect#1\space is incompatible with `etoc'} + {Use \protect\etocsettocdepth.toc as replacement}% +}% +\AtBeginDocument {% + \@ifclassloaded{memoir} + {\PackageInfo {etoc} + {Regarding `memoir' class command \protect\settocdepth, consider\MessageBreak + \protect\etocsettocdepth.toc as a drop-in replacement with more\MessageBreak + capabilities (see `etoc' manual). \space + Also, \protect\etocsettocdepth\MessageBreak + and \protect\etocsetnexttocdepth\space should be used in place of\MessageBreak + `memoir' command \protect\maxtocdepth\@gobble}% + }% + {\@ifpackageloaded {tocvsec2}{% + \def\maxtocdepth #1{\Etoc@tocvsec@err \maxtocdepth }% + \def\settocdepth #1{\Etoc@tocvsec@err \settocdepth }% + \def\resettocdepth {\@ifstar {\Etoc@tocvsec@err \resettocdepth }% + {\Etoc@tocvsec@err \resettocdepth }% + }% + \def\save@tocdepth #1#2#3{}% + \let\reset@tocdepth\relax + \let\remax@tocdepth\relax + \let\tableofcontents\etoctableofcontents + \PackageWarningNoLine {etoc} + {Package `tocvsec2' detected and its modification of\MessageBreak + \protect\tableofcontents\space reverted. \space Use + \protect\etocsettocdepth.toc\MessageBreak as a replacement + for `tocvsec2' toc-related commands}% + }% tocvsec2 loaded + {}% tocvsec2 not loaded + }% +}% +\def\invisibletableofcontents {\etocsetnexttocdepth {-3}\tableofcontents }% +\def\invisiblelocaltableofcontents + {\etocsetnexttocdepth {-3}\localtableofcontents }% +\def\etocsetnexttocdepth #1{% + \@ifundefined{Etoc@#1@@} + {\PackageWarning{etoc} + {Unknown sectioning unit #1, \protect\etocsetnextocdepth\space ignored}} + {\Etoc@setnexttocdepth{\csname Etoc@#1@@\endcsname}}% +}% +\def\Etoc@setnexttocdepth#1{% + \def\Etoc@tocdepthset{% + \Etoc@tocdepthreset + \edef\Etoc@tocdepthreset {% + \global\c@tocdepth\the\c@tocdepth\space + \global\let\noexpand\Etoc@tocdepthreset\noexpand\@empty + }% + \global\c@tocdepth#1% + \global\let\Etoc@tocdepthset\@empty + }% +}% +\let\Etoc@tocdepthreset\@empty +\let\Etoc@tocdepthset \@empty +\def\etocsetlocaltop #1#{\Etoc@set@localtop}% +\def\Etoc@set@localtop #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocsetlocaltop.toc ignored}}% + {\addtocontents {toc} + {\protect\etoc@setlocaltop\expandafter\protect\csname Etoc@#1@@\endcsname}}% +}% +\def\etocimmediatesetlocaltop #1#{\Etoc@set@localtop@immediately}% +\def\Etoc@set@localtop@immediately #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocimmediatesetlocaltop.toc ignored}}% + {\begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc} + {\protect\etoc@setlocaltop\expandafter\protect + \csname Etoc@#1@@\endcsname}% + \endgroup + }% +}% +\def\etoc@setlocaltop #1{% + \ifnum#1=\Etoc@maxlevel + \Etoc@skipthisonetrue + \else + \Etoc@skipthisonefalse + \global\let\Etoc@level #1% + \global\let\Etoc@virtualtop #1% + \ifEtoc@localtoc + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \else + \ifEtoc@notactive + \Etoc@skipthisonetrue + \else + \unless\ifnum\Etoc@level>\etoclocaltop + \Etoc@skipthisonetrue + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \fi + \let\Etoc@next\@empty + \ifEtoc@skipthisone + \else + \ifnum\Etoc@level>\c@tocdepth + \else + \ifEtoc@standardlines + \else + \let\Etoc@next\Etoc@setlocaltop@doendsandbegin + \fi + \fi + \fi + \Etoc@next +}% +\def\Etoc@setlocaltop@doendsandbegin{% + \Etoc@doendsandbegin + \global\Etoc@skipprefixfalse +} +\addtocontents {toc}{\protect\@ifundefined{etoctocstyle}% + {\let\protect\etoc@startlocaltoc\protect\@gobble + \let\protect\etoc@settocdepth\protect\@gobble + \let\protect\etoc@depthtag\protect\@gobble + \let\protect\etoc@setlocaltop\protect\@gobble}{}}% +\def\etocstandardlines {\Etoc@standardlinestrue} +\def\etoctoclines {\Etoc@standardlinesfalse} +\etocdefaultlines +\etocstandardlines +\def\etocstandarddisplaystyle{% + \PackageWarningNoLine{etoc}{% + \string\etocstandarddisplaystyle \on@line\MessageBreak + is deprecated. \space Please use \string\etocclasstocstyle}% +} +\expandafter\def\expandafter\etocclasstocstyle\expandafter{% + \etocclasstocstyle + \Etoc@classstyletrue +} +\def\etocetoclocaltocstyle{\Etoc@etocstyletrue} +\def\etocusertocstyle{\Etoc@etocstylefalse} +\etocclasstocstyle +\etocetoclocaltocstyle +\etocobeytoctocdepth +\etocobeydepthtags +\let\etocbeforetitlehook \@empty +\let\etocaftertitlehook \@empty +\let\etocaftercontentshook \@empty +\let\etocaftertochook \@empty +\def\etockeeporiginaltableofcontents + {\Etoc@keeporiginaltoctrue\let\tableofcontents\etocoriginaltableofcontents}% +\endinput +%% +%% End of file `etoc.sty'. diff --git a/docs/doxygen/latex/files.tex b/docs/doxygen/latex/files.tex new file mode 100644 index 0000000..f4a9c70 --- /dev/null +++ b/docs/doxygen/latex/files.tex @@ -0,0 +1,27 @@ +\doxysection{File List} +Here is a list of all files with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{client/\mbox{\hyperlink{add__product_8cpp}{add\+\_\+product.\+cpp}} }{\pageref{add__product_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{add__product_8h}{add\+\_\+product.\+h}} }{\pageref{add__product_8h}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{authregwindow_8cpp}{authregwindow.\+cpp}} }{\pageref{authregwindow_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{authregwindow_8h}{authregwindow.\+h}} }{\pageref{authregwindow_8h}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{functions__for__client_8cpp}{functions\+\_\+for\+\_\+client.\+cpp}} }{\pageref{functions__for__client_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{functions__for__client_8h}{functions\+\_\+for\+\_\+client.\+h}} }{\pageref{functions__for__client_8h}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{client_2main_8cpp}{main.\+cpp}} }{\pageref{client_2main_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{mainwindow_8cpp}{mainwindow.\+cpp}} }{\pageref{mainwindow_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{mainwindow_8h}{mainwindow.\+h}} }{\pageref{mainwindow_8h}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{managerforms_8cpp}{managerforms.\+cpp}} }{\pageref{managerforms_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{managerforms_8h}{managerforms.\+h}} }{\pageref{managerforms_8h}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{menucard_8cpp}{menucard.\+cpp}} }{\pageref{menucard_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{menu_card_8h}{menu\+Card.\+h}} }{\pageref{menu_card_8h}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{product_card_8cpp}{product\+Card.\+cpp}} }{\pageref{product_card_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{product_card_8h}{product\+Card.\+h}} }{\pageref{product_card_8h}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{_singleton_8cpp}{Singleton.\+cpp}} }{\pageref{_singleton_8cpp}}{} +\item\contentsline{section}{client/\mbox{\hyperlink{_singleton_8h}{Singleton.\+h}} }{\pageref{_singleton_8h}}{} +\item\contentsline{section}{server/\mbox{\hyperlink{databasesingleton_8cpp}{databasesingleton.\+cpp}} }{\pageref{databasesingleton_8cpp}}{} +\item\contentsline{section}{server/\mbox{\hyperlink{databasesingleton_8h}{databasesingleton.\+h}} }{\pageref{databasesingleton_8h}}{} +\item\contentsline{section}{server/\mbox{\hyperlink{func2serv_8cpp}{func2serv.\+cpp}} }{\pageref{func2serv_8cpp}}{} +\item\contentsline{section}{server/\mbox{\hyperlink{func2serv_8h}{func2serv.\+h}} }{\pageref{func2serv_8h}}{} +\item\contentsline{section}{server/\mbox{\hyperlink{server_2main_8cpp}{main.\+cpp}} }{\pageref{server_2main_8cpp}}{} +\item\contentsline{section}{server/\mbox{\hyperlink{mytcpserver_8cpp}{mytcpserver.\+cpp}} }{\pageref{mytcpserver_8cpp}}{} +\item\contentsline{section}{server/\mbox{\hyperlink{mytcpserver_8h}{mytcpserver.\+h}} }{\pageref{mytcpserver_8h}}{} +\end{DoxyCompactList} diff --git a/docs/doxygen/latex/func2serv_8cpp.tex b/docs/doxygen/latex/func2serv_8cpp.tex new file mode 100644 index 0000000..49551a6 --- /dev/null +++ b/docs/doxygen/latex/func2serv_8cpp.tex @@ -0,0 +1,718 @@ +\doxysection{server/func2serv.cpp File Reference} +\hypertarget{func2serv_8cpp}{}\label{func2serv_8cpp}\index{server/func2serv.cpp@{server/func2serv.cpp}} +{\ttfamily \#include "{}func2serv.\+h"{}}\newline +{\ttfamily \#include $<$QString$>$}\newline +{\ttfamily \#include $<$QString\+List$>$}\newline +{\ttfamily \#include $<$QMap$>$}\newline +{\ttfamily \#include $<$QDebug$>$}\newline +{\ttfamily \#include $<$databasesingleton.\+h$>$}\newline +{\ttfamily \#include $<$QJson\+Array$>$}\newline +{\ttfamily \#include $<$QJson\+Object$>$}\newline +{\ttfamily \#include $<$QJson\+Document$>$}\newline +Include dependency graph for func2serv.\+cpp\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{func2serv_8cpp__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Functions} +\begin{DoxyCompactItemize} +\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a99bd96103155e73697cc47518a5559a4}{parsing}} (QString input, int socdes) +\begin{DoxyCompactList}\small\item\em Парсинг входных данных. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a173db167f59671d56b49f5d7d11ef531}{auth}} (QString\+List log) +\begin{DoxyCompactList}\small\item\em Авторизация пользователя. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_ac87f1fa2fd8c6ee1a48c3a56a99b3275}{reg}} (QString\+List params) +\begin{DoxyCompactList}\small\item\em Регистрация пользователя. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a27ffe3af29c8442de4aa94a5e48d2345}{add\+\_\+product}} (QString\+List params) +\begin{DoxyCompactList}\small\item\em Добавление продукта. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a0a88fbccc63c8cc890ded3a20fb71e72}{get\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение статистики. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a6d4386c36a7ed61c61cf3d1bad354f27}{check\+\_\+task}} () +\begin{DoxyCompactList}\small\item\em Проверка задания. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_aa70831eddff4b8ed7a04647778a35747}{menu\+\_\+export}} () +\begin{DoxyCompactList}\small\item\em Экспорт меню. \end{DoxyCompactList}\item +void \mbox{\hyperlink{func2serv_8cpp_af1b6a57c9eed96cee280cce58342bed5}{fetch\+\_\+products\+\_\+from\+\_\+db}} (const QString \&user\+Id, QString\+List \&products) +\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a73b3ae758a8cf3621318d27cd1a17722}{get\+\_\+products}} (QString user\+Id) +\begin{DoxyCompactList}\small\item\em Получение списка продуктов. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_ab8bda875989629df9b683e881296b32d}{get\+\_\+all\+\_\+users}} () +\begin{DoxyCompactList}\small\item\em Получение всех пользователей. \end{DoxyCompactList}\item +int \mbox{\hyperlink{func2serv_8cpp_a8ebcc70a2024aab70883f094fc35849e}{get\+\_\+user\+\_\+count}} () +\begin{DoxyCompactList}\small\item\em Получение количества пользователей. \end{DoxyCompactList}\item +int \mbox{\hyperlink{func2serv_8cpp_a4ddd067c5a29f76aead93c977a05113a}{get\+\_\+product\+\_\+count}} () +\begin{DoxyCompactList}\small\item\em Получение количества продуктов. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a2d521723770cde0e28bb41544394917b}{get\+\_\+stable\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение стабильной статистики. \end{DoxyCompactList}\item +int \mbox{\hyperlink{func2serv_8cpp_a4d269e13002c5cded37bee9ade854d93}{get\+\_\+weekly\+\_\+logins}} () +\begin{DoxyCompactList}\small\item\em Получение количества входов за неделю. \end{DoxyCompactList}\item +int \mbox{\hyperlink{func2serv_8cpp_a2d6f70d14e474616a4a16a72485c2f0e}{get\+\_\+monthly\+\_\+logins}} () +\begin{DoxyCompactList}\small\item\em Получение количества входов за месяц. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a8a2ae0ff8263d70f4e0f30d6b0d89af7}{get\+\_\+dynamic\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение динамической статистики. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8cpp_a6496e445a644cca89c6252f6e7adecb0}{add\+\_\+favorite\+\_\+ration}} (const QString\+List \&container) +\begin{DoxyCompactList}\small\item\em Добавление рациона в избранное. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{func2serv_8cpp_a064e99d59eaa1d8cccef20b3192df015}{add\+\_\+ration\+\_\+to\+\_\+favorites}} (const QString \&user\+Id, const QString \&ration\+Id) +\begin{DoxyCompactList}\small\item\em Добавление рациона в избранное для пользователя. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Variables} +\begin{DoxyCompactItemize} +\item +QMap$<$ QString, QList$<$ QString $>$ $>$ \mbox{\hyperlink{func2serv_8cpp_aa13aef29ff8f58936aa8f2bd99f70253}{mock\+Database}} +\end{DoxyCompactItemize} + + +\doxysubsection{Function Documentation} +\Hypertarget{func2serv_8cpp_a6496e445a644cca89c6252f6e7adecb0}\index{func2serv.cpp@{func2serv.cpp}!add\_favorite\_ration@{add\_favorite\_ration}} +\index{add\_favorite\_ration@{add\_favorite\_ration}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{add\_favorite\_ration()}{add\_favorite\_ration()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a6496e445a644cca89c6252f6e7adecb0} +QByte\+Array add\+\_\+favorite\+\_\+ration (\begin{DoxyParamCaption}\item[{const QString\+List \&}]{container}{}\end{DoxyParamCaption})} + + + +Добавление рациона в избранное. + + +\begin{DoxyParams}{Parameters} +{\em container} & Список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат добавления в избранное в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00294\ \ \ \ \ QString\ userId\ =\ container[1];\ \textcolor{comment}{//\ ID\ пользователя}} +\DoxyCodeLine{00295\ \ \ \ \ QString\ rationId\ =\ container[2];\ \textcolor{comment}{//\ ID\ рациона}} +\DoxyCodeLine{00296\ } +\DoxyCodeLine{00297\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ \mbox{\hyperlink{func2serv_8cpp_a064e99d59eaa1d8cccef20b3192df015}{add\_ration\_to\_favorites}}(userId,\ rationId);\ \textcolor{comment}{//\ Вызов\ функции-\/заглушки}} +\DoxyCodeLine{00298\ } +\DoxyCodeLine{00299\ \ \ \ \ \textcolor{keywordflow}{if}\ (success)\ \{} +\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Ration\ successfully\ added\ to\ favorites\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00301\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Error:\ failed\ to\ add\ ration\ to\ favorites\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00303\ \ \ \ \ \}} +\DoxyCodeLine{00304\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a27ffe3af29c8442de4aa94a5e48d2345}\index{func2serv.cpp@{func2serv.cpp}!add\_product@{add\_product}} +\index{add\_product@{add\_product}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{add\_product()}{add\_product()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a27ffe3af29c8442de4aa94a5e48d2345} +QByte\+Array add\+\_\+product (\begin{DoxyParamCaption}\item[{QString\+List}]{params}{}\end{DoxyParamCaption})} + + + +Добавление продукта. + + +\begin{DoxyParams}{Parameters} +{\em Входной} & список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат добавления продукта в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keywordflow}{if}\ (params.size()\ !=\ 9)\ \{} +\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}add\_product//failed//Неверные\ аргументы\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00168\ \ \ \ \ \}} +\DoxyCodeLine{00169\ } +\DoxyCodeLine{00170\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}\ *db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00171\ \ \ \ \ \textcolor{keywordtype}{int}\ userId\ =\ params[1].toInt();} +\DoxyCodeLine{00172\ \ \ \ \ QString\ name\ =\ params[2];} +\DoxyCodeLine{00173\ \textcolor{comment}{/*}} +\DoxyCodeLine{00174\ \textcolor{comment}{\ \ \ \ //\ Проверяем,\ существует\ ли\ уже\ такой\ продукт }} +\DoxyCodeLine{00175\ \textcolor{comment}{\ \ \ \ QSqlQuery\ checkQuery\ =\ db-\/>executeQuery( }} +\DoxyCodeLine{00176\ \textcolor{comment}{\ \ \ \ \ \ \ \ "{}SELECT\ id\ FROM\ products\ WHERE\ id\_user\ =\ :id\_user\ AND\ name\ =\ :name"{}, }} +\DoxyCodeLine{00177\ \textcolor{comment}{\ \ \ \ \ \ \ \ \{\{"{}:id\_user"{},\ userId\},\ \{"{}:name"{},\ name\}\} }} +\DoxyCodeLine{00178\ \textcolor{comment}{\ \ \ \ \ \ \ \ ); }} +\DoxyCodeLine{00179\ \textcolor{comment}{}} +\DoxyCodeLine{00180\ \textcolor{comment}{\ \ \ \ if\ (checkQuery.next())\ \{ }} +\DoxyCodeLine{00181\ \textcolor{comment}{\ \ \ \ \ \ \ \ return\ "{}add\_product//failed//Продукт\ уже\ существует\(\backslash\)r\(\backslash\)n"{}; }} +\DoxyCodeLine{00182\ \textcolor{comment}{\ \ \ \ \} }} +\DoxyCodeLine{00183\ \textcolor{comment}{*/}} +\DoxyCodeLine{00184\ \ \ \ \ \textcolor{comment}{//\ Добавляем\ продукт}} +\DoxyCodeLine{00185\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a3fe2a5e1f41a408023066e8caf63b523}{addProduct}}(} +\DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ userId,} +\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ name,} +\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ params[3].toInt(),\ \textcolor{comment}{//\ proteins}} +\DoxyCodeLine{00189\ \ \ \ \ \ \ \ \ params[4].toInt(),\ \textcolor{comment}{//\ fatness}} +\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ params[5].toInt(),\ \textcolor{comment}{//\ carbs}} +\DoxyCodeLine{00191\ \ \ \ \ \ \ \ \ params[6].toInt(),\ \textcolor{comment}{//\ weight}} +\DoxyCodeLine{00192\ \ \ \ \ \ \ \ \ params[7].toInt(),\ \textcolor{comment}{//\ cost}} +\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ params[8].toInt()\ \ \textcolor{comment}{//\ type}} +\DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00195\ } +\DoxyCodeLine{00196\ \ \ \ \ \textcolor{keywordflow}{return}\ success\ ?\ \textcolor{stringliteral}{"{}add\_product//success\(\backslash\)r\(\backslash\)n"{}}\ :\ \textcolor{stringliteral}{"{}add\_product//failed//Ошибка\ БД\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00197\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a064e99d59eaa1d8cccef20b3192df015}\index{func2serv.cpp@{func2serv.cpp}!add\_ration\_to\_favorites@{add\_ration\_to\_favorites}} +\index{add\_ration\_to\_favorites@{add\_ration\_to\_favorites}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{add\_ration\_to\_favorites()}{add\_ration\_to\_favorites()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a064e99d59eaa1d8cccef20b3192df015} +bool add\+\_\+ration\+\_\+to\+\_\+favorites (\begin{DoxyParamCaption}\item[{const QString \&}]{user\+Id}{, }\item[{const QString \&}]{ration\+Id}{}\end{DoxyParamCaption})} + + + +Добавление рациона в избранное для пользователя. + +Добавление существующего рациона в избранное. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +{\em ration\+Id} & Идентификатор рациона. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат добавления в избранное. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00306\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Adding\ ration\ for\ user:"{}}\ <<\ userId\ <<\ \textcolor{stringliteral}{"{},\ ration\ ID:"{}}\ <<\ rationId;} +\DoxyCodeLine{00307\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};\ \textcolor{comment}{//\ Заглушка,\ потом\ заменить\ на\ SQL-\/запрос}} +\DoxyCodeLine{00308\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a173db167f59671d56b49f5d7d11ef531}\index{func2serv.cpp@{func2serv.cpp}!auth@{auth}} +\index{auth@{auth}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{auth()}{auth()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a173db167f59671d56b49f5d7d11ef531} +QByte\+Array auth (\begin{DoxyParamCaption}\item[{QString\+List}]{log}{}\end{DoxyParamCaption})} + + + +Авторизация пользователя. + + +\begin{DoxyParams}{Parameters} +{\em Входной} & список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат авторизации в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00078\ \ \ \ \ \textcolor{comment}{//\ Проверяем\ количество\ параметров}} +\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordflow}{if}\ (log.size()\ <\ 3)\ \{} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}auth\_failed//Недостаточно\ параметров\ для\ авторизации\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00081\ \ \ \ \ \}} +\DoxyCodeLine{00082\ } +\DoxyCodeLine{00083\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{bool}\ authSuccess\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a51bd7dc4507c5f3d04a2903899e13d42}{checkUserCredentials}}(log[1],\ log[2]);} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00086\ \ \ \ \ \textcolor{keywordflow}{if}\ (!authSuccess)\ \{} +\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}auth\_failed//Неверный\ логин\ или\ пароль\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00088\ \ \ \ \ \}} +\DoxyCodeLine{00089\ } +\DoxyCodeLine{00090\ } +\DoxyCodeLine{00091\ } +\DoxyCodeLine{00092\ \ \ \ \ QSqlQuery\ query\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}SELECT\ id,\ name,\ email,\ pass\ FROM\ users\ WHERE\ (email\ =\ :login\ OR\ name\ =\ :login)\ AND\ pass\ =\ :pass"{}},} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:login"{}},\ log[1]\},\ \textcolor{comment}{//\ логин}} +\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:pass"{}},\ log[2]\}\ \ \ \textcolor{comment}{//\ пароль}} +\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00099\ } +\DoxyCodeLine{00100\ } +\DoxyCodeLine{00101\ \ \ \ \ \textcolor{keywordflow}{if}\ (!query.next())\ \{} +\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}auth\_failed//Ошибка\ при\ получении\ данных\ пользователя\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00103\ \ \ \ \ \}} +\DoxyCodeLine{00104\ } +\DoxyCodeLine{00105\ \ \ \ \ QString\ userId\ =\ query.value(\textcolor{stringliteral}{"{}id"{}}).toString();} +\DoxyCodeLine{00106\ \ \ \ \ QString\ userLogin\ =\ query.value(\textcolor{stringliteral}{"{}name"{}}).toString();} +\DoxyCodeLine{00107\ \ \ \ \ QString\ userEmail\ =\ query.value(\textcolor{stringliteral}{"{}email"{}}).toString();} +\DoxyCodeLine{00108\ } +\DoxyCodeLine{00109\ \ \ \ \ QString\ response\ =\ QString(\textcolor{stringliteral}{"{}auth\_success//\%1//\%2//\%3\(\backslash\)r\(\backslash\)n"{}})} +\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .arg(userId)} +\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .arg(userLogin)} +\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .arg(userEmail);} +\DoxyCodeLine{00113\ } +\DoxyCodeLine{00114\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00115\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a6d4386c36a7ed61c61cf3d1bad354f27}\index{func2serv.cpp@{func2serv.cpp}!check\_task@{check\_task}} +\index{check\_task@{check\_task}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{check\_task()}{check\_task()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a6d4386c36a7ed61c61cf3d1bad354f27} +QByte\+Array check\+\_\+task (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Проверка задания. + +Проверка задачи (рациона). + +\begin{DoxyReturn}{Returns} +Результат проверки задания в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00204\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Task\ was\ succesful\ completed\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00205\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_af1b6a57c9eed96cee280cce58342bed5}\index{func2serv.cpp@{func2serv.cpp}!fetch\_products\_from\_db@{fetch\_products\_from\_db}} +\index{fetch\_products\_from\_db@{fetch\_products\_from\_db}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{fetch\_products\_from\_db()}{fetch\_products\_from\_db()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_af1b6a57c9eed96cee280cce58342bed5} +void fetch\+\_\+products\+\_\+from\+\_\+db (\begin{DoxyParamCaption}\item[{const QString \&}]{user\+Id}{, }\item[{QString\+List \&}]{products}{}\end{DoxyParamCaption})} + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00211\ } +\DoxyCodeLine{00212\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{func2serv_8cpp_aa13aef29ff8f58936aa8f2bd99f70253}{mockDatabase}}.contains(userId))\ \{} +\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ products\ =\ \mbox{\hyperlink{func2serv_8cpp_aa13aef29ff8f58936aa8f2bd99f70253}{mockDatabase}}[userId];} +\DoxyCodeLine{00214\ \ \ \ \ \}} +\DoxyCodeLine{00215\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_ab8bda875989629df9b683e881296b32d}\index{func2serv.cpp@{func2serv.cpp}!get\_all\_users@{get\_all\_users}} +\index{get\_all\_users@{get\_all\_users}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_all\_users()}{get\_all\_users()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_ab8bda875989629df9b683e881296b32d} +QByte\+Array get\+\_\+all\+\_\+users (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение всех пользователей. + +Получение списка всех пользователей. + +\begin{DoxyReturn}{Returns} +Список всех пользователей в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00236\ \ \ \ \ QStringList\ users;} +\DoxyCodeLine{00237\ } +\DoxyCodeLine{00238\ \ \ \ \ \textcolor{comment}{//\ fetch\_users\_from\_db(users);}} +\DoxyCodeLine{00239\ } +\DoxyCodeLine{00240\ \ \ \ \ QString\ response;} +\DoxyCodeLine{00241\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ QString\&\ user\ :\ users)\ \{} +\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ response\ +=\ user\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00243\ \ \ \ \ \}} +\DoxyCodeLine{00244\ } +\DoxyCodeLine{00245\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00246\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a8a2ae0ff8263d70f4e0f30d6b0d89af7}\index{func2serv.cpp@{func2serv.cpp}!get\_dynamic\_stat@{get\_dynamic\_stat}} +\index{get\_dynamic\_stat@{get\_dynamic\_stat}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_dynamic\_stat()}{get\_dynamic\_stat()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a8a2ae0ff8263d70f4e0f30d6b0d89af7} +QByte\+Array get\+\_\+dynamic\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение динамической статистики. + +\begin{DoxyReturn}{Returns} +Динамическая статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00280\ \ \ \ \ \textcolor{keywordtype}{int}\ weeklyLogins\ =\ 0;} +\DoxyCodeLine{00281\ \ \ \ \ \textcolor{keywordtype}{int}\ monthlyLogins\ =\ 0;} +\DoxyCodeLine{00282\ } +\DoxyCodeLine{00283\ \ \ \ \ \textcolor{comment}{//\ Получаем\ данные\ из\ БД\ (пока\ заглушки)}} +\DoxyCodeLine{00284\ \ \ \ \ weeklyLogins\ =\ \mbox{\hyperlink{func2serv_8cpp_a4d269e13002c5cded37bee9ade854d93}{get\_weekly\_logins}}();} +\DoxyCodeLine{00285\ \ \ \ \ monthlyLogins\ =\ \mbox{\hyperlink{func2serv_8cpp_a2d6f70d14e474616a4a16a72485c2f0e}{get\_monthly\_logins}}();} +\DoxyCodeLine{00286\ } +\DoxyCodeLine{00287\ \ \ \ \ \textcolor{comment}{//\ Формируем\ строку\ ответа}} +\DoxyCodeLine{00288\ \ \ \ \ QString\ response\ =\ \textcolor{stringliteral}{"{}Logins\ per\ week:\ "{}}\ +\ QString::number(weeklyLogins)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}}\ +} +\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Logins\ per\ month:\ "{}}\ +\ QString::number(monthlyLogins)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00290\ } +\DoxyCodeLine{00291\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00292\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a2d6f70d14e474616a4a16a72485c2f0e}\index{func2serv.cpp@{func2serv.cpp}!get\_monthly\_logins@{get\_monthly\_logins}} +\index{get\_monthly\_logins@{get\_monthly\_logins}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_monthly\_logins()}{get\_monthly\_logins()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a2d6f70d14e474616a4a16a72485c2f0e} +int get\+\_\+monthly\+\_\+logins (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества входов за месяц. + +\begin{DoxyReturn}{Returns} +Количество входов за месяц. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00275\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00276\ \ \ \ \ \textcolor{comment}{//\ Заглушка,\ пока\ без\ БД}} +\DoxyCodeLine{00277\ \ \ \ \ \textcolor{keywordflow}{return}\ 312;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00278\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a4ddd067c5a29f76aead93c977a05113a}\index{func2serv.cpp@{func2serv.cpp}!get\_product\_count@{get\_product\_count}} +\index{get\_product\_count@{get\_product\_count}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_product\_count()}{get\_product\_count()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a4ddd067c5a29f76aead93c977a05113a} +int get\+\_\+product\+\_\+count (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества продуктов. + +Получение общего количества продуктов. + +\begin{DoxyReturn}{Returns} +Количество продуктов. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00253\ \ \ \ \ \textcolor{comment}{//\ Здесь\ будет\ SQL-\/запрос,\ пока\ заглушка}} +\DoxyCodeLine{00254\ \ \ \ \ \textcolor{keywordflow}{return}\ 732;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00255\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a73b3ae758a8cf3621318d27cd1a17722}\index{func2serv.cpp@{func2serv.cpp}!get\_products@{get\_products}} +\index{get\_products@{get\_products}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_products()}{get\_products()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a73b3ae758a8cf3621318d27cd1a17722} +QByte\+Array get\+\_\+products (\begin{DoxyParamCaption}\item[{QString}]{User\+Id}{}\end{DoxyParamCaption})} + + + +Получение списка продуктов. + +Получение всех продуктов пользователя. + + +\begin{DoxyParams}{Parameters} +{\em User\+Id} & Идентификатор пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Список продуктов в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00217\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00218\ \ \ \ \ \textcolor{keywordtype}{int}\ userIdInt\ =\ userId.toInt();} +\DoxyCodeLine{00219\ \ \ \ \ QVector\ products\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a84fe7936dd15c077eff86d7884ce3049}{getProductsByUser}}(userIdInt);} +\DoxyCodeLine{00220\ } +\DoxyCodeLine{00221\ \ \ \ \ QJsonArray\ jsonArray;} +\DoxyCodeLine{00222\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ QVariantMap\&\ product\ :\ products)\ \{} +\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ QJsonObject\ obj\ =\ QJsonObject::fromVariantMap(product);} +\DoxyCodeLine{00224\ \ \ \ \ \ \ \ \ jsonArray.append(obj);} +\DoxyCodeLine{00225\ \ \ \ \ \}} +\DoxyCodeLine{00226\ } +\DoxyCodeLine{00227\ \ \ \ \ QJsonDocument\ doc(jsonArray);} +\DoxyCodeLine{00228\ \ \ \ \ QByteArray\ jsonBytes\ =\ doc.toJson(QJsonDocument::Compact);} +\DoxyCodeLine{00229\ } +\DoxyCodeLine{00230\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Отправляем\ продукты\ в\ виде\ JSON:"{}}\ <<\ jsonBytes;} +\DoxyCodeLine{00231\ } +\DoxyCodeLine{00232\ \ \ \ \ \textcolor{keywordflow}{return}\ jsonBytes;} +\DoxyCodeLine{00233\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a2d521723770cde0e28bb41544394917b}\index{func2serv.cpp@{func2serv.cpp}!get\_stable\_stat@{get\_stable\_stat}} +\index{get\_stable\_stat@{get\_stable\_stat}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_stable\_stat()}{get\_stable\_stat()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a2d521723770cde0e28bb41544394917b} +QByte\+Array get\+\_\+stable\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение стабильной статистики. + +\begin{DoxyReturn}{Returns} +Стабильная статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00257\ } +\DoxyCodeLine{00258\ \ \ \ \ \textcolor{keywordtype}{int}\ userCount\ =\ 0;} +\DoxyCodeLine{00259\ \ \ \ \ \textcolor{keywordtype}{int}\ productCount\ =\ 0;} +\DoxyCodeLine{00260\ } +\DoxyCodeLine{00261\ \ \ \ \ userCount\ =\ \mbox{\hyperlink{func2serv_8cpp_a8ebcc70a2024aab70883f094fc35849e}{get\_user\_count}}();} +\DoxyCodeLine{00262\ \ \ \ \ productCount\ =\ \mbox{\hyperlink{func2serv_8cpp_a4ddd067c5a29f76aead93c977a05113a}{get\_product\_count}}();} +\DoxyCodeLine{00263\ } +\DoxyCodeLine{00264\ \ \ \ \ \textcolor{comment}{//\ Формируем\ строку\ ответа}} +\DoxyCodeLine{00265\ \ \ \ \ QString\ response\ =\ \textcolor{stringliteral}{"{}Users:\ "{}}\ +\ QString::number(userCount)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}}\ +} +\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Products:\ "{}}\ +\ QString::number(productCount)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00267\ } +\DoxyCodeLine{00268\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00269\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a0a88fbccc63c8cc890ded3a20fb71e72}\index{func2serv.cpp@{func2serv.cpp}!get\_stat@{get\_stat}} +\index{get\_stat@{get\_stat}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_stat()}{get\_stat()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a0a88fbccc63c8cc890ded3a20fb71e72} +QByte\+Array get\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение статистики. + +\begin{DoxyReturn}{Returns} +Статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00200\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Your\ Statistic:\ null\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00201\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a8ebcc70a2024aab70883f094fc35849e}\index{func2serv.cpp@{func2serv.cpp}!get\_user\_count@{get\_user\_count}} +\index{get\_user\_count@{get\_user\_count}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_user\_count()}{get\_user\_count()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a8ebcc70a2024aab70883f094fc35849e} +int get\+\_\+user\+\_\+count (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества пользователей. + +Получение общего количества пользователей. + +\begin{DoxyReturn}{Returns} +Количество пользователей. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00248\ \ \ \ \ \textcolor{comment}{//\ Здесь\ будет\ SQL-\/запрос,\ пока\ заглушка}} +\DoxyCodeLine{00249\ \ \ \ \ \textcolor{keywordflow}{return}\ 152;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00250\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a4d269e13002c5cded37bee9ade854d93}\index{func2serv.cpp@{func2serv.cpp}!get\_weekly\_logins@{get\_weekly\_logins}} +\index{get\_weekly\_logins@{get\_weekly\_logins}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{get\_weekly\_logins()}{get\_weekly\_logins()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a4d269e13002c5cded37bee9ade854d93} +int get\+\_\+weekly\+\_\+logins (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества входов за неделю. + +\begin{DoxyReturn}{Returns} +Количество входов за неделю. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00270\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00271\ \ \ \ \ \textcolor{comment}{//\ Заглушка,\ пока\ без\ БД}} +\DoxyCodeLine{00272\ \ \ \ \ \textcolor{keywordflow}{return}\ 78;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00273\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_aa70831eddff4b8ed7a04647778a35747}\index{func2serv.cpp@{func2serv.cpp}!menu\_export@{menu\_export}} +\index{menu\_export@{menu\_export}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{menu\_export()}{menu\_export()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_aa70831eddff4b8ed7a04647778a35747} +QByte\+Array menu\+\_\+export (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Экспорт меню. + +\begin{DoxyReturn}{Returns} +Результат экспорта меню в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00207\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Меню\ успешно\ экспортировано!\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00208\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_a99bd96103155e73697cc47518a5559a4}\index{func2serv.cpp@{func2serv.cpp}!parsing@{parsing}} +\index{parsing@{parsing}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{parsing()}{parsing()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_a99bd96103155e73697cc47518a5559a4} +QByte\+Array parsing (\begin{DoxyParamCaption}\item[{QString}]{input}{, }\item[{int}]{socdes}{}\end{DoxyParamCaption})} + + + +Парсинг входных данных. + + +\begin{DoxyParams}{Parameters} +{\em input} & Входная строка. \\ +\hline +{\em socdes} & Дескриптор сокета. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Обработанная строка данных. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00019\ \{} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \ \ \ \ QStringList\ container\ =\ input.remove(\textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}}).split(\textcolor{stringliteral}{"{}//"{}});\ \textcolor{comment}{//пример\ входящих\ данных\ reg//login\_user//password\_user}} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keywordflow}{if}\ (container.isEmpty())\ \{} +\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}server\ error:\ empty\ command\(\backslash\)\(\backslash\)n"{}};} +\DoxyCodeLine{00025\ \ \ \ \ \}} +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \ \ \ \ qDebug()\ <<\ socdes\ <<\ \textcolor{stringliteral}{"{}\ user\ command:\ "{}}\ <<\ container[0];} +\DoxyCodeLine{00029\ \ \ \ \ QString\ var\ =\ container[0];} +\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}check\_task"{}})} +\DoxyCodeLine{00031\ \ \ \ \ \{} +\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a6d4386c36a7ed61c61cf3d1bad354f27}{check\_task}}();} +\DoxyCodeLine{00033\ \ \ \ \ \}} +\DoxyCodeLine{00034\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\textcolor{stringliteral}{"{}auth"{}})} +\DoxyCodeLine{00035\ \ \ \ \ \{} +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a173db167f59671d56b49f5d7d11ef531}{auth}}(container);} +\DoxyCodeLine{00037\ \ \ \ \ \}} +\DoxyCodeLine{00038\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}add\_product"{}})} +\DoxyCodeLine{00039\ \ \ \ \ \{} +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a27ffe3af29c8442de4aa94a5e48d2345}{add\_product}}(container);} +\DoxyCodeLine{00041\ \ \ \ \ \}} +\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}user"{}}\ \&\&\ container[2]\ ==\ \textcolor{stringliteral}{"{}get\_products"{}})\ \{} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a73b3ae758a8cf3621318d27cd1a17722}{get\_products}}(container[1]);} +\DoxyCodeLine{00044\ \ \ \ \ \}} +\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\textcolor{stringliteral}{"{}reg"{}})} +\DoxyCodeLine{00046\ \ \ \ \ \{} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_ac87f1fa2fd8c6ee1a48c3a56a99b3275}{reg}}(container);} +\DoxyCodeLine{00048\ \ \ \ \ \}} +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}get\_stat"{}})} +\DoxyCodeLine{00050\ \ \ \ \ \{} +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}(\mbox{\hyperlink{func2serv_8cpp_a0a88fbccc63c8cc890ded3a20fb71e72}{get\_stat}}());} +\DoxyCodeLine{00052\ \ \ \ \ \}} +\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}admin"{}}\ \&\&\ container[1]\ ==\ \textcolor{stringliteral}{"{}dynamic\_stat"{}})\ \{} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a8a2ae0ff8263d70f4e0f30d6b0d89af7}{get\_dynamic\_stat}}();} +\DoxyCodeLine{00055\ \ \ \ \ \}} +\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}menu\_export"{}})} +\DoxyCodeLine{00057\ \ \ \ \ \{} +\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_aa70831eddff4b8ed7a04647778a35747}{menu\_export}}();} +\DoxyCodeLine{00059\ \ \ \ \ \}} +\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}user"{}}\ \&\&\ container[2]\ ==\ \textcolor{stringliteral}{"{}add\_favorite\_ration"{}})\ \{} +\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a6496e445a644cca89c6252f6e7adecb0}{add\_favorite\_ration}}(container);} +\DoxyCodeLine{00062\ \ \ \ \ \}} +\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}admin"{}}\ \&\&\ container[1]\ ==\ \textcolor{stringliteral}{"{}get\_all\_users"{}})\ \{} +\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_ab8bda875989629df9b683e881296b32d}{get\_all\_users}}();} +\DoxyCodeLine{00065\ \ \ \ \ \}} +\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}admin"{}}\ \&\&\ container[1]\ ==\ \textcolor{stringliteral}{"{}stable\_stat"{}})\ \{} +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a2d521723770cde0e28bb41544394917b}{get\_stable\_stat}}();} +\DoxyCodeLine{00068\ \ \ \ \ \}} +\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keywordflow}{else}} +\DoxyCodeLine{00070\ \ \ \ \ \{} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}server\ error:\ unknow\ command\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00072\ \ \ \ \ \}} +\DoxyCodeLine{00073\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8cpp_ac87f1fa2fd8c6ee1a48c3a56a99b3275}\index{func2serv.cpp@{func2serv.cpp}!reg@{reg}} +\index{reg@{reg}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{reg()}{reg()}} +{\footnotesize\ttfamily \label{func2serv_8cpp_ac87f1fa2fd8c6ee1a48c3a56a99b3275} +QByte\+Array reg (\begin{DoxyParamCaption}\item[{QString\+List}]{params}{}\end{DoxyParamCaption})} + + + +Регистрация пользователя. + + +\begin{DoxyParams}{Parameters} +{\em Входной} & список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат регистрации в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00119\ \ \ \ \ \textcolor{comment}{//\ 1️⃣\ Проверка\ количества\ параметров}} +\DoxyCodeLine{00120\ \ \ \ \ \textcolor{keywordflow}{if}\ (params.size()\ !=\ 4)\ \{} +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_failed//Недостаточно\ параметров\ для\ регистрации\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00122\ \ \ \ \ \}} +\DoxyCodeLine{00123\ } +\DoxyCodeLine{00124\ \ \ \ \ \textcolor{comment}{//\ 2️⃣\ Извлечение\ данных\ из\ запроса}} +\DoxyCodeLine{00125\ \ \ \ \ QString\ name\ =\ params[1];\ \ \ \ \ \ \textcolor{comment}{//\ Имя\ пользователя}} +\DoxyCodeLine{00126\ \ \ \ \ QString\ email\ =\ params[2];\ \ \ \ \ \textcolor{comment}{//\ Email\ (должен\ быть\ уникальным)}} +\DoxyCodeLine{00127\ \ \ \ \ QString\ password\ =\ params[3];\ \ \textcolor{comment}{//\ Пароль}} +\DoxyCodeLine{00128\ } +\DoxyCodeLine{00129\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00130\ } +\DoxyCodeLine{00131\ \ \ \ \ \textcolor{comment}{//\ 3️⃣\ Проверка,\ не\ занят\ ли\ email}} +\DoxyCodeLine{00132\ \ \ \ \ QSqlQuery\ checkQuery\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}SELECT\ id\ FROM\ users\ WHERE\ email\ =\ :email"{}},} +\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \{\{\textcolor{stringliteral}{"{}:email"{}},\ email\}\}} +\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00136\ } +\DoxyCodeLine{00137\ \ \ \ \ \textcolor{comment}{//\ Если\ запрос\ не\ выполнился\ (ошибка\ БД)}} +\DoxyCodeLine{00138\ \ \ \ \ \textcolor{keywordflow}{if}\ (!checkQuery.exec())\ \{} +\DoxyCodeLine{00139\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_failed//Ошибка\ при\ проверке\ email\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00140\ \ \ \ \ \}} +\DoxyCodeLine{00141\ } +\DoxyCodeLine{00142\ \ \ \ \ \textcolor{comment}{//\ Если\ email\ уже\ существует\ (найдена\ запись)}} +\DoxyCodeLine{00143\ \ \ \ \ \textcolor{keywordflow}{if}\ (checkQuery.next())\ \{} +\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_failed//Пользователь\ с\ таким\ email\ уже\ зарегистрирован\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00145\ \ \ \ \ \}} +\DoxyCodeLine{00146\ } +\DoxyCodeLine{00147\ \ \ \ \ \textcolor{comment}{//\ 4️⃣\ Попытка\ добавить\ пользователя}} +\DoxyCodeLine{00148\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_af17db97dfc40b0fa48b3ed9abeacca76}{addUser}}(name,\ email,\ password,\ \textcolor{keyword}{false});} +\DoxyCodeLine{00149\ } +\DoxyCodeLine{00150\ \ \ \ \ \textcolor{keywordflow}{if}\ (success)\ \{} +\DoxyCodeLine{00151\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 5️⃣\ Обновление\ статистики\ (увеличиваем\ счетчик\ регистраций)}} +\DoxyCodeLine{00152\ \ \ \ \ \ \ \ \ QVariantMap\ stats\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_aad20b90cdb02aab3df1f27a9e4f882a3}{getStatistics}}();} +\DoxyCodeLine{00153\ \ \ \ \ \ \ \ \ db-\/>\mbox{\hyperlink{class_data_base_singleton_ab2877d5184cd7af28f1ea3b31f523280}{updateStatistics}}(} +\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}registrations"{}}].toInt()\ +\ 1,\ \ \textcolor{comment}{//\ +1\ новая\ регистрация}} +\DoxyCodeLine{00155\ \ \ \ \ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}visits"{}}].toInt(),\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Визиты\ без\ изменений}} +\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}generations"{}}].toInt()\ \ \ \ \ \ \ \ \textcolor{comment}{//\ Генерации\ без\ изменений}} +\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_success//Регистрация\ прошла\ успешно\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00159\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Если\ INSERT\ не\ сработал\ (например,\ из-\/за\ UNIQUE\ INDEX)}} +\DoxyCodeLine{00161\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_failed//Ошибка\ при\ регистрации\ (возможно,\ email\ уже\ занят)\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00162\ \ \ \ \ \}} +\DoxyCodeLine{00163\ \}} + +\end{DoxyCode} + + +\doxysubsection{Variable Documentation} +\Hypertarget{func2serv_8cpp_aa13aef29ff8f58936aa8f2bd99f70253}\index{func2serv.cpp@{func2serv.cpp}!mockDatabase@{mockDatabase}} +\index{mockDatabase@{mockDatabase}!func2serv.cpp@{func2serv.cpp}} +\doxysubsubsection{\texorpdfstring{mockDatabase}{mockDatabase}} +{\footnotesize\ttfamily \label{func2serv_8cpp_aa13aef29ff8f58936aa8f2bd99f70253} +QMap$<$QString, QList$<$QString$>$ $>$ mock\+Database} + +{\bfseries Initial value\+:} +\begin{DoxyCode}{0} +\DoxyCodeLine{=\ \{} +\DoxyCodeLine{\ \ \ \ \{\textcolor{stringliteral}{"{}1"{}},\ \{\textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}banana\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}}\}\},} +\DoxyCodeLine{\ \ \ \ \{\textcolor{stringliteral}{"{}2"{}},\ \{\textcolor{stringliteral}{"{}apple\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}grape\_11\_45\_12\_24"{}}\}\}} +\DoxyCodeLine{\ \ \ \ \}} + +\end{DoxyCode} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00012\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00013\ \ \ \ \ \{\textcolor{stringliteral}{"{}1"{}},\ \{\textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}banana\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}orange\_11\_45\_12\_24"{}}\}\},} +\DoxyCodeLine{00014\ \ \ \ \ \{\textcolor{stringliteral}{"{}2"{}},\ \{\textcolor{stringliteral}{"{}apple\_11\_45\_12\_24"{}},\ \textcolor{stringliteral}{"{}grape\_11\_45\_12\_24"{}}\}\}} +\DoxyCodeLine{00015\ \ \ \ \ \};} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/func2serv_8cpp__incl.dot b/docs/doxygen/latex/func2serv_8cpp__incl.dot new file mode 100644 index 0000000..aadd797 --- /dev/null +++ b/docs/doxygen/latex/func2serv_8cpp__incl.dot @@ -0,0 +1,40 @@ +digraph "server/func2serv.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/func2serv.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge18_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="func2serv.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$func2serv_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge19_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge20_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge21_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge22_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge23_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge24_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node8 [id="edge25_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="databasesingleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8h.html",tooltip=" "]; + Node8 -> Node9 [id="edge26_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node10 [id="edge27_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node11 [id="edge28_Node000008_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node4 [id="edge29_Node000008_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node8 -> Node12 [id="edge30_Node000008_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node13 [id="edge31_Node000008_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node14 [id="edge32_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QJsonArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node15 [id="edge33_Node000001_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QJsonObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node16 [id="edge34_Node000001_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QJsonDocument",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/func2serv_8cpp__incl.md5 b/docs/doxygen/latex/func2serv_8cpp__incl.md5 new file mode 100644 index 0000000..897a219 --- /dev/null +++ b/docs/doxygen/latex/func2serv_8cpp__incl.md5 @@ -0,0 +1 @@ +53a58a13af3183f5de66a3bb37754294 \ No newline at end of file diff --git a/docs/doxygen/latex/func2serv_8cpp__incl.pdf b/docs/doxygen/latex/func2serv_8cpp__incl.pdf new file mode 100644 index 0000000..af80054 Binary files /dev/null and b/docs/doxygen/latex/func2serv_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/func2serv_8h.tex b/docs/doxygen/latex/func2serv_8h.tex new file mode 100644 index 0000000..c7d0e9b --- /dev/null +++ b/docs/doxygen/latex/func2serv_8h.tex @@ -0,0 +1,658 @@ +\doxysection{server/func2serv.h File Reference} +\hypertarget{func2serv_8h}{}\label{func2serv_8h}\index{server/func2serv.h@{server/func2serv.h}} +{\ttfamily \#include $<$QByte\+Array$>$}\newline +{\ttfamily \#include $<$QDebug$>$}\newline +Include dependency graph for func2serv.\+h\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=218pt]{func2serv_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=324pt]{func2serv_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Functions} +\begin{DoxyCompactItemize} +\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_a99bd96103155e73697cc47518a5559a4}{parsing}} (QString input, int socdes) +\begin{DoxyCompactList}\small\item\em Парсинг входных данных. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_acbd6ff747a2b100b8f8da4a9b99d43c7}{auth}} (QString\+List) +\begin{DoxyCompactList}\small\item\em Авторизация пользователя. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_a202f69a507a4e282bb2916fea170686f}{reg}} (QString\+List) +\begin{DoxyCompactList}\small\item\em Регистрация пользователя. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_aea4bc93c1f84d34a05a2c25939dcfaac}{add\+\_\+product}} (QString\+List) +\begin{DoxyCompactList}\small\item\em Добавление продукта. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_a0a88fbccc63c8cc890ded3a20fb71e72}{get\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение статистики. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_a6d4386c36a7ed61c61cf3d1bad354f27}{check\+\_\+task}} () +\begin{DoxyCompactList}\small\item\em Проверка задания. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_aa70831eddff4b8ed7a04647778a35747}{menu\+\_\+export}} () +\begin{DoxyCompactList}\small\item\em Экспорт меню. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_ab8096a94a4e4aaa7af0852f0ffc11c99}{get\+\_\+products}} (QString User\+Id) +\begin{DoxyCompactList}\small\item\em Получение списка продуктов. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_ab8bda875989629df9b683e881296b32d}{get\+\_\+all\+\_\+users}} () +\begin{DoxyCompactList}\small\item\em Получение всех пользователей. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_a2d521723770cde0e28bb41544394917b}{get\+\_\+stable\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение стабильной статистики. \end{DoxyCompactList}\item +int \mbox{\hyperlink{func2serv_8h_a8ebcc70a2024aab70883f094fc35849e}{get\+\_\+user\+\_\+count}} () +\begin{DoxyCompactList}\small\item\em Получение количества пользователей. \end{DoxyCompactList}\item +int \mbox{\hyperlink{func2serv_8h_a4ddd067c5a29f76aead93c977a05113a}{get\+\_\+product\+\_\+count}} () +\begin{DoxyCompactList}\small\item\em Получение количества продуктов. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_a8a2ae0ff8263d70f4e0f30d6b0d89af7}{get\+\_\+dynamic\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение динамической статистики. \end{DoxyCompactList}\item +int \mbox{\hyperlink{func2serv_8h_a4d269e13002c5cded37bee9ade854d93}{get\+\_\+weekly\+\_\+logins}} () +\begin{DoxyCompactList}\small\item\em Получение количества входов за неделю. \end{DoxyCompactList}\item +int \mbox{\hyperlink{func2serv_8h_a2d6f70d14e474616a4a16a72485c2f0e}{get\+\_\+monthly\+\_\+logins}} () +\begin{DoxyCompactList}\small\item\em Получение количества входов за месяц. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{func2serv_8h_a6496e445a644cca89c6252f6e7adecb0}{add\+\_\+favorite\+\_\+ration}} (const QString\+List \&container) +\begin{DoxyCompactList}\small\item\em Добавление рациона в избранное. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{func2serv_8h_a064e99d59eaa1d8cccef20b3192df015}{add\+\_\+ration\+\_\+to\+\_\+favorites}} (const QString \&user\+Id, const QString \&ration\+Id) +\begin{DoxyCompactList}\small\item\em Добавление рациона в избранное для пользователя. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Function Documentation} +\Hypertarget{func2serv_8h_a6496e445a644cca89c6252f6e7adecb0}\index{func2serv.h@{func2serv.h}!add\_favorite\_ration@{add\_favorite\_ration}} +\index{add\_favorite\_ration@{add\_favorite\_ration}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{add\_favorite\_ration()}{add\_favorite\_ration()}} +{\footnotesize\ttfamily \label{func2serv_8h_a6496e445a644cca89c6252f6e7adecb0} +QByte\+Array add\+\_\+favorite\+\_\+ration (\begin{DoxyParamCaption}\item[{const QString\+List \&}]{container}{}\end{DoxyParamCaption})} + + + +Добавление рациона в избранное. + + +\begin{DoxyParams}{Parameters} +{\em container} & Список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат добавления в избранное в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00294\ \ \ \ \ QString\ userId\ =\ container[1];\ \textcolor{comment}{//\ ID\ пользователя}} +\DoxyCodeLine{00295\ \ \ \ \ QString\ rationId\ =\ container[2];\ \textcolor{comment}{//\ ID\ рациона}} +\DoxyCodeLine{00296\ } +\DoxyCodeLine{00297\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ \mbox{\hyperlink{func2serv_8cpp_a064e99d59eaa1d8cccef20b3192df015}{add\_ration\_to\_favorites}}(userId,\ rationId);\ \textcolor{comment}{//\ Вызов\ функции-\/заглушки}} +\DoxyCodeLine{00298\ } +\DoxyCodeLine{00299\ \ \ \ \ \textcolor{keywordflow}{if}\ (success)\ \{} +\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Ration\ successfully\ added\ to\ favorites\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00301\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Error:\ failed\ to\ add\ ration\ to\ favorites\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00303\ \ \ \ \ \}} +\DoxyCodeLine{00304\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_aea4bc93c1f84d34a05a2c25939dcfaac}\index{func2serv.h@{func2serv.h}!add\_product@{add\_product}} +\index{add\_product@{add\_product}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{add\_product()}{add\_product()}} +{\footnotesize\ttfamily \label{func2serv_8h_aea4bc93c1f84d34a05a2c25939dcfaac} +QByte\+Array add\+\_\+product (\begin{DoxyParamCaption}\item[{QString\+List}]{params}{}\end{DoxyParamCaption})} + + + +Добавление продукта. + + +\begin{DoxyParams}{Parameters} +{\em Входной} & список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат добавления продукта в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keywordflow}{if}\ (params.size()\ !=\ 9)\ \{} +\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}add\_product//failed//Неверные\ аргументы\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00168\ \ \ \ \ \}} +\DoxyCodeLine{00169\ } +\DoxyCodeLine{00170\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}\ *db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00171\ \ \ \ \ \textcolor{keywordtype}{int}\ userId\ =\ params[1].toInt();} +\DoxyCodeLine{00172\ \ \ \ \ QString\ name\ =\ params[2];} +\DoxyCodeLine{00173\ \textcolor{comment}{/*}} +\DoxyCodeLine{00174\ \textcolor{comment}{\ \ \ \ //\ Проверяем,\ существует\ ли\ уже\ такой\ продукт }} +\DoxyCodeLine{00175\ \textcolor{comment}{\ \ \ \ QSqlQuery\ checkQuery\ =\ db-\/>executeQuery( }} +\DoxyCodeLine{00176\ \textcolor{comment}{\ \ \ \ \ \ \ \ "{}SELECT\ id\ FROM\ products\ WHERE\ id\_user\ =\ :id\_user\ AND\ name\ =\ :name"{}, }} +\DoxyCodeLine{00177\ \textcolor{comment}{\ \ \ \ \ \ \ \ \{\{"{}:id\_user"{},\ userId\},\ \{"{}:name"{},\ name\}\} }} +\DoxyCodeLine{00178\ \textcolor{comment}{\ \ \ \ \ \ \ \ ); }} +\DoxyCodeLine{00179\ \textcolor{comment}{}} +\DoxyCodeLine{00180\ \textcolor{comment}{\ \ \ \ if\ (checkQuery.next())\ \{ }} +\DoxyCodeLine{00181\ \textcolor{comment}{\ \ \ \ \ \ \ \ return\ "{}add\_product//failed//Продукт\ уже\ существует\(\backslash\)r\(\backslash\)n"{}; }} +\DoxyCodeLine{00182\ \textcolor{comment}{\ \ \ \ \} }} +\DoxyCodeLine{00183\ \textcolor{comment}{*/}} +\DoxyCodeLine{00184\ \ \ \ \ \textcolor{comment}{//\ Добавляем\ продукт}} +\DoxyCodeLine{00185\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a3fe2a5e1f41a408023066e8caf63b523}{addProduct}}(} +\DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ userId,} +\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ name,} +\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ params[3].toInt(),\ \textcolor{comment}{//\ proteins}} +\DoxyCodeLine{00189\ \ \ \ \ \ \ \ \ params[4].toInt(),\ \textcolor{comment}{//\ fatness}} +\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ params[5].toInt(),\ \textcolor{comment}{//\ carbs}} +\DoxyCodeLine{00191\ \ \ \ \ \ \ \ \ params[6].toInt(),\ \textcolor{comment}{//\ weight}} +\DoxyCodeLine{00192\ \ \ \ \ \ \ \ \ params[7].toInt(),\ \textcolor{comment}{//\ cost}} +\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ params[8].toInt()\ \ \textcolor{comment}{//\ type}} +\DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00195\ } +\DoxyCodeLine{00196\ \ \ \ \ \textcolor{keywordflow}{return}\ success\ ?\ \textcolor{stringliteral}{"{}add\_product//success\(\backslash\)r\(\backslash\)n"{}}\ :\ \textcolor{stringliteral}{"{}add\_product//failed//Ошибка\ БД\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00197\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a064e99d59eaa1d8cccef20b3192df015}\index{func2serv.h@{func2serv.h}!add\_ration\_to\_favorites@{add\_ration\_to\_favorites}} +\index{add\_ration\_to\_favorites@{add\_ration\_to\_favorites}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{add\_ration\_to\_favorites()}{add\_ration\_to\_favorites()}} +{\footnotesize\ttfamily \label{func2serv_8h_a064e99d59eaa1d8cccef20b3192df015} +bool add\+\_\+ration\+\_\+to\+\_\+favorites (\begin{DoxyParamCaption}\item[{const QString \&}]{user\+Id}{, }\item[{const QString \&}]{ration\+Id}{}\end{DoxyParamCaption})} + + + +Добавление рациона в избранное для пользователя. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +{\em ration\+Id} & Идентификатор рациона. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат добавления в избранное. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00306\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Adding\ ration\ for\ user:"{}}\ <<\ userId\ <<\ \textcolor{stringliteral}{"{},\ ration\ ID:"{}}\ <<\ rationId;} +\DoxyCodeLine{00307\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};\ \textcolor{comment}{//\ Заглушка,\ потом\ заменить\ на\ SQL-\/запрос}} +\DoxyCodeLine{00308\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_acbd6ff747a2b100b8f8da4a9b99d43c7}\index{func2serv.h@{func2serv.h}!auth@{auth}} +\index{auth@{auth}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{auth()}{auth()}} +{\footnotesize\ttfamily \label{func2serv_8h_acbd6ff747a2b100b8f8da4a9b99d43c7} +QByte\+Array auth (\begin{DoxyParamCaption}\item[{QString\+List}]{log}{}\end{DoxyParamCaption})} + + + +Авторизация пользователя. + + +\begin{DoxyParams}{Parameters} +{\em Входной} & список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат авторизации в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00078\ \ \ \ \ \textcolor{comment}{//\ Проверяем\ количество\ параметров}} +\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordflow}{if}\ (log.size()\ <\ 3)\ \{} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}auth\_failed//Недостаточно\ параметров\ для\ авторизации\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00081\ \ \ \ \ \}} +\DoxyCodeLine{00082\ } +\DoxyCodeLine{00083\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{bool}\ authSuccess\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a51bd7dc4507c5f3d04a2903899e13d42}{checkUserCredentials}}(log[1],\ log[2]);} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00086\ \ \ \ \ \textcolor{keywordflow}{if}\ (!authSuccess)\ \{} +\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}auth\_failed//Неверный\ логин\ или\ пароль\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00088\ \ \ \ \ \}} +\DoxyCodeLine{00089\ } +\DoxyCodeLine{00090\ } +\DoxyCodeLine{00091\ } +\DoxyCodeLine{00092\ \ \ \ \ QSqlQuery\ query\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}SELECT\ id,\ name,\ email,\ pass\ FROM\ users\ WHERE\ (email\ =\ :login\ OR\ name\ =\ :login)\ AND\ pass\ =\ :pass"{}},} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:login"{}},\ log[1]\},\ \textcolor{comment}{//\ логин}} +\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}:pass"{}},\ log[2]\}\ \ \ \textcolor{comment}{//\ пароль}} +\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00099\ } +\DoxyCodeLine{00100\ } +\DoxyCodeLine{00101\ \ \ \ \ \textcolor{keywordflow}{if}\ (!query.next())\ \{} +\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}auth\_failed//Ошибка\ при\ получении\ данных\ пользователя\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00103\ \ \ \ \ \}} +\DoxyCodeLine{00104\ } +\DoxyCodeLine{00105\ \ \ \ \ QString\ userId\ =\ query.value(\textcolor{stringliteral}{"{}id"{}}).toString();} +\DoxyCodeLine{00106\ \ \ \ \ QString\ userLogin\ =\ query.value(\textcolor{stringliteral}{"{}name"{}}).toString();} +\DoxyCodeLine{00107\ \ \ \ \ QString\ userEmail\ =\ query.value(\textcolor{stringliteral}{"{}email"{}}).toString();} +\DoxyCodeLine{00108\ } +\DoxyCodeLine{00109\ \ \ \ \ QString\ response\ =\ QString(\textcolor{stringliteral}{"{}auth\_success//\%1//\%2//\%3\(\backslash\)r\(\backslash\)n"{}})} +\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .arg(userId)} +\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .arg(userLogin)} +\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .arg(userEmail);} +\DoxyCodeLine{00113\ } +\DoxyCodeLine{00114\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00115\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a6d4386c36a7ed61c61cf3d1bad354f27}\index{func2serv.h@{func2serv.h}!check\_task@{check\_task}} +\index{check\_task@{check\_task}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{check\_task()}{check\_task()}} +{\footnotesize\ttfamily \label{func2serv_8h_a6d4386c36a7ed61c61cf3d1bad354f27} +QByte\+Array check\+\_\+task (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Проверка задания. + +\begin{DoxyReturn}{Returns} +Результат проверки задания в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00204\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Task\ was\ succesful\ completed\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00205\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_ab8bda875989629df9b683e881296b32d}\index{func2serv.h@{func2serv.h}!get\_all\_users@{get\_all\_users}} +\index{get\_all\_users@{get\_all\_users}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_all\_users()}{get\_all\_users()}} +{\footnotesize\ttfamily \label{func2serv_8h_ab8bda875989629df9b683e881296b32d} +QByte\+Array get\+\_\+all\+\_\+users (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение всех пользователей. + +\begin{DoxyReturn}{Returns} +Список всех пользователей в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00236\ \ \ \ \ QStringList\ users;} +\DoxyCodeLine{00237\ } +\DoxyCodeLine{00238\ \ \ \ \ \textcolor{comment}{//\ fetch\_users\_from\_db(users);}} +\DoxyCodeLine{00239\ } +\DoxyCodeLine{00240\ \ \ \ \ QString\ response;} +\DoxyCodeLine{00241\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ QString\&\ user\ :\ users)\ \{} +\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ response\ +=\ user\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00243\ \ \ \ \ \}} +\DoxyCodeLine{00244\ } +\DoxyCodeLine{00245\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00246\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a8a2ae0ff8263d70f4e0f30d6b0d89af7}\index{func2serv.h@{func2serv.h}!get\_dynamic\_stat@{get\_dynamic\_stat}} +\index{get\_dynamic\_stat@{get\_dynamic\_stat}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_dynamic\_stat()}{get\_dynamic\_stat()}} +{\footnotesize\ttfamily \label{func2serv_8h_a8a2ae0ff8263d70f4e0f30d6b0d89af7} +QByte\+Array get\+\_\+dynamic\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение динамической статистики. + +\begin{DoxyReturn}{Returns} +Динамическая статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00280\ \ \ \ \ \textcolor{keywordtype}{int}\ weeklyLogins\ =\ 0;} +\DoxyCodeLine{00281\ \ \ \ \ \textcolor{keywordtype}{int}\ monthlyLogins\ =\ 0;} +\DoxyCodeLine{00282\ } +\DoxyCodeLine{00283\ \ \ \ \ \textcolor{comment}{//\ Получаем\ данные\ из\ БД\ (пока\ заглушки)}} +\DoxyCodeLine{00284\ \ \ \ \ weeklyLogins\ =\ \mbox{\hyperlink{func2serv_8cpp_a4d269e13002c5cded37bee9ade854d93}{get\_weekly\_logins}}();} +\DoxyCodeLine{00285\ \ \ \ \ monthlyLogins\ =\ \mbox{\hyperlink{func2serv_8cpp_a2d6f70d14e474616a4a16a72485c2f0e}{get\_monthly\_logins}}();} +\DoxyCodeLine{00286\ } +\DoxyCodeLine{00287\ \ \ \ \ \textcolor{comment}{//\ Формируем\ строку\ ответа}} +\DoxyCodeLine{00288\ \ \ \ \ QString\ response\ =\ \textcolor{stringliteral}{"{}Logins\ per\ week:\ "{}}\ +\ QString::number(weeklyLogins)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}}\ +} +\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Logins\ per\ month:\ "{}}\ +\ QString::number(monthlyLogins)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00290\ } +\DoxyCodeLine{00291\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00292\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a2d6f70d14e474616a4a16a72485c2f0e}\index{func2serv.h@{func2serv.h}!get\_monthly\_logins@{get\_monthly\_logins}} +\index{get\_monthly\_logins@{get\_monthly\_logins}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_monthly\_logins()}{get\_monthly\_logins()}} +{\footnotesize\ttfamily \label{func2serv_8h_a2d6f70d14e474616a4a16a72485c2f0e} +int get\+\_\+monthly\+\_\+logins (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества входов за месяц. + +\begin{DoxyReturn}{Returns} +Количество входов за месяц. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00275\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00276\ \ \ \ \ \textcolor{comment}{//\ Заглушка,\ пока\ без\ БД}} +\DoxyCodeLine{00277\ \ \ \ \ \textcolor{keywordflow}{return}\ 312;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00278\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a4ddd067c5a29f76aead93c977a05113a}\index{func2serv.h@{func2serv.h}!get\_product\_count@{get\_product\_count}} +\index{get\_product\_count@{get\_product\_count}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_product\_count()}{get\_product\_count()}} +{\footnotesize\ttfamily \label{func2serv_8h_a4ddd067c5a29f76aead93c977a05113a} +int get\+\_\+product\+\_\+count (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества продуктов. + +\begin{DoxyReturn}{Returns} +Количество продуктов. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00253\ \ \ \ \ \textcolor{comment}{//\ Здесь\ будет\ SQL-\/запрос,\ пока\ заглушка}} +\DoxyCodeLine{00254\ \ \ \ \ \textcolor{keywordflow}{return}\ 732;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00255\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_ab8096a94a4e4aaa7af0852f0ffc11c99}\index{func2serv.h@{func2serv.h}!get\_products@{get\_products}} +\index{get\_products@{get\_products}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_products()}{get\_products()}} +{\footnotesize\ttfamily \label{func2serv_8h_ab8096a94a4e4aaa7af0852f0ffc11c99} +QByte\+Array get\+\_\+products (\begin{DoxyParamCaption}\item[{QString}]{User\+Id}{}\end{DoxyParamCaption})} + + + +Получение списка продуктов. + + +\begin{DoxyParams}{Parameters} +{\em User\+Id} & Идентификатор пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Список продуктов в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00217\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00218\ \ \ \ \ \textcolor{keywordtype}{int}\ userIdInt\ =\ userId.toInt();} +\DoxyCodeLine{00219\ \ \ \ \ QVector\ products\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a84fe7936dd15c077eff86d7884ce3049}{getProductsByUser}}(userIdInt);} +\DoxyCodeLine{00220\ } +\DoxyCodeLine{00221\ \ \ \ \ QJsonArray\ jsonArray;} +\DoxyCodeLine{00222\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ QVariantMap\&\ product\ :\ products)\ \{} +\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ QJsonObject\ obj\ =\ QJsonObject::fromVariantMap(product);} +\DoxyCodeLine{00224\ \ \ \ \ \ \ \ \ jsonArray.append(obj);} +\DoxyCodeLine{00225\ \ \ \ \ \}} +\DoxyCodeLine{00226\ } +\DoxyCodeLine{00227\ \ \ \ \ QJsonDocument\ doc(jsonArray);} +\DoxyCodeLine{00228\ \ \ \ \ QByteArray\ jsonBytes\ =\ doc.toJson(QJsonDocument::Compact);} +\DoxyCodeLine{00229\ } +\DoxyCodeLine{00230\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Отправляем\ продукты\ в\ виде\ JSON:"{}}\ <<\ jsonBytes;} +\DoxyCodeLine{00231\ } +\DoxyCodeLine{00232\ \ \ \ \ \textcolor{keywordflow}{return}\ jsonBytes;} +\DoxyCodeLine{00233\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a2d521723770cde0e28bb41544394917b}\index{func2serv.h@{func2serv.h}!get\_stable\_stat@{get\_stable\_stat}} +\index{get\_stable\_stat@{get\_stable\_stat}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_stable\_stat()}{get\_stable\_stat()}} +{\footnotesize\ttfamily \label{func2serv_8h_a2d521723770cde0e28bb41544394917b} +QByte\+Array get\+\_\+stable\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение стабильной статистики. + +\begin{DoxyReturn}{Returns} +Стабильная статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00257\ } +\DoxyCodeLine{00258\ \ \ \ \ \textcolor{keywordtype}{int}\ userCount\ =\ 0;} +\DoxyCodeLine{00259\ \ \ \ \ \textcolor{keywordtype}{int}\ productCount\ =\ 0;} +\DoxyCodeLine{00260\ } +\DoxyCodeLine{00261\ \ \ \ \ userCount\ =\ \mbox{\hyperlink{func2serv_8cpp_a8ebcc70a2024aab70883f094fc35849e}{get\_user\_count}}();} +\DoxyCodeLine{00262\ \ \ \ \ productCount\ =\ \mbox{\hyperlink{func2serv_8cpp_a4ddd067c5a29f76aead93c977a05113a}{get\_product\_count}}();} +\DoxyCodeLine{00263\ } +\DoxyCodeLine{00264\ \ \ \ \ \textcolor{comment}{//\ Формируем\ строку\ ответа}} +\DoxyCodeLine{00265\ \ \ \ \ QString\ response\ =\ \textcolor{stringliteral}{"{}Users:\ "{}}\ +\ QString::number(userCount)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}}\ +} +\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Products:\ "{}}\ +\ QString::number(productCount)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00267\ } +\DoxyCodeLine{00268\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00269\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a0a88fbccc63c8cc890ded3a20fb71e72}\index{func2serv.h@{func2serv.h}!get\_stat@{get\_stat}} +\index{get\_stat@{get\_stat}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_stat()}{get\_stat()}} +{\footnotesize\ttfamily \label{func2serv_8h_a0a88fbccc63c8cc890ded3a20fb71e72} +QByte\+Array get\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение статистики. + +\begin{DoxyReturn}{Returns} +Статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00200\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Your\ Statistic:\ null\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00201\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a8ebcc70a2024aab70883f094fc35849e}\index{func2serv.h@{func2serv.h}!get\_user\_count@{get\_user\_count}} +\index{get\_user\_count@{get\_user\_count}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_user\_count()}{get\_user\_count()}} +{\footnotesize\ttfamily \label{func2serv_8h_a8ebcc70a2024aab70883f094fc35849e} +int get\+\_\+user\+\_\+count (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества пользователей. + +\begin{DoxyReturn}{Returns} +Количество пользователей. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00248\ \ \ \ \ \textcolor{comment}{//\ Здесь\ будет\ SQL-\/запрос,\ пока\ заглушка}} +\DoxyCodeLine{00249\ \ \ \ \ \textcolor{keywordflow}{return}\ 152;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00250\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a4d269e13002c5cded37bee9ade854d93}\index{func2serv.h@{func2serv.h}!get\_weekly\_logins@{get\_weekly\_logins}} +\index{get\_weekly\_logins@{get\_weekly\_logins}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{get\_weekly\_logins()}{get\_weekly\_logins()}} +{\footnotesize\ttfamily \label{func2serv_8h_a4d269e13002c5cded37bee9ade854d93} +int get\+\_\+weekly\+\_\+logins (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества входов за неделю. + +\begin{DoxyReturn}{Returns} +Количество входов за неделю. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00270\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00271\ \ \ \ \ \textcolor{comment}{//\ Заглушка,\ пока\ без\ БД}} +\DoxyCodeLine{00272\ \ \ \ \ \textcolor{keywordflow}{return}\ 78;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00273\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_aa70831eddff4b8ed7a04647778a35747}\index{func2serv.h@{func2serv.h}!menu\_export@{menu\_export}} +\index{menu\_export@{menu\_export}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{menu\_export()}{menu\_export()}} +{\footnotesize\ttfamily \label{func2serv_8h_aa70831eddff4b8ed7a04647778a35747} +QByte\+Array menu\+\_\+export (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Экспорт меню. + +\begin{DoxyReturn}{Returns} +Результат экспорта меню в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00207\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Меню\ успешно\ экспортировано!\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00208\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a99bd96103155e73697cc47518a5559a4}\index{func2serv.h@{func2serv.h}!parsing@{parsing}} +\index{parsing@{parsing}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{parsing()}{parsing()}} +{\footnotesize\ttfamily \label{func2serv_8h_a99bd96103155e73697cc47518a5559a4} +QByte\+Array parsing (\begin{DoxyParamCaption}\item[{QString}]{input}{, }\item[{int}]{socdes}{}\end{DoxyParamCaption})} + + + +Парсинг входных данных. + + +\begin{DoxyParams}{Parameters} +{\em input} & Входная строка. \\ +\hline +{\em socdes} & Дескриптор сокета. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Обработанная строка данных. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00019\ \{} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \ \ \ \ QStringList\ container\ =\ input.remove(\textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}}).split(\textcolor{stringliteral}{"{}//"{}});\ \textcolor{comment}{//пример\ входящих\ данных\ reg//login\_user//password\_user}} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keywordflow}{if}\ (container.isEmpty())\ \{} +\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}server\ error:\ empty\ command\(\backslash\)\(\backslash\)n"{}};} +\DoxyCodeLine{00025\ \ \ \ \ \}} +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \ \ \ \ qDebug()\ <<\ socdes\ <<\ \textcolor{stringliteral}{"{}\ user\ command:\ "{}}\ <<\ container[0];} +\DoxyCodeLine{00029\ \ \ \ \ QString\ var\ =\ container[0];} +\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}check\_task"{}})} +\DoxyCodeLine{00031\ \ \ \ \ \{} +\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a6d4386c36a7ed61c61cf3d1bad354f27}{check\_task}}();} +\DoxyCodeLine{00033\ \ \ \ \ \}} +\DoxyCodeLine{00034\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\textcolor{stringliteral}{"{}auth"{}})} +\DoxyCodeLine{00035\ \ \ \ \ \{} +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a173db167f59671d56b49f5d7d11ef531}{auth}}(container);} +\DoxyCodeLine{00037\ \ \ \ \ \}} +\DoxyCodeLine{00038\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}add\_product"{}})} +\DoxyCodeLine{00039\ \ \ \ \ \{} +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a27ffe3af29c8442de4aa94a5e48d2345}{add\_product}}(container);} +\DoxyCodeLine{00041\ \ \ \ \ \}} +\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}user"{}}\ \&\&\ container[2]\ ==\ \textcolor{stringliteral}{"{}get\_products"{}})\ \{} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a73b3ae758a8cf3621318d27cd1a17722}{get\_products}}(container[1]);} +\DoxyCodeLine{00044\ \ \ \ \ \}} +\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\textcolor{stringliteral}{"{}reg"{}})} +\DoxyCodeLine{00046\ \ \ \ \ \{} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_ac87f1fa2fd8c6ee1a48c3a56a99b3275}{reg}}(container);} +\DoxyCodeLine{00048\ \ \ \ \ \}} +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}get\_stat"{}})} +\DoxyCodeLine{00050\ \ \ \ \ \{} +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}(\mbox{\hyperlink{func2serv_8cpp_a0a88fbccc63c8cc890ded3a20fb71e72}{get\_stat}}());} +\DoxyCodeLine{00052\ \ \ \ \ \}} +\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}admin"{}}\ \&\&\ container[1]\ ==\ \textcolor{stringliteral}{"{}dynamic\_stat"{}})\ \{} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a8a2ae0ff8263d70f4e0f30d6b0d89af7}{get\_dynamic\_stat}}();} +\DoxyCodeLine{00055\ \ \ \ \ \}} +\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}menu\_export"{}})} +\DoxyCodeLine{00057\ \ \ \ \ \{} +\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_aa70831eddff4b8ed7a04647778a35747}{menu\_export}}();} +\DoxyCodeLine{00059\ \ \ \ \ \}} +\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}user"{}}\ \&\&\ container[2]\ ==\ \textcolor{stringliteral}{"{}add\_favorite\_ration"{}})\ \{} +\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a6496e445a644cca89c6252f6e7adecb0}{add\_favorite\_ration}}(container);} +\DoxyCodeLine{00062\ \ \ \ \ \}} +\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}admin"{}}\ \&\&\ container[1]\ ==\ \textcolor{stringliteral}{"{}get\_all\_users"{}})\ \{} +\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_ab8bda875989629df9b683e881296b32d}{get\_all\_users}}();} +\DoxyCodeLine{00065\ \ \ \ \ \}} +\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (var\ ==\ \textcolor{stringliteral}{"{}admin"{}}\ \&\&\ container[1]\ ==\ \textcolor{stringliteral}{"{}stable\_stat"{}})\ \{} +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{func2serv_8cpp_a2d521723770cde0e28bb41544394917b}{get\_stable\_stat}}();} +\DoxyCodeLine{00068\ \ \ \ \ \}} +\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keywordflow}{else}} +\DoxyCodeLine{00070\ \ \ \ \ \{} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}server\ error:\ unknow\ command\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00072\ \ \ \ \ \}} +\DoxyCodeLine{00073\ \}} + +\end{DoxyCode} +\Hypertarget{func2serv_8h_a202f69a507a4e282bb2916fea170686f}\index{func2serv.h@{func2serv.h}!reg@{reg}} +\index{reg@{reg}!func2serv.h@{func2serv.h}} +\doxysubsubsection{\texorpdfstring{reg()}{reg()}} +{\footnotesize\ttfamily \label{func2serv_8h_a202f69a507a4e282bb2916fea170686f} +QByte\+Array reg (\begin{DoxyParamCaption}\item[{QString\+List}]{params}{}\end{DoxyParamCaption})} + + + +Регистрация пользователя. + + +\begin{DoxyParams}{Parameters} +{\em Входной} & список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат регистрации в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00119\ \ \ \ \ \textcolor{comment}{//\ 1️⃣\ Проверка\ количества\ параметров}} +\DoxyCodeLine{00120\ \ \ \ \ \textcolor{keywordflow}{if}\ (params.size()\ !=\ 4)\ \{} +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_failed//Недостаточно\ параметров\ для\ регистрации\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00122\ \ \ \ \ \}} +\DoxyCodeLine{00123\ } +\DoxyCodeLine{00124\ \ \ \ \ \textcolor{comment}{//\ 2️⃣\ Извлечение\ данных\ из\ запроса}} +\DoxyCodeLine{00125\ \ \ \ \ QString\ name\ =\ params[1];\ \ \ \ \ \ \textcolor{comment}{//\ Имя\ пользователя}} +\DoxyCodeLine{00126\ \ \ \ \ QString\ email\ =\ params[2];\ \ \ \ \ \textcolor{comment}{//\ Email\ (должен\ быть\ уникальным)}} +\DoxyCodeLine{00127\ \ \ \ \ QString\ password\ =\ params[3];\ \ \textcolor{comment}{//\ Пароль}} +\DoxyCodeLine{00128\ } +\DoxyCodeLine{00129\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00130\ } +\DoxyCodeLine{00131\ \ \ \ \ \textcolor{comment}{//\ 3️⃣\ Проверка,\ не\ занят\ ли\ email}} +\DoxyCodeLine{00132\ \ \ \ \ QSqlQuery\ checkQuery\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a4aa9edfd87be83120492e7b5c8de6151}{executeQuery}}(} +\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}SELECT\ id\ FROM\ users\ WHERE\ email\ =\ :email"{}},} +\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \{\{\textcolor{stringliteral}{"{}:email"{}},\ email\}\}} +\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00136\ } +\DoxyCodeLine{00137\ \ \ \ \ \textcolor{comment}{//\ Если\ запрос\ не\ выполнился\ (ошибка\ БД)}} +\DoxyCodeLine{00138\ \ \ \ \ \textcolor{keywordflow}{if}\ (!checkQuery.exec())\ \{} +\DoxyCodeLine{00139\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_failed//Ошибка\ при\ проверке\ email\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00140\ \ \ \ \ \}} +\DoxyCodeLine{00141\ } +\DoxyCodeLine{00142\ \ \ \ \ \textcolor{comment}{//\ Если\ email\ уже\ существует\ (найдена\ запись)}} +\DoxyCodeLine{00143\ \ \ \ \ \textcolor{keywordflow}{if}\ (checkQuery.next())\ \{} +\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_failed//Пользователь\ с\ таким\ email\ уже\ зарегистрирован\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00145\ \ \ \ \ \}} +\DoxyCodeLine{00146\ } +\DoxyCodeLine{00147\ \ \ \ \ \textcolor{comment}{//\ 4️⃣\ Попытка\ добавить\ пользователя}} +\DoxyCodeLine{00148\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_af17db97dfc40b0fa48b3ed9abeacca76}{addUser}}(name,\ email,\ password,\ \textcolor{keyword}{false});} +\DoxyCodeLine{00149\ } +\DoxyCodeLine{00150\ \ \ \ \ \textcolor{keywordflow}{if}\ (success)\ \{} +\DoxyCodeLine{00151\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 5️⃣\ Обновление\ статистики\ (увеличиваем\ счетчик\ регистраций)}} +\DoxyCodeLine{00152\ \ \ \ \ \ \ \ \ QVariantMap\ stats\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_aad20b90cdb02aab3df1f27a9e4f882a3}{getStatistics}}();} +\DoxyCodeLine{00153\ \ \ \ \ \ \ \ \ db-\/>\mbox{\hyperlink{class_data_base_singleton_ab2877d5184cd7af28f1ea3b31f523280}{updateStatistics}}(} +\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}registrations"{}}].toInt()\ +\ 1,\ \ \textcolor{comment}{//\ +1\ новая\ регистрация}} +\DoxyCodeLine{00155\ \ \ \ \ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}visits"{}}].toInt(),\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Визиты\ без\ изменений}} +\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ \ \ \ \ stats[\textcolor{stringliteral}{"{}generations"{}}].toInt()\ \ \ \ \ \ \ \ \textcolor{comment}{//\ Генерации\ без\ изменений}} +\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \ \ \ \ );} +\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_success//Регистрация\ прошла\ успешно\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00159\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Если\ INSERT\ не\ сработал\ (например,\ из-\/за\ UNIQUE\ INDEX)}} +\DoxyCodeLine{00161\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}reg\_failed//Ошибка\ при\ регистрации\ (возможно,\ email\ уже\ занят)\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00162\ \ \ \ \ \}} +\DoxyCodeLine{00163\ \}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/func2serv_8h__dep__incl.dot b/docs/doxygen/latex/func2serv_8h__dep__incl.dot new file mode 100644 index 0000000..4882592 --- /dev/null +++ b/docs/doxygen/latex/func2serv_8h__dep__incl.dot @@ -0,0 +1,12 @@ +digraph "server/func2serv.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/func2serv.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge3_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="server/func2serv.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$func2serv_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge4_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="server/mytcpserver.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/func2serv_8h__dep__incl.md5 b/docs/doxygen/latex/func2serv_8h__dep__incl.md5 new file mode 100644 index 0000000..b989e6b --- /dev/null +++ b/docs/doxygen/latex/func2serv_8h__dep__incl.md5 @@ -0,0 +1 @@ +e9af482e3c4678cad447920919cd1620 \ No newline at end of file diff --git a/docs/doxygen/latex/func2serv_8h__dep__incl.pdf b/docs/doxygen/latex/func2serv_8h__dep__incl.pdf new file mode 100644 index 0000000..2cfb293 Binary files /dev/null and b/docs/doxygen/latex/func2serv_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/func2serv_8h__incl.dot b/docs/doxygen/latex/func2serv_8h__incl.dot new file mode 100644 index 0000000..9a005d4 --- /dev/null +++ b/docs/doxygen/latex/func2serv_8h__incl.dot @@ -0,0 +1,12 @@ +digraph "server/func2serv.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/func2serv.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge3_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge4_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/func2serv_8h__incl.md5 b/docs/doxygen/latex/func2serv_8h__incl.md5 new file mode 100644 index 0000000..2ba05d1 --- /dev/null +++ b/docs/doxygen/latex/func2serv_8h__incl.md5 @@ -0,0 +1 @@ +03af0dbef455092a708ef18e0ad63817 \ No newline at end of file diff --git a/docs/doxygen/latex/func2serv_8h__incl.pdf b/docs/doxygen/latex/func2serv_8h__incl.pdf new file mode 100644 index 0000000..8c082b5 Binary files /dev/null and b/docs/doxygen/latex/func2serv_8h__incl.pdf differ diff --git a/docs/doxygen/latex/func2serv_8h_source.tex b/docs/doxygen/latex/func2serv_8h_source.tex new file mode 100644 index 0000000..1d3a84d --- /dev/null +++ b/docs/doxygen/latex/func2serv_8h_source.tex @@ -0,0 +1,48 @@ +\doxysection{func2serv.\+h} +\hypertarget{func2serv_8h_source}{}\label{func2serv_8h_source}\index{server/func2serv.h@{server/func2serv.h}} +\mbox{\hyperlink{func2serv_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ FUNC2SERV\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ FUNC2SERV\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ } +\DoxyCodeLine{00012\ QByteArray\ \mbox{\hyperlink{func2serv_8h_a99bd96103155e73697cc47518a5559a4}{parsing}}(QString\ input,\ \textcolor{keywordtype}{int}\ socdes);} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00019\ QByteArray\ \mbox{\hyperlink{func2serv_8h_acbd6ff747a2b100b8f8da4a9b99d43c7}{auth}}(QStringList\ );} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00026\ QByteArray\ \mbox{\hyperlink{func2serv_8h_a202f69a507a4e282bb2916fea170686f}{reg}}(QStringList);} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00033\ QByteArray\ \mbox{\hyperlink{func2serv_8h_aea4bc93c1f84d34a05a2c25939dcfaac}{add\_product}}(QStringList);} +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00039\ QByteArray\ \mbox{\hyperlink{func2serv_8h_a0a88fbccc63c8cc890ded3a20fb71e72}{get\_stat}}(\textcolor{comment}{/*QStringList*/});} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00045\ QByteArray\ \mbox{\hyperlink{func2serv_8h_a6d4386c36a7ed61c61cf3d1bad354f27}{check\_task}}(\textcolor{comment}{/*QStringList*/});} +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00051\ QByteArray\ \mbox{\hyperlink{func2serv_8h_aa70831eddff4b8ed7a04647778a35747}{menu\_export}}(\textcolor{comment}{/*QStringList*/});} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00058\ QByteArray\ \mbox{\hyperlink{func2serv_8h_ab8096a94a4e4aaa7af0852f0ffc11c99}{get\_products}}(QString\ UserId);} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00064\ QByteArray\ \mbox{\hyperlink{func2serv_8h_ab8bda875989629df9b683e881296b32d}{get\_all\_users}}();} +\DoxyCodeLine{00065\ } +\DoxyCodeLine{00070\ QByteArray\ \mbox{\hyperlink{func2serv_8h_a2d521723770cde0e28bb41544394917b}{get\_stable\_stat}}();} +\DoxyCodeLine{00071\ } +\DoxyCodeLine{00076\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{func2serv_8h_a8ebcc70a2024aab70883f094fc35849e}{get\_user\_count}}();} +\DoxyCodeLine{00077\ } +\DoxyCodeLine{00082\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{func2serv_8h_a4ddd067c5a29f76aead93c977a05113a}{get\_product\_count}}();} +\DoxyCodeLine{00083\ } +\DoxyCodeLine{00088\ QByteArray\ \mbox{\hyperlink{func2serv_8h_a8a2ae0ff8263d70f4e0f30d6b0d89af7}{get\_dynamic\_stat}}();} +\DoxyCodeLine{00089\ } +\DoxyCodeLine{00094\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{func2serv_8h_a4d269e13002c5cded37bee9ade854d93}{get\_weekly\_logins}}();} +\DoxyCodeLine{00095\ } +\DoxyCodeLine{00100\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{func2serv_8h_a2d6f70d14e474616a4a16a72485c2f0e}{get\_monthly\_logins}}();} +\DoxyCodeLine{00101\ } +\DoxyCodeLine{00107\ QByteArray\ \mbox{\hyperlink{func2serv_8h_a6496e445a644cca89c6252f6e7adecb0}{add\_favorite\_ration}}(\textcolor{keyword}{const}\ QStringList\&\ container);} +\DoxyCodeLine{00108\ } +\DoxyCodeLine{00115\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{func2serv_8h_a064e99d59eaa1d8cccef20b3192df015}{add\_ration\_to\_favorites}}(\textcolor{keyword}{const}\ QString\&\ userId,\ \textcolor{keyword}{const}\ QString\&\ rationId);} +\DoxyCodeLine{00116\ } +\DoxyCodeLine{00117\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00118\ } +\DoxyCodeLine{00119\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ FUNC2SERV\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/functions__for__client_8cpp.tex b/docs/doxygen/latex/functions__for__client_8cpp.tex new file mode 100644 index 0000000..57cbb55 --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8cpp.tex @@ -0,0 +1,275 @@ +\doxysection{client/functions\+\_\+for\+\_\+client.cpp File Reference} +\hypertarget{functions__for__client_8cpp}{}\label{functions__for__client_8cpp}\index{client/functions\_for\_client.cpp@{client/functions\_for\_client.cpp}} +{\ttfamily \#include "{}functions\+\_\+for\+\_\+client.\+h"{}}\newline +{\ttfamily \#include "{}mainwindow.\+h"{}}\newline +{\ttfamily \#include "{}managerforms.\+h"{}}\newline +{\ttfamily \#include $<$QDebug$>$}\newline +{\ttfamily \#include $<$QByte\+Array$>$}\newline +{\ttfamily \#include $<$QString\+List$>$}\newline +Include dependency graph for functions\+\_\+for\+\_\+client.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{functions__for__client_8cpp__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Functions} +\begin{DoxyCompactItemize} +\item +QString \mbox{\hyperlink{functions__for__client_8cpp_af65491b695e43e33df9105ec4d8702b4}{auth}} (QString email, QString password) +\begin{DoxyCompactList}\small\item\em Авторизация пользователя. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{functions__for__client_8cpp_a9638764c61635aa7172dc25ef99ce281}{reg}} (QString login, QString password, QString email) +\begin{DoxyCompactList}\small\item\em Регистрация нового пользователя. \end{DoxyCompactList}\item +QString \mbox{\hyperlink{functions__for__client_8cpp_a80d2dcf81ccda5494a09d546d287fbf5}{get\+\_\+stable\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение стабильной статистики. \end{DoxyCompactList}\item +QString \mbox{\hyperlink{functions__for__client_8cpp_afa0e0e567062f87c4f78a1c848713dc3}{get\+\_\+dynamic\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение динамической статистики. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8cpp_ab8bda875989629df9b683e881296b32d}{get\+\_\+all\+\_\+users}} () +\begin{DoxyCompactList}\small\item\em Получение всех пользователей. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8cpp_a88bb6f910508e9101b193e736adf8385}{get\+\_\+products}} (QString id) +\begin{DoxyCompactList}\small\item\em Получение списка продуктов. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8cpp_a48a4f2da0c749370a70323e13422a698}{add\+\_\+product}} (QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type) +\begin{DoxyCompactList}\small\item\em Добавление нового продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Function Documentation} +\Hypertarget{functions__for__client_8cpp_a48a4f2da0c749370a70323e13422a698}\index{functions\_for\_client.cpp@{functions\_for\_client.cpp}!add\_product@{add\_product}} +\index{add\_product@{add\_product}!functions\_for\_client.cpp@{functions\_for\_client.cpp}} +\doxysubsubsection{\texorpdfstring{add\_product()}{add\_product()}} +{\footnotesize\ttfamily \label{functions__for__client_8cpp_a48a4f2da0c749370a70323e13422a698} +QByte\+Array add\+\_\+product (\begin{DoxyParamCaption}\item[{QString}]{id}{, }\item[{QString}]{name}{, }\item[{int}]{proteins}{, }\item[{int}]{fats}{, }\item[{int}]{carbs}{, }\item[{int}]{weight}{, }\item[{int}]{cost}{, }\item[{int}]{type}{}\end{DoxyParamCaption})} + + + +Добавление нового продукта. + + +\begin{DoxyParams}{Parameters} +{\em id} & Идентификатор пользователя. \\ +\hline +{\em name} & Название продукта. \\ +\hline +{\em proteins} & Количество белков. \\ +\hline +{\em fats} & Количество жиров. \\ +\hline +{\em carbs} & Количество углеводов. \\ +\hline +{\em weight} & Вес продукта. \\ +\hline +{\em cost} & Стоимость продукта. \\ +\hline +{\em type} & Тип продукта. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Массив байтов с результатом операции. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00078\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00079\ \ \ \ \ QStringList\ params\ =\ \{} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}add\_product"{}},} +\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ id,} +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ name,} +\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ QString::number(proteins),} +\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ QString::number(fats),} +\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ QString::number(carbs),} +\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ QString::number(weight),} +\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ QString::number(cost),} +\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ QString::number(type)} +\DoxyCodeLine{00089\ \ \ \ \ \};} +\DoxyCodeLine{00090\ \ \ \ \ QByteArray\ response\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(params);} +\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keywordflow}{return}\ response;} +\DoxyCodeLine{00092\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8cpp_af65491b695e43e33df9105ec4d8702b4}\index{functions\_for\_client.cpp@{functions\_for\_client.cpp}!auth@{auth}} +\index{auth@{auth}!functions\_for\_client.cpp@{functions\_for\_client.cpp}} +\doxysubsubsection{\texorpdfstring{auth()}{auth()}} +{\footnotesize\ttfamily \label{functions__for__client_8cpp_af65491b695e43e33df9105ec4d8702b4} +QString auth (\begin{DoxyParamCaption}\item[{QString}]{login}{, }\item[{QString}]{password}{}\end{DoxyParamCaption})} + + + +Авторизация пользователя. + + +\begin{DoxyParams}{Parameters} +{\em login} & Логин пользователя. \\ +\hline +{\em password} & Пароль пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Ответ от сервера. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00009\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00011\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00012\ } +\DoxyCodeLine{00013\ \ \ \ \ QString\ response\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(QStringList\{\textcolor{stringliteral}{"{}auth"{}},\ email,\ password\});} +\DoxyCodeLine{00014\ } +\DoxyCodeLine{00015\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Авторизация:\ "{}}\ <<\ response;} +\DoxyCodeLine{00016\ } +\DoxyCodeLine{00017\ \ \ \ \ \textcolor{keywordflow}{return}\ response;} +\DoxyCodeLine{00018\ \};} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8cpp_ab8bda875989629df9b683e881296b32d}\index{functions\_for\_client.cpp@{functions\_for\_client.cpp}!get\_all\_users@{get\_all\_users}} +\index{get\_all\_users@{get\_all\_users}!functions\_for\_client.cpp@{functions\_for\_client.cpp}} +\doxysubsubsection{\texorpdfstring{get\_all\_users()}{get\_all\_users()}} +{\footnotesize\ttfamily \label{functions__for__client_8cpp_ab8bda875989629df9b683e881296b32d} +QByte\+Array get\+\_\+all\+\_\+users (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение всех пользователей. + +Получение списка всех пользователей. + +\begin{DoxyReturn}{Returns} +Список всех пользователей в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \ \ \ \ QByteArray\ stat\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(QStringList\{\textcolor{stringliteral}{"{}admin"{}},\ \textcolor{stringliteral}{"{}get\_all\_users"{}}\});} +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keywordflow}{return}\ stat;} +\DoxyCodeLine{00063\ \};} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8cpp_afa0e0e567062f87c4f78a1c848713dc3}\index{functions\_for\_client.cpp@{functions\_for\_client.cpp}!get\_dynamic\_stat@{get\_dynamic\_stat}} +\index{get\_dynamic\_stat@{get\_dynamic\_stat}!functions\_for\_client.cpp@{functions\_for\_client.cpp}} +\doxysubsubsection{\texorpdfstring{get\_dynamic\_stat()}{get\_dynamic\_stat()}} +{\footnotesize\ttfamily \label{functions__for__client_8cpp_afa0e0e567062f87c4f78a1c848713dc3} +QString get\+\_\+dynamic\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение динамической статистики. + +\begin{DoxyReturn}{Returns} +Динамическая статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00047\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ \ \ \ \ QString\ stat\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(QStringList\{\textcolor{stringliteral}{"{}admin"{}},\ \textcolor{stringliteral}{"{}dynamic\_stat"{}}\});} +\DoxyCodeLine{00050\ } +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keywordflow}{return}\ stat;} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \};} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8cpp_a88bb6f910508e9101b193e736adf8385}\index{functions\_for\_client.cpp@{functions\_for\_client.cpp}!get\_products@{get\_products}} +\index{get\_products@{get\_products}!functions\_for\_client.cpp@{functions\_for\_client.cpp}} +\doxysubsubsection{\texorpdfstring{get\_products()}{get\_products()}} +{\footnotesize\ttfamily \label{functions__for__client_8cpp_a88bb6f910508e9101b193e736adf8385} +QByte\+Array get\+\_\+products (\begin{DoxyParamCaption}\item[{QString}]{User\+Id}{}\end{DoxyParamCaption})} + + + +Получение списка продуктов. + +Получение всех продуктов пользователя. + + +\begin{DoxyParams}{Parameters} +{\em User\+Id} & Идентификатор пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Список продуктов в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00067\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00068\ } +\DoxyCodeLine{00069\ \ \ \ \ QStringList\ params\ =\ \{\textcolor{stringliteral}{"{}user"{}},\ id,\ \textcolor{stringliteral}{"{}get\_products"{}}\};} +\DoxyCodeLine{00070\ } +\DoxyCodeLine{00071\ \ \ \ \ QByteArray\ response\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(params);} +\DoxyCodeLine{00072\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Сырой\ ответ\ от\ сервера\ (JSON):\ "{}}\ <<\ response;} +\DoxyCodeLine{00073\ } +\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keywordflow}{return}\ response;\ \ \textcolor{comment}{//\ <-\/-\/\ просто\ возвращаем\ JSON\ байты,\ пусть\ парсинг\ делает\ кликер}} +\DoxyCodeLine{00075\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8cpp_a80d2dcf81ccda5494a09d546d287fbf5}\index{functions\_for\_client.cpp@{functions\_for\_client.cpp}!get\_stable\_stat@{get\_stable\_stat}} +\index{get\_stable\_stat@{get\_stable\_stat}!functions\_for\_client.cpp@{functions\_for\_client.cpp}} +\doxysubsubsection{\texorpdfstring{get\_stable\_stat()}{get\_stable\_stat()}} +{\footnotesize\ttfamily \label{functions__for__client_8cpp_a80d2dcf81ccda5494a09d546d287fbf5} +QString get\+\_\+stable\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение стабильной статистики. + +\begin{DoxyReturn}{Returns} +Стабильная статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00037\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00038\ } +\DoxyCodeLine{00039\ \ \ \ \ QString\ stat\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(QStringList\{\textcolor{stringliteral}{"{}admin"{}},\ \textcolor{stringliteral}{"{}stable\_stat"{}}\});} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keywordflow}{return}\ stat;} +\DoxyCodeLine{00042\ } +\DoxyCodeLine{00043\ \};} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8cpp_a9638764c61635aa7172dc25ef99ce281}\index{functions\_for\_client.cpp@{functions\_for\_client.cpp}!reg@{reg}} +\index{reg@{reg}!functions\_for\_client.cpp@{functions\_for\_client.cpp}} +\doxysubsubsection{\texorpdfstring{reg()}{reg()}} +{\footnotesize\ttfamily \label{functions__for__client_8cpp_a9638764c61635aa7172dc25ef99ce281} +bool reg (\begin{DoxyParamCaption}\item[{QString}]{login}{, }\item[{QString}]{password}{, }\item[{QString}]{email}{}\end{DoxyParamCaption})} + + + +Регистрация нового пользователя. + + +\begin{DoxyParams}{Parameters} +{\em login} & Логин пользователя. \\ +\hline +{\em password} & Пароль. \\ +\hline +{\em email} & Электронная почта. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если регистрация успешна; иначе — false. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00020\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00022\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \ \ \ \ QString\ response\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(QStringList\{\textcolor{stringliteral}{"{}reg"{}},\ login,\ email,\ password\});} +\DoxyCodeLine{00025\ } +\DoxyCodeLine{00026\ \ \ \ \ QStringList\ parts\ =\ response.split(\textcolor{stringliteral}{"{}//"{}});} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \ \ \ \ \textcolor{comment}{//\ проверка\ на\ успешность\ регистрации}} +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keywordflow}{if}\ (parts[0]\ ==\ \textcolor{stringliteral}{"{}reg\_success"{}})\ \{} +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};} +\DoxyCodeLine{00031\ \ \ \ \ \}} +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} +\DoxyCodeLine{00033\ \};} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/functions__for__client_8cpp__incl.dot b/docs/doxygen/latex/functions__for__client_8cpp__incl.dot new file mode 100644 index 0000000..8493eb5 --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8cpp__incl.dot @@ -0,0 +1,56 @@ +digraph "client/functions_for_client.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge31_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge32_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge33_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge34_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge35_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node7 [id="edge36_Node000004_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node8 [id="edge37_Node000004_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node9 [id="edge38_Node000004_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node10 [id="edge39_Node000004_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node11 [id="edge40_Node000001_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node11 -> Node12 [id="edge41_Node000011_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node11 -> Node2 [id="edge42_Node000011_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node11 -> Node13 [id="edge43_Node000011_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node13 -> Node14 [id="edge44_Node000013_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node11 -> Node15 [id="edge45_Node000011_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node15 -> Node14 [id="edge46_Node000015_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node11 -> Node16 [id="edge47_Node000011_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node17 [id="edge48_Node000001_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node17 -> Node12 [id="edge49_Node000017_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node18 [id="edge50_Node000017_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node18 -> Node14 [id="edge51_Node000018_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node18 -> Node16 [id="edge52_Node000018_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node19 [id="edge53_Node000017_Node000019",color="steelblue1",style="solid",tooltip=" "]; + Node19 [id="Node000019",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node19 -> Node12 [id="edge54_Node000019_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node19 -> Node2 [id="edge55_Node000019_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node11 [id="edge56_Node000017_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node4 [id="edge57_Node000017_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node9 [id="edge58_Node000001_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node8 [id="edge59_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node10 [id="edge60_Node000001_Node000010",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/latex/functions__for__client_8cpp__incl.md5 b/docs/doxygen/latex/functions__for__client_8cpp__incl.md5 new file mode 100644 index 0000000..e19787e --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8cpp__incl.md5 @@ -0,0 +1 @@ +b5cdf621b9d4b106d1ac3204990fc34b \ No newline at end of file diff --git a/docs/doxygen/latex/functions__for__client_8cpp__incl.pdf b/docs/doxygen/latex/functions__for__client_8cpp__incl.pdf new file mode 100644 index 0000000..4db30df Binary files /dev/null and b/docs/doxygen/latex/functions__for__client_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/functions__for__client_8h.tex b/docs/doxygen/latex/functions__for__client_8h.tex new file mode 100644 index 0000000..80901b1 --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8h.tex @@ -0,0 +1,559 @@ +\doxysection{client/functions\+\_\+for\+\_\+client.h File Reference} +\hypertarget{functions__for__client_8h}{}\label{functions__for__client_8h}\index{client/functions\_for\_client.h@{client/functions\_for\_client.h}} +{\ttfamily \#include $<$QString$>$}\newline +{\ttfamily \#include "{}Singleton.\+h"{}}\newline +Include dependency graph for functions\+\_\+for\+\_\+client.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{functions__for__client_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{functions__for__client_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Functions} +\begin{DoxyCompactItemize} +\item +QString \mbox{\hyperlink{functions__for__client_8h_aaeef61cff0ff956865a7521c007e41cc}{auth}} (QString login, QString password) +\begin{DoxyCompactList}\small\item\em Авторизация пользователя. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{functions__for__client_8h_a9638764c61635aa7172dc25ef99ce281}{reg}} (QString login, QString password, QString email) +\begin{DoxyCompactList}\small\item\em Регистрация нового пользователя. \end{DoxyCompactList}\item +QString \mbox{\hyperlink{functions__for__client_8h_a80d2dcf81ccda5494a09d546d287fbf5}{get\+\_\+stable\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение стабильной статистики. \end{DoxyCompactList}\item +QString \mbox{\hyperlink{functions__for__client_8h_afa0e0e567062f87c4f78a1c848713dc3}{get\+\_\+dynamic\+\_\+stat}} () +\begin{DoxyCompactList}\small\item\em Получение динамической статистики. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8h_ab8bda875989629df9b683e881296b32d}{get\+\_\+all\+\_\+users}} () +\begin{DoxyCompactList}\small\item\em Получение списка всех пользователей. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8h_a6d4386c36a7ed61c61cf3d1bad354f27}{check\+\_\+task}} () +\begin{DoxyCompactList}\small\item\em Проверка задачи (рациона). \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8h_aa70831eddff4b8ed7a04647778a35747}{menu\+\_\+export}} () +\begin{DoxyCompactList}\small\item\em Экспорт меню. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8h_a73b3ae758a8cf3621318d27cd1a17722}{get\+\_\+products}} (QString user\+Id) +\begin{DoxyCompactList}\small\item\em Получение всех продуктов пользователя. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8h_a48a4f2da0c749370a70323e13422a698}{add\+\_\+product}} (QString id, QString name, int proteins, int fats, int carbs, int weight, int cost, int type) +\begin{DoxyCompactList}\small\item\em Добавление нового продукта. \end{DoxyCompactList}\item +int \mbox{\hyperlink{functions__for__client_8h_a8ebcc70a2024aab70883f094fc35849e}{get\+\_\+user\+\_\+count}} () +\begin{DoxyCompactList}\small\item\em Получение общего количества пользователей. \end{DoxyCompactList}\item +int \mbox{\hyperlink{functions__for__client_8h_a4ddd067c5a29f76aead93c977a05113a}{get\+\_\+product\+\_\+count}} () +\begin{DoxyCompactList}\small\item\em Получение общего количества продуктов. \end{DoxyCompactList}\item +int \mbox{\hyperlink{functions__for__client_8h_a4d269e13002c5cded37bee9ade854d93}{get\+\_\+weekly\+\_\+logins}} () +\begin{DoxyCompactList}\small\item\em Получение количества входов за неделю. \end{DoxyCompactList}\item +int \mbox{\hyperlink{functions__for__client_8h_a2d6f70d14e474616a4a16a72485c2f0e}{get\+\_\+monthly\+\_\+logins}} () +\begin{DoxyCompactList}\small\item\em Получение количества входов за месяц. \end{DoxyCompactList}\item +QByte\+Array \mbox{\hyperlink{functions__for__client_8h_a6496e445a644cca89c6252f6e7adecb0}{add\+\_\+favorite\+\_\+ration}} (const QString\+List \&container) +\begin{DoxyCompactList}\small\item\em Добавление рациона в избранное. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{functions__for__client_8h_a064e99d59eaa1d8cccef20b3192df015}{add\+\_\+ration\+\_\+to\+\_\+favorites}} (const QString \&user\+Id, const QString \&ration\+Id) +\begin{DoxyCompactList}\small\item\em Добавление существующего рациона в избранное. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Function Documentation} +\Hypertarget{functions__for__client_8h_a6496e445a644cca89c6252f6e7adecb0}\index{functions\_for\_client.h@{functions\_for\_client.h}!add\_favorite\_ration@{add\_favorite\_ration}} +\index{add\_favorite\_ration@{add\_favorite\_ration}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{add\_favorite\_ration()}{add\_favorite\_ration()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a6496e445a644cca89c6252f6e7adecb0} +QByte\+Array add\+\_\+favorite\+\_\+ration (\begin{DoxyParamCaption}\item[{const QString\+List \&}]{container}{}\end{DoxyParamCaption})} + + + +Добавление рациона в избранное. + + +\begin{DoxyParams}{Parameters} +{\em container} & Контейнер с параметрами рациона. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Массив байтов с результатом добавления. +\end{DoxyReturn} + +\begin{DoxyParams}{Parameters} +{\em container} & Список данных. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат добавления в избранное в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00294\ \ \ \ \ QString\ userId\ =\ container[1];\ \textcolor{comment}{//\ ID\ пользователя}} +\DoxyCodeLine{00295\ \ \ \ \ QString\ rationId\ =\ container[2];\ \textcolor{comment}{//\ ID\ рациона}} +\DoxyCodeLine{00296\ } +\DoxyCodeLine{00297\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ \mbox{\hyperlink{func2serv_8cpp_a064e99d59eaa1d8cccef20b3192df015}{add\_ration\_to\_favorites}}(userId,\ rationId);\ \textcolor{comment}{//\ Вызов\ функции-\/заглушки}} +\DoxyCodeLine{00298\ } +\DoxyCodeLine{00299\ \ \ \ \ \textcolor{keywordflow}{if}\ (success)\ \{} +\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Ration\ successfully\ added\ to\ favorites\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00301\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{} +\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Error:\ failed\ to\ add\ ration\ to\ favorites\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00303\ \ \ \ \ \}} +\DoxyCodeLine{00304\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a48a4f2da0c749370a70323e13422a698}\index{functions\_for\_client.h@{functions\_for\_client.h}!add\_product@{add\_product}} +\index{add\_product@{add\_product}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{add\_product()}{add\_product()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a48a4f2da0c749370a70323e13422a698} +QByte\+Array add\+\_\+product (\begin{DoxyParamCaption}\item[{QString}]{id}{, }\item[{QString}]{name}{, }\item[{int}]{proteins}{, }\item[{int}]{fats}{, }\item[{int}]{carbs}{, }\item[{int}]{weight}{, }\item[{int}]{cost}{, }\item[{int}]{type}{}\end{DoxyParamCaption})} + + + +Добавление нового продукта. + + +\begin{DoxyParams}{Parameters} +{\em id} & Идентификатор пользователя. \\ +\hline +{\em name} & Название продукта. \\ +\hline +{\em proteins} & Количество белков. \\ +\hline +{\em fats} & Количество жиров. \\ +\hline +{\em carbs} & Количество углеводов. \\ +\hline +{\em weight} & Вес продукта. \\ +\hline +{\em cost} & Стоимость продукта. \\ +\hline +{\em type} & Тип продукта. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Массив байтов с результатом операции. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00078\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00079\ \ \ \ \ QStringList\ params\ =\ \{} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}add\_product"{}},} +\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ id,} +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ name,} +\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ QString::number(proteins),} +\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ QString::number(fats),} +\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ QString::number(carbs),} +\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ QString::number(weight),} +\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ QString::number(cost),} +\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ QString::number(type)} +\DoxyCodeLine{00089\ \ \ \ \ \};} +\DoxyCodeLine{00090\ \ \ \ \ QByteArray\ response\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(params);} +\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keywordflow}{return}\ response;} +\DoxyCodeLine{00092\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a064e99d59eaa1d8cccef20b3192df015}\index{functions\_for\_client.h@{functions\_for\_client.h}!add\_ration\_to\_favorites@{add\_ration\_to\_favorites}} +\index{add\_ration\_to\_favorites@{add\_ration\_to\_favorites}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{add\_ration\_to\_favorites()}{add\_ration\_to\_favorites()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a064e99d59eaa1d8cccef20b3192df015} +bool add\+\_\+ration\+\_\+to\+\_\+favorites (\begin{DoxyParamCaption}\item[{const QString \&}]{user\+Id}{, }\item[{const QString \&}]{ration\+Id}{}\end{DoxyParamCaption})} + + + +Добавление существующего рациона в избранное. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +{\em ration\+Id} & Идентификатор рациона. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если успешно; иначе — false. +\end{DoxyReturn} +Добавление существующего рациона в избранное. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +{\em ration\+Id} & Идентификатор рациона. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Результат добавления в избранное. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00306\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Adding\ ration\ for\ user:"{}}\ <<\ userId\ <<\ \textcolor{stringliteral}{"{},\ ration\ ID:"{}}\ <<\ rationId;} +\DoxyCodeLine{00307\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};\ \textcolor{comment}{//\ Заглушка,\ потом\ заменить\ на\ SQL-\/запрос}} +\DoxyCodeLine{00308\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_aaeef61cff0ff956865a7521c007e41cc}\index{functions\_for\_client.h@{functions\_for\_client.h}!auth@{auth}} +\index{auth@{auth}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{auth()}{auth()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_aaeef61cff0ff956865a7521c007e41cc} +QString auth (\begin{DoxyParamCaption}\item[{QString}]{login}{, }\item[{QString}]{password}{}\end{DoxyParamCaption})} + + + +Авторизация пользователя. + + +\begin{DoxyParams}{Parameters} +{\em login} & Логин пользователя. \\ +\hline +{\em password} & Пароль пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Ответ от сервера. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00009\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00011\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00012\ } +\DoxyCodeLine{00013\ \ \ \ \ QString\ response\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(QStringList\{\textcolor{stringliteral}{"{}auth"{}},\ email,\ password\});} +\DoxyCodeLine{00014\ } +\DoxyCodeLine{00015\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Авторизация:\ "{}}\ <<\ response;} +\DoxyCodeLine{00016\ } +\DoxyCodeLine{00017\ \ \ \ \ \textcolor{keywordflow}{return}\ response;} +\DoxyCodeLine{00018\ \};} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a6d4386c36a7ed61c61cf3d1bad354f27}\index{functions\_for\_client.h@{functions\_for\_client.h}!check\_task@{check\_task}} +\index{check\_task@{check\_task}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{check\_task()}{check\_task()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a6d4386c36a7ed61c61cf3d1bad354f27} +QByte\+Array check\+\_\+task (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Проверка задачи (рациона). + +\begin{DoxyReturn}{Returns} +Массив байтов с результатом проверки. +\end{DoxyReturn} +Проверка задачи (рациона). + +\begin{DoxyReturn}{Returns} +Результат проверки задания в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00204\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Task\ was\ succesful\ completed\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00205\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_ab8bda875989629df9b683e881296b32d}\index{functions\_for\_client.h@{functions\_for\_client.h}!get\_all\_users@{get\_all\_users}} +\index{get\_all\_users@{get\_all\_users}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{get\_all\_users()}{get\_all\_users()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_ab8bda875989629df9b683e881296b32d} +QByte\+Array get\+\_\+all\+\_\+users (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение списка всех пользователей. + +\begin{DoxyReturn}{Returns} +Массив байтов с данными пользователей. +\end{DoxyReturn} +Получение списка всех пользователей. + +\begin{DoxyReturn}{Returns} +Список всех пользователей в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00236\ \ \ \ \ QStringList\ users;} +\DoxyCodeLine{00237\ } +\DoxyCodeLine{00238\ \ \ \ \ \textcolor{comment}{//\ fetch\_users\_from\_db(users);}} +\DoxyCodeLine{00239\ } +\DoxyCodeLine{00240\ \ \ \ \ QString\ response;} +\DoxyCodeLine{00241\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ QString\&\ user\ :\ users)\ \{} +\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ response\ +=\ user\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00243\ \ \ \ \ \}} +\DoxyCodeLine{00244\ } +\DoxyCodeLine{00245\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00246\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_afa0e0e567062f87c4f78a1c848713dc3}\index{functions\_for\_client.h@{functions\_for\_client.h}!get\_dynamic\_stat@{get\_dynamic\_stat}} +\index{get\_dynamic\_stat@{get\_dynamic\_stat}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{get\_dynamic\_stat()}{get\_dynamic\_stat()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_afa0e0e567062f87c4f78a1c848713dc3} +QString get\+\_\+dynamic\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение динамической статистики. + +\begin{DoxyReturn}{Returns} +JSON-\/строка с данными статистики. + +Динамическая статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00280\ \ \ \ \ \textcolor{keywordtype}{int}\ weeklyLogins\ =\ 0;} +\DoxyCodeLine{00281\ \ \ \ \ \textcolor{keywordtype}{int}\ monthlyLogins\ =\ 0;} +\DoxyCodeLine{00282\ } +\DoxyCodeLine{00283\ \ \ \ \ \textcolor{comment}{//\ Получаем\ данные\ из\ БД\ (пока\ заглушки)}} +\DoxyCodeLine{00284\ \ \ \ \ weeklyLogins\ =\ \mbox{\hyperlink{func2serv_8cpp_a4d269e13002c5cded37bee9ade854d93}{get\_weekly\_logins}}();} +\DoxyCodeLine{00285\ \ \ \ \ monthlyLogins\ =\ \mbox{\hyperlink{func2serv_8cpp_a2d6f70d14e474616a4a16a72485c2f0e}{get\_monthly\_logins}}();} +\DoxyCodeLine{00286\ } +\DoxyCodeLine{00287\ \ \ \ \ \textcolor{comment}{//\ Формируем\ строку\ ответа}} +\DoxyCodeLine{00288\ \ \ \ \ QString\ response\ =\ \textcolor{stringliteral}{"{}Logins\ per\ week:\ "{}}\ +\ QString::number(weeklyLogins)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}}\ +} +\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Logins\ per\ month:\ "{}}\ +\ QString::number(monthlyLogins)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00290\ } +\DoxyCodeLine{00291\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00292\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a2d6f70d14e474616a4a16a72485c2f0e}\index{functions\_for\_client.h@{functions\_for\_client.h}!get\_monthly\_logins@{get\_monthly\_logins}} +\index{get\_monthly\_logins@{get\_monthly\_logins}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{get\_monthly\_logins()}{get\_monthly\_logins()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a2d6f70d14e474616a4a16a72485c2f0e} +int get\+\_\+monthly\+\_\+logins (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества входов за месяц. + +\begin{DoxyReturn}{Returns} +Количество входов. + +Количество входов за месяц. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00275\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00276\ \ \ \ \ \textcolor{comment}{//\ Заглушка,\ пока\ без\ БД}} +\DoxyCodeLine{00277\ \ \ \ \ \textcolor{keywordflow}{return}\ 312;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00278\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a4ddd067c5a29f76aead93c977a05113a}\index{functions\_for\_client.h@{functions\_for\_client.h}!get\_product\_count@{get\_product\_count}} +\index{get\_product\_count@{get\_product\_count}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{get\_product\_count()}{get\_product\_count()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a4ddd067c5a29f76aead93c977a05113a} +int get\+\_\+product\+\_\+count (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение общего количества продуктов. + +\begin{DoxyReturn}{Returns} +Количество продуктов. +\end{DoxyReturn} +Получение общего количества продуктов. + +\begin{DoxyReturn}{Returns} +Количество продуктов. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00253\ \ \ \ \ \textcolor{comment}{//\ Здесь\ будет\ SQL-\/запрос,\ пока\ заглушка}} +\DoxyCodeLine{00254\ \ \ \ \ \textcolor{keywordflow}{return}\ 732;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00255\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a73b3ae758a8cf3621318d27cd1a17722}\index{functions\_for\_client.h@{functions\_for\_client.h}!get\_products@{get\_products}} +\index{get\_products@{get\_products}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{get\_products()}{get\_products()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a73b3ae758a8cf3621318d27cd1a17722} +QByte\+Array get\+\_\+products (\begin{DoxyParamCaption}\item[{QString}]{user\+Id}{}\end{DoxyParamCaption})} + + + +Получение всех продуктов пользователя. + + +\begin{DoxyParams}{Parameters} +{\em user\+Id} & Идентификатор пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Массив байтов с продуктами. +\end{DoxyReturn} +Получение всех продуктов пользователя. + + +\begin{DoxyParams}{Parameters} +{\em User\+Id} & Идентификатор пользователя. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Список продуктов в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00217\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00218\ \ \ \ \ \textcolor{keywordtype}{int}\ userIdInt\ =\ userId.toInt();} +\DoxyCodeLine{00219\ \ \ \ \ QVector\ products\ =\ db-\/>\mbox{\hyperlink{class_data_base_singleton_a84fe7936dd15c077eff86d7884ce3049}{getProductsByUser}}(userIdInt);} +\DoxyCodeLine{00220\ } +\DoxyCodeLine{00221\ \ \ \ \ QJsonArray\ jsonArray;} +\DoxyCodeLine{00222\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ QVariantMap\&\ product\ :\ products)\ \{} +\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ QJsonObject\ obj\ =\ QJsonObject::fromVariantMap(product);} +\DoxyCodeLine{00224\ \ \ \ \ \ \ \ \ jsonArray.append(obj);} +\DoxyCodeLine{00225\ \ \ \ \ \}} +\DoxyCodeLine{00226\ } +\DoxyCodeLine{00227\ \ \ \ \ QJsonDocument\ doc(jsonArray);} +\DoxyCodeLine{00228\ \ \ \ \ QByteArray\ jsonBytes\ =\ doc.toJson(QJsonDocument::Compact);} +\DoxyCodeLine{00229\ } +\DoxyCodeLine{00230\ \ \ \ \ qDebug()\ <<\ \textcolor{stringliteral}{"{}Отправляем\ продукты\ в\ виде\ JSON:"{}}\ <<\ jsonBytes;} +\DoxyCodeLine{00231\ } +\DoxyCodeLine{00232\ \ \ \ \ \textcolor{keywordflow}{return}\ jsonBytes;} +\DoxyCodeLine{00233\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a80d2dcf81ccda5494a09d546d287fbf5}\index{functions\_for\_client.h@{functions\_for\_client.h}!get\_stable\_stat@{get\_stable\_stat}} +\index{get\_stable\_stat@{get\_stable\_stat}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{get\_stable\_stat()}{get\_stable\_stat()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a80d2dcf81ccda5494a09d546d287fbf5} +QString get\+\_\+stable\+\_\+stat (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение стабильной статистики. + +\begin{DoxyReturn}{Returns} +JSON-\/строка с данными статистики. + +Стабильная статистика в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00257\ } +\DoxyCodeLine{00258\ \ \ \ \ \textcolor{keywordtype}{int}\ userCount\ =\ 0;} +\DoxyCodeLine{00259\ \ \ \ \ \textcolor{keywordtype}{int}\ productCount\ =\ 0;} +\DoxyCodeLine{00260\ } +\DoxyCodeLine{00261\ \ \ \ \ userCount\ =\ \mbox{\hyperlink{func2serv_8cpp_a8ebcc70a2024aab70883f094fc35849e}{get\_user\_count}}();} +\DoxyCodeLine{00262\ \ \ \ \ productCount\ =\ \mbox{\hyperlink{func2serv_8cpp_a4ddd067c5a29f76aead93c977a05113a}{get\_product\_count}}();} +\DoxyCodeLine{00263\ } +\DoxyCodeLine{00264\ \ \ \ \ \textcolor{comment}{//\ Формируем\ строку\ ответа}} +\DoxyCodeLine{00265\ \ \ \ \ QString\ response\ =\ \textcolor{stringliteral}{"{}Users:\ "{}}\ +\ QString::number(userCount)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}}\ +} +\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Products:\ "{}}\ +\ QString::number(productCount)\ +\ \textcolor{stringliteral}{"{}\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00267\ } +\DoxyCodeLine{00268\ \ \ \ \ \textcolor{keywordflow}{return}\ response.toUtf8();} +\DoxyCodeLine{00269\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a8ebcc70a2024aab70883f094fc35849e}\index{functions\_for\_client.h@{functions\_for\_client.h}!get\_user\_count@{get\_user\_count}} +\index{get\_user\_count@{get\_user\_count}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{get\_user\_count()}{get\_user\_count()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a8ebcc70a2024aab70883f094fc35849e} +int get\+\_\+user\+\_\+count (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение общего количества пользователей. + +\begin{DoxyReturn}{Returns} +Количество пользователей. +\end{DoxyReturn} +Получение общего количества пользователей. + +\begin{DoxyReturn}{Returns} +Количество пользователей. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00248\ \ \ \ \ \textcolor{comment}{//\ Здесь\ будет\ SQL-\/запрос,\ пока\ заглушка}} +\DoxyCodeLine{00249\ \ \ \ \ \textcolor{keywordflow}{return}\ 152;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00250\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a4d269e13002c5cded37bee9ade854d93}\index{functions\_for\_client.h@{functions\_for\_client.h}!get\_weekly\_logins@{get\_weekly\_logins}} +\index{get\_weekly\_logins@{get\_weekly\_logins}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{get\_weekly\_logins()}{get\_weekly\_logins()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a4d269e13002c5cded37bee9ade854d93} +int get\+\_\+weekly\+\_\+logins (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Получение количества входов за неделю. + +\begin{DoxyReturn}{Returns} +Количество входов. + +Количество входов за неделю. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00270\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00271\ \ \ \ \ \textcolor{comment}{//\ Заглушка,\ пока\ без\ БД}} +\DoxyCodeLine{00272\ \ \ \ \ \textcolor{keywordflow}{return}\ 78;\ \textcolor{comment}{//\ Примерное\ значение}} +\DoxyCodeLine{00273\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_aa70831eddff4b8ed7a04647778a35747}\index{functions\_for\_client.h@{functions\_for\_client.h}!menu\_export@{menu\_export}} +\index{menu\_export@{menu\_export}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{menu\_export()}{menu\_export()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_aa70831eddff4b8ed7a04647778a35747} +QByte\+Array menu\+\_\+export (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})} + + + +Экспорт меню. + +\begin{DoxyReturn}{Returns} +Массив байтов с экспортированными данными. + +Результат экспорта меню в виде QByte\+Array. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00207\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Меню\ успешно\ экспортировано!\(\backslash\)r\(\backslash\)n"{}};} +\DoxyCodeLine{00208\ \}} + +\end{DoxyCode} +\Hypertarget{functions__for__client_8h_a9638764c61635aa7172dc25ef99ce281}\index{functions\_for\_client.h@{functions\_for\_client.h}!reg@{reg}} +\index{reg@{reg}!functions\_for\_client.h@{functions\_for\_client.h}} +\doxysubsubsection{\texorpdfstring{reg()}{reg()}} +{\footnotesize\ttfamily \label{functions__for__client_8h_a9638764c61635aa7172dc25ef99ce281} +bool reg (\begin{DoxyParamCaption}\item[{QString}]{login}{, }\item[{QString}]{password}{, }\item[{QString}]{email}{}\end{DoxyParamCaption})} + + + +Регистрация нового пользователя. + + +\begin{DoxyParams}{Parameters} +{\em login} & Логин пользователя. \\ +\hline +{\em password} & Пароль. \\ +\hline +{\em email} & Электронная почта. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +true, если регистрация успешна; иначе — false. +\end{DoxyReturn} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00020\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00022\ \ \ \ \ \mbox{\hyperlink{class_client_singleton}{ClientSingleton}}\&\ client\ =\ \mbox{\hyperlink{class_client_singleton_addfb20092076c2a67a058b26f7bc399a}{ClientSingleton::getInstance}}();} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \ \ \ \ QString\ response\ =\ client.\mbox{\hyperlink{class_client_singleton_af0ffa3bef8214e9929b4a04293c15564}{send\_msg}}(QStringList\{\textcolor{stringliteral}{"{}reg"{}},\ login,\ email,\ password\});} +\DoxyCodeLine{00025\ } +\DoxyCodeLine{00026\ \ \ \ \ QStringList\ parts\ =\ response.split(\textcolor{stringliteral}{"{}//"{}});} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \ \ \ \ \textcolor{comment}{//\ проверка\ на\ успешность\ регистрации}} +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keywordflow}{if}\ (parts[0]\ ==\ \textcolor{stringliteral}{"{}reg\_success"{}})\ \{} +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};} +\DoxyCodeLine{00031\ \ \ \ \ \}} +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} +\DoxyCodeLine{00033\ \};} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/functions__for__client_8h__dep__incl.dot b/docs/doxygen/latex/functions__for__client_8h__dep__incl.dot new file mode 100644 index 0000000..f9c0491 --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8h__dep__incl.dot @@ -0,0 +1,27 @@ +digraph "client/functions_for_client.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/functions_for\l_client.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge12_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge13_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/authregwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8cpp.html",tooltip=" "]; + Node2 -> Node4 [id="edge14_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge15_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node4 -> Node6 [id="edge16_Node000004_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node4 -> Node7 [id="edge17_Node000004_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; + Node1 -> Node5 [id="edge18_Node000001_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node8 [id="edge19_Node000001_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="client/mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node8 -> Node5 [id="edge20_Node000008_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 -> Node9 [id="edge21_Node000008_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node8 -> Node4 [id="edge22_Node000008_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/latex/functions__for__client_8h__dep__incl.md5 b/docs/doxygen/latex/functions__for__client_8h__dep__incl.md5 new file mode 100644 index 0000000..6a19bbd --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8h__dep__incl.md5 @@ -0,0 +1 @@ +c1b6604c890acded7bcb28dbdfcc1f81 \ No newline at end of file diff --git a/docs/doxygen/latex/functions__for__client_8h__dep__incl.pdf b/docs/doxygen/latex/functions__for__client_8h__dep__incl.pdf new file mode 100644 index 0000000..338d052 Binary files /dev/null and b/docs/doxygen/latex/functions__for__client_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/functions__for__client_8h__incl.dot b/docs/doxygen/latex/functions__for__client_8h__incl.dot new file mode 100644 index 0000000..63cd197 --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8h__incl.dot @@ -0,0 +1,24 @@ +digraph "client/functions_for_client.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/functions_for\l_client.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge9_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge10_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge11_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node5 [id="edge12_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node6 [id="edge13_Node000003_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node7 [id="edge14_Node000003_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node8 [id="edge15_Node000003_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node9 [id="edge16_Node000003_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/functions__for__client_8h__incl.md5 b/docs/doxygen/latex/functions__for__client_8h__incl.md5 new file mode 100644 index 0000000..5ed817b --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8h__incl.md5 @@ -0,0 +1 @@ +507cb8fe4066875cd6ec09074d1e65db \ No newline at end of file diff --git a/docs/doxygen/latex/functions__for__client_8h__incl.pdf b/docs/doxygen/latex/functions__for__client_8h__incl.pdf new file mode 100644 index 0000000..6fd38b7 Binary files /dev/null and b/docs/doxygen/latex/functions__for__client_8h__incl.pdf differ diff --git a/docs/doxygen/latex/functions__for__client_8h_source.tex b/docs/doxygen/latex/functions__for__client_8h_source.tex new file mode 100644 index 0000000..be71e32 --- /dev/null +++ b/docs/doxygen/latex/functions__for__client_8h_source.tex @@ -0,0 +1,43 @@ +\doxysection{functions\+\_\+for\+\_\+client.\+h} +\hypertarget{functions__for__client_8h_source}{}\label{functions__for__client_8h_source}\index{client/functions\_for\_client.h@{client/functions\_for\_client.h}} +\mbox{\hyperlink{functions__for__client_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ FUNCTIONS\_FOR\_CLIENT\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ FUNCTIONS\_FOR\_CLIENT\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_singleton_8h}{Singleton.h}}"{}}} +\DoxyCodeLine{00006\ } +\DoxyCodeLine{00013\ QString\ \mbox{\hyperlink{functions__for__client_8h_aaeef61cff0ff956865a7521c007e41cc}{auth}}(QString\ login,\ QString\ password);} +\DoxyCodeLine{00014\ } +\DoxyCodeLine{00022\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{functions__for__client_8h_a9638764c61635aa7172dc25ef99ce281}{reg}}(QString\ login,\ QString\ password,\ QString\ email);} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00028\ QString\ \mbox{\hyperlink{functions__for__client_8h_a80d2dcf81ccda5494a09d546d287fbf5}{get\_stable\_stat}}();} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00034\ QString\ \mbox{\hyperlink{functions__for__client_8h_afa0e0e567062f87c4f78a1c848713dc3}{get\_dynamic\_stat}}();} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00040\ QByteArray\ \mbox{\hyperlink{functions__for__client_8h_ab8bda875989629df9b683e881296b32d}{get\_all\_users}}();} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00046\ QByteArray\ \mbox{\hyperlink{functions__for__client_8h_a6d4386c36a7ed61c61cf3d1bad354f27}{check\_task}}();} +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00052\ QByteArray\ \mbox{\hyperlink{functions__for__client_8h_aa70831eddff4b8ed7a04647778a35747}{menu\_export}}();} +\DoxyCodeLine{00053\ } +\DoxyCodeLine{00059\ QByteArray\ \mbox{\hyperlink{functions__for__client_8h_a73b3ae758a8cf3621318d27cd1a17722}{get\_products}}(QString\ userId);} +\DoxyCodeLine{00060\ } +\DoxyCodeLine{00073\ QByteArray\ \mbox{\hyperlink{functions__for__client_8h_a48a4f2da0c749370a70323e13422a698}{add\_product}}(QString\ \textcolor{keywordtype}{id},\ QString\ name,\ \textcolor{keywordtype}{int}\ proteins,\ \textcolor{keywordtype}{int}\ fats,\ \textcolor{keywordtype}{int}\ carbs,\ \textcolor{keywordtype}{int}\ weight,\ \textcolor{keywordtype}{int}\ cost,\ \textcolor{keywordtype}{int}\ type);} +\DoxyCodeLine{00074\ } +\DoxyCodeLine{00079\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{functions__for__client_8h_a8ebcc70a2024aab70883f094fc35849e}{get\_user\_count}}();} +\DoxyCodeLine{00080\ } +\DoxyCodeLine{00085\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{functions__for__client_8h_a4ddd067c5a29f76aead93c977a05113a}{get\_product\_count}}();} +\DoxyCodeLine{00086\ } +\DoxyCodeLine{00091\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{functions__for__client_8h_a4d269e13002c5cded37bee9ade854d93}{get\_weekly\_logins}}();} +\DoxyCodeLine{00092\ } +\DoxyCodeLine{00097\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{functions__for__client_8h_a2d6f70d14e474616a4a16a72485c2f0e}{get\_monthly\_logins}}();} +\DoxyCodeLine{00098\ } +\DoxyCodeLine{00104\ QByteArray\ \mbox{\hyperlink{functions__for__client_8h_a6496e445a644cca89c6252f6e7adecb0}{add\_favorite\_ration}}(\textcolor{keyword}{const}\ QStringList\&\ container);} +\DoxyCodeLine{00105\ } +\DoxyCodeLine{00112\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{functions__for__client_8h_a064e99d59eaa1d8cccef20b3192df015}{add\_ration\_to\_favorites}}(\textcolor{keyword}{const}\ QString\&\ userId,\ \textcolor{keyword}{const}\ QString\&\ rationId);} +\DoxyCodeLine{00113\ } +\DoxyCodeLine{00114\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ FUNCTIONS\_FOR\_CLIENT\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/hierarchy.tex b/docs/doxygen/latex/hierarchy.tex new file mode 100644 index 0000000..a2928ad --- /dev/null +++ b/docs/doxygen/latex/hierarchy.tex @@ -0,0 +1,20 @@ +\doxysection{Class Hierarchy} +This inheritance list is sorted roughly, but not completely, alphabetically\+:\begin{DoxyCompactList} +\item \contentsline{section}{Client\+Singleton\+Destroyer}{\pageref{class_client_singleton_destroyer}}{} +\item \contentsline{section}{Data\+Base\+Singleton}{\pageref{class_data_base_singleton}}{} +\item QMain\+Window\begin{DoxyCompactList} +\item \contentsline{section}{Auth\+Reg\+Window}{\pageref{class_auth_reg_window}}{} +\item \contentsline{section}{Main\+Window}{\pageref{class_main_window}}{} +\item \contentsline{section}{Manager\+Forms}{\pageref{class_manager_forms}}{} +\end{DoxyCompactList} +\item QObject\begin{DoxyCompactList} +\item \contentsline{section}{Client\+Singleton}{\pageref{class_client_singleton}}{} +\item \contentsline{section}{My\+Tcp\+Server}{\pageref{class_my_tcp_server}}{} +\end{DoxyCompactList} +\item QWidget\begin{DoxyCompactList} +\item \contentsline{section}{Add\+Product\+Window}{\pageref{class_add_product_window}}{} +\item \contentsline{section}{menu\+Card}{\pageref{classmenu_card}}{} +\item \contentsline{section}{product\+Card}{\pageref{classproduct_card}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Singleton\+Destroyer}{\pageref{class_singleton_destroyer}}{} +\end{DoxyCompactList} diff --git a/docs/doxygen/latex/longtable_doxygen.sty b/docs/doxygen/latex/longtable_doxygen.sty new file mode 100644 index 0000000..39a44b8 --- /dev/null +++ b/docs/doxygen/latex/longtable_doxygen.sty @@ -0,0 +1,459 @@ +%% +%% This is file `longtable.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% longtable.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at http://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% Copyright 1993-2016 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. +%% -------------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' +%% without such generated files. +%% +%% The list of all files belonging to the LaTeX `Tools Bundle' is +%% given in the file `manifest.txt'. +%% +%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle +\NeedsTeXFormat{LaTeX2e}[1995/06/01] +\ProvidesPackage{longtable_doxygen} + [2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen] +\def\LT@err{\PackageError{longtable}} +\def\LT@warn{\PackageWarning{longtable}} +\def\LT@final@warn{% + \AtEndDocument{% + \LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}% + \global\let\LT@final@warn\relax} +\DeclareOption{errorshow}{% + \def\LT@warn{\PackageInfo{longtable}}} +\DeclareOption{pausing}{% + \def\LT@warn#1{% + \LT@err{#1}{This is not really an error}}} +\DeclareOption{set}{} +\DeclareOption{final}{} +\ProcessOptions +\newskip\LTleft \LTleft=\fill +\newskip\LTright \LTright=\fill +\newskip\LTpre \LTpre=\bigskipamount +\newskip\LTpost \LTpost=\bigskipamount +\newcount\LTchunksize \LTchunksize=20 +\let\c@LTchunksize\LTchunksize +\newdimen\LTcapwidth \LTcapwidth=4in +\newbox\LT@head +\newbox\LT@firsthead +\newbox\LT@foot +\newbox\LT@lastfoot +\newcount\LT@cols +\newcount\LT@rows +\newcounter{LT@tables} +\newcounter{LT@chunks}[LT@tables] +\ifx\c@table\undefined + \newcounter{table} + \def\fnum@table{\tablename~\thetable} +\fi +\ifx\tablename\undefined + \def\tablename{Table} +\fi +\newtoks\LT@p@ftn +\mathchardef\LT@end@pen=30000 +\def\longtable{% + \par + \ifx\multicols\@undefined + \else + \ifnum\col@number>\@ne + \@twocolumntrue + \fi + \fi + \if@twocolumn + \LT@err{longtable not in 1-column mode}\@ehc + \fi + \begingroup + \@ifnextchar[\LT@array{\LT@array[x]}} +\def\LT@array[#1]#2{% + \refstepcounter{table}\stepcounter{LT@tables}% + \if l#1% + \LTleft\z@ \LTright\fill + \else\if r#1% + \LTleft\fill \LTright\z@ + \else\if c#1% + \LTleft\fill \LTright\fill + \fi\fi\fi + \let\LT@mcol\multicolumn + \let\LT@@tabarray\@tabarray + \let\LT@@hl\hline + \def\@tabarray{% + \let\hline\LT@@hl + \LT@@tabarray}% + \let\\\LT@tabularcr\let\tabularnewline\\% + \def\newpage{\noalign{\break}}% + \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}% + \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}% + \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption + \@tempdima\ht\strutbox + \let\@endpbox\LT@endpbox + \ifx\extrarowheight\@undefined + \let\@acol\@tabacol + \let\@classz\@tabclassz \let\@classiv\@tabclassiv + \def\@startpbox{\vtop\LT@startpbox}% + \let\@@startpbox\@startpbox + \let\@@endpbox\@endpbox + \let\LT@LL@FM@cr\@tabularcr + \else + \advance\@tempdima\extrarowheight + \col@sep\tabcolsep + \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr + \fi + \setbox\@arstrutbox\hbox{\vrule + \@height \arraystretch \@tempdima + \@depth \arraystretch \dp \strutbox + \@width \z@}% + \let\@sharp##\let\protect\relax + \begingroup + \@mkpream{#2}% + \xdef\LT@bchunk{% + \global\advance\c@LT@chunks\@ne + \global\LT@rows\z@\setbox\z@\vbox\bgroup + \LT@setprevdepth + \tabskip\LTleft \noexpand\halign to\hsize\bgroup + \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}% + \endgroup + \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols + \LT@make@row + \m@th\let\par\@empty + \everycr{}\lineskip\z@\baselineskip\z@ + \LT@bchunk} +\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}} +\def\LT@start{% + \let\LT@start\endgraf + \endgraf\penalty\z@\vskip\LTpre + \dimen@\pagetotal + \advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \ht\LT@foot + \dimen@ii\vfuzz + \vfuzz\maxdimen + \setbox\tw@\copy\z@ + \setbox\tw@\vsplit\tw@ to \ht\@arstrutbox + \setbox\tw@\vbox{\unvbox\tw@}% + \vfuzz\dimen@ii + \advance\dimen@ \ht + \ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@\dp + \ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@ -\pagegoal + \ifdim \dimen@>\z@\vfil\break\fi + \global\@colroom\@colht + \ifvoid\LT@foot\else + \global\advance\vsize-\ht\LT@foot + \global\advance\@colroom-\ht\LT@foot + \dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@ + \maxdepth\z@ + \fi + \ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak + \output{\LT@output}} +\def\endlongtable{% + \crcr + \noalign{% + \let\LT@entry\LT@entry@chop + \xdef\LT@save@row{\LT@save@row}}% + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \if@filesw + {\let\LT@entry\LT@entry@write\immediate\write\@auxout{% + \gdef\expandafter\noexpand + \csname LT@\romannumeral\c@LT@tables\endcsname + {\LT@save@row}}}% + \fi + \ifx\LT@save@row\LT@@save@row + \else + \LT@warn{Column \@width s have changed\MessageBreak + in table \thetable}% + \LT@final@warn + \fi + \endgraf\penalty -\LT@end@pen + \ifvoid\LT@foot\else + \global\advance\vsize\ht\LT@foot + \global\advance\@colroom\ht\LT@foot + \dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@ + \fi + \endgroup + \global\@mparbottom\z@ + \endgraf\penalty\z@\addvspace\LTpost + \ifvoid\footins\else\insert\footins{}\fi} +\def\LT@nofcols#1&{% + \futurelet\@let@token\LT@n@fcols} +\def\LT@n@fcols{% + \advance\LT@cols\@ne + \ifx\@let@token\LT@nofcols + \expandafter\@gobble + \else + \expandafter\LT@nofcols + \fi} +\def\LT@tabularcr{% + \relax\iffalse{\fi\ifnum0=`}\fi + \@ifstar + {\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr + \LT@t@bularcr}% + {\LT@t@bularcr}} +\let\LT@crcr\crcr +\let\LT@setprevdepth\relax +\def\LT@t@bularcr{% + \global\advance\LT@rows\@ne + \ifnum\LT@rows=\LTchunksize + \gdef\LT@setprevdepth{% + \prevdepth\z@\global + \global\let\LT@setprevdepth\relax}% + \expandafter\LT@xtabularcr + \else + \ifnum0=`{}\fi + \expandafter\LT@LL@FM@cr + \fi} +\def\LT@xtabularcr{% + \@ifnextchar[\LT@argtabularcr\LT@ntabularcr} +\def\LT@ntabularcr{% + \ifnum0=`{}\fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@argtabularcr[#1]{% + \ifnum0=`{}\fi + \ifdim #1>\z@ + \unskip\@xargarraycr{#1}% + \else + \@yargarraycr{#1}% + \fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@echunk{% + \crcr\LT@save@row\cr\egroup + \global\setbox\@ne\lastbox + \unskip + \egroup} +\def\LT@entry#1#2{% + \ifhmode\@firstofone{&}\fi\omit + \ifnum#1=\c@LT@chunks + \else + \kern#2\relax + \fi} +\def\LT@entry@chop#1#2{% + \noexpand\LT@entry + {\ifnum#1>\c@LT@chunks + 1}{0pt% + \else + #1}{#2% + \fi}} +\def\LT@entry@write{% + \noexpand\LT@entry^^J% + \@spaces} +\def\LT@kill{% + \LT@echunk + \LT@get@widths + \expandafter\LT@rebox\LT@bchunk} +\def\LT@rebox#1\bgroup{% + #1\bgroup + \unvbox\z@ + \unskip + \setbox\z@\lastbox} +\def\LT@blank@row{% + \xdef\LT@save@row{\expandafter\LT@build@blank + \romannumeral\number\LT@cols 001 }} +\def\LT@build@blank#1{% + \if#1m% + \noexpand\LT@entry{1}{0pt}% + \expandafter\LT@build@blank + \fi} +\def\LT@make@row{% + \global\expandafter\let\expandafter\LT@save@row + \csname LT@\romannumeral\c@LT@tables\endcsname + \ifx\LT@save@row\relax + \LT@blank@row + \else + {\let\LT@entry\or + \if!% + \ifcase\expandafter\expandafter\expandafter\LT@cols + \expandafter\@gobble\LT@save@row + \or + \else + \relax + \fi + !% + \else + \aftergroup\LT@blank@row + \fi}% + \fi} +\let\setlongtables\relax +\def\LT@get@widths{% + \setbox\tw@\hbox{% + \unhbox\@ne + \let\LT@old@row\LT@save@row + \global\let\LT@save@row\@empty + \count@\LT@cols + \loop + \unskip + \setbox\tw@\lastbox + \ifhbox\tw@ + \LT@def@row + \advance\count@\m@ne + \repeat}% + \ifx\LT@@save@row\@undefined + \let\LT@@save@row\LT@save@row + \fi} +\def\LT@def@row{% + \let\LT@entry\or + \edef\@tempa{% + \ifcase\expandafter\count@\LT@old@row + \else + {1}{0pt}% + \fi}% + \let\LT@entry\relax + \xdef\LT@save@row{% + \LT@entry + \expandafter\LT@max@sel\@tempa + \LT@save@row}} +\def\LT@max@sel#1#2{% + {\ifdim#2=\wd\tw@ + #1% + \else + \number\c@LT@chunks + \fi}% + {\the\wd\tw@}} +\def\LT@hline{% + \noalign{\ifnum0=`}\fi + \penalty\@M + \futurelet\@let@token\LT@@hline} +\def\LT@@hline{% + \ifx\@let@token\hline + \global\let\@gtempa\@gobble + \gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}% + \else + \global\let\@gtempa\@empty + \gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\LT@sep}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\penalty\@M}% + \@gtempa} +\def\LT@caption{% + \noalign\bgroup + \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1\fnum@table{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}% + \fi} +\def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\@xdblarg{\LT@c@ption\@firstofone}}} +\def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% + \sbox\@tempboxa{#1{#2: }#3}% + \ifdim\wd\@tempboxa>\hsize + #1{#2: }#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\baselineskip}% + \hss}}} +\def\LT@output{% + \ifnum\outputpenalty <-\@Mi + \ifnum\outputpenalty > -\LT@end@pen + \LT@err{floats and marginpars not allowed in a longtable}\@ehc + \else + \setbox\z@\vbox{\unvbox\@cclv}% + \ifdim \ht\LT@lastfoot>\ht\LT@foot + \dimen@\pagegoal + \advance\dimen@\ht\LT@foot + \advance\dimen@-\ht\LT@lastfoot + \ifdim\dimen@<\ht\z@ + \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}% + \@makecol + \@outputpage + \global\vsize\@colroom + \setbox\z@\vbox{\box\LT@head}% + \fi + \fi + \unvbox\z@\ifvoid\LT@lastfoot\copy\LT@foot\else\box\LT@lastfoot\fi + \fi + \else + \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}% + \@makecol + \@outputpage + \global\vsize\@colroom + \copy\LT@head\nobreak + \fi} +\def\LT@end@hd@ft#1{% + \LT@echunk + \ifx\LT@start\endgraf + \LT@err + {Longtable head or foot not at start of table}% + {Increase LTchunksize}% + \fi + \setbox#1\box\z@ + \LT@get@widths + \LT@bchunk} +\def\endfirsthead{\LT@end@hd@ft\LT@firsthead} +\def\endhead{\LT@end@hd@ft\LT@head} +\def\endfoot{\LT@end@hd@ft\LT@foot} +\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot} +\def\LT@startpbox#1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \vrule \@height \ht\@arstrutbox \@width \z@} +\def\LT@endpbox{% + \@finalstrut\@arstrutbox + \egroup + \the\LT@p@ftn + \global\LT@p@ftn{}% + \hfil} +%% added \long to prevent: +% LaTeX Warning: Command \LT@p@ftntext has changed. +% +% from the original repository (https://github.com/latex3/latex2e/blob/develop/required/tools/longtable.dtx): +% \changes{v4.15}{2021/03/28} +% {make long for gh/364} +% Inside the `p' column, just save up the footnote text in a token +% register. +\long\def\LT@p@ftntext#1{% + \edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}% + \global\LT@p@ftn\expandafter{\@tempa{#1}}}% + +\@namedef{ver@longtable.sty}{2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen} +\endinput +%% +%% End of file `longtable.sty'. diff --git a/docs/doxygen/latex/main_8cpp.tex b/docs/doxygen/latex/main_8cpp.tex new file mode 100644 index 0000000..1b2221b --- /dev/null +++ b/docs/doxygen/latex/main_8cpp.tex @@ -0,0 +1,47 @@ +\doxysection{server/main.cpp File Reference} +\hypertarget{main_8cpp}{}\label{main_8cpp}\index{server/main.cpp@{server/main.cpp}} +{\ttfamily \#include $<$QCore\+Application$>$}\newline +{\ttfamily \#include $<$QObject$>$}\newline +{\ttfamily \#include $<$QVariant$>$}\newline +{\ttfamily \#include $<$QSql\+Database$>$}\newline +{\ttfamily \#include $<$QSql\+Query$>$}\newline +{\ttfamily \#include "{}mytcpserver.\+h"{}}\newline +{\ttfamily \#include "{}databasesingleton.\+h"{}}\newline +Include dependency graph for main.\+cpp\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{main_8cpp__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Functions} +\begin{DoxyCompactItemize} +\item +int \mbox{\hyperlink{main_8cpp_a0ddf1224851353fc92bfbff6f499fa97}{main}} (int argc, char \texorpdfstring{$\ast$}{*}argv\mbox{[}$\,$\mbox{]}) +\end{DoxyCompactItemize} + + +\doxysubsection{Function Documentation} +\Hypertarget{main_8cpp_a0ddf1224851353fc92bfbff6f499fa97}\index{main.cpp@{main.cpp}!main@{main}} +\index{main@{main}!main.cpp@{main.cpp}} +\doxysubsubsection{\texorpdfstring{main()}{main()}} +{\footnotesize\ttfamily \label{main_8cpp_a0ddf1224851353fc92bfbff6f499fa97} +int main (\begin{DoxyParamCaption}\item[{int}]{argc}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{argv}{\mbox{[}$\,$\mbox{]}}\end{DoxyParamCaption})} + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00011\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00012\ \ \ \ \ QCoreApplication\ a(argc,\ argv);} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00014\ \ \ \ \ \textcolor{comment}{//\ Инициализация\ БД}} +\DoxyCodeLine{00015\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00016\ \ \ \ \ \textcolor{keywordflow}{if}\ (!db-\/>\mbox{\hyperlink{class_data_base_singleton_a59bda63308000a018c5bdc1989582e50}{initialize}}(\textcolor{stringliteral}{"{}Easyweek.db"{}}))\ \{} +\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ qFatal(\textcolor{stringliteral}{"{}Failed\ to\ initialize\ database"{}});} +\DoxyCodeLine{00018\ \ \ \ \ \}} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server}{MyTcpServer}}\ myserv;} +\DoxyCodeLine{00022\ \ \ \ \ \textcolor{keywordflow}{return}\ a.exec();} +\DoxyCodeLine{00023\ \}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/main_8cpp__incl.dot b/docs/doxygen/latex/main_8cpp__incl.dot new file mode 100644 index 0000000..3613b35 --- /dev/null +++ b/docs/doxygen/latex/main_8cpp__incl.dot @@ -0,0 +1,44 @@ +digraph "server/main.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/main.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge21_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QCoreApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge22_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge23_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QVariant",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge24_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge25_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge26_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="mytcpserver.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8h.html",tooltip=" "]; + Node7 -> Node3 [id="edge27_Node000007_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node7 -> Node8 [id="edge28_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QTcpServer",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node9 [id="edge29_Node000007_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node10 [id="edge30_Node000007_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node11 [id="edge31_Node000007_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node12 [id="edge32_Node000007_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node13 [id="edge33_Node000007_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node14 [id="edge34_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="databasesingleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8h.html",tooltip=" "]; + Node14 -> Node5 [id="edge35_Node000014_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node6 [id="edge36_Node000014_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node15 [id="edge37_Node000014_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node14 -> Node12 [id="edge38_Node000014_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node16 [id="edge39_Node000014_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node14 -> Node17 [id="edge40_Node000014_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/main_8cpp__incl.md5 b/docs/doxygen/latex/main_8cpp__incl.md5 new file mode 100644 index 0000000..145ef3f --- /dev/null +++ b/docs/doxygen/latex/main_8cpp__incl.md5 @@ -0,0 +1 @@ +4e0b82e733d180a5ef38fec20b2c5087 \ No newline at end of file diff --git a/docs/doxygen/latex/main_8cpp__incl.pdf b/docs/doxygen/latex/main_8cpp__incl.pdf new file mode 100644 index 0000000..c2b0aff Binary files /dev/null and b/docs/doxygen/latex/main_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/mainwindow_8cpp.tex b/docs/doxygen/latex/mainwindow_8cpp.tex new file mode 100644 index 0000000..01d8bae --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8cpp.tex @@ -0,0 +1,18 @@ +\doxysection{client/mainwindow.cpp File Reference} +\hypertarget{mainwindow_8cpp}{}\label{mainwindow_8cpp}\index{client/mainwindow.cpp@{client/mainwindow.cpp}} +{\ttfamily \#include "{}mainwindow.\+h"{}}\newline +{\ttfamily \#include "{}ui\+\_\+mainwindow.\+h"{}}\newline +{\ttfamily \#include $<$QGrid\+Layout$>$}\newline +{\ttfamily \#include $<$QScroll\+Area$>$}\newline +{\ttfamily \#include $<$QDebug$>$}\newline +{\ttfamily \#include $<$QProcess$>$}\newline +{\ttfamily \#include $<$QApplication$>$}\newline +{\ttfamily \#include $<$QPush\+Button$>$}\newline +Include dependency graph for mainwindow.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{mainwindow_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/mainwindow_8cpp__incl.dot b/docs/doxygen/latex/mainwindow_8cpp__incl.dot new file mode 100644 index 0000000..582f4a6 --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8cpp__incl.dot @@ -0,0 +1,52 @@ +digraph "client/mainwindow.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/mainwindow.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge24_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge25_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge26_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge27_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge28_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node6 -> Node7 [id="edge29_Node000006_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node8 [id="edge30_Node000006_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node9 [id="edge31_Node000006_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node10 [id="edge32_Node000006_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node11 [id="edge33_Node000006_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node6 -> Node12 [id="edge34_Node000006_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node13 [id="edge35_Node000002_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node13 -> Node14 [id="edge36_Node000013_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node15 [id="edge37_Node000002_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node15 -> Node14 [id="edge38_Node000015_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node2 -> Node16 [id="edge39_Node000002_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node17 [id="edge40_Node000001_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="ui_mainwindow.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node18 [id="edge41_Node000001_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="QGridLayout",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node19 [id="edge42_Node000001_Node000019",color="steelblue1",style="solid",tooltip=" "]; + Node19 [id="Node000019",label="QScrollArea",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node11 [id="edge43_Node000001_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node20 [id="edge44_Node000001_Node000020",color="steelblue1",style="solid",tooltip=" "]; + Node20 [id="Node000020",label="QProcess",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node21 [id="edge45_Node000001_Node000021",color="steelblue1",style="solid",tooltip=" "]; + Node21 [id="Node000021",label="QApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node22 [id="edge46_Node000001_Node000022",color="steelblue1",style="solid",tooltip=" "]; + Node22 [id="Node000022",label="QPushButton",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/mainwindow_8cpp__incl.md5 b/docs/doxygen/latex/mainwindow_8cpp__incl.md5 new file mode 100644 index 0000000..08ad0eb --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8cpp__incl.md5 @@ -0,0 +1 @@ +2f3034f380be56af52a0d574ce3406a6 \ No newline at end of file diff --git a/docs/doxygen/latex/mainwindow_8cpp__incl.pdf b/docs/doxygen/latex/mainwindow_8cpp__incl.pdf new file mode 100644 index 0000000..0dac300 Binary files /dev/null and b/docs/doxygen/latex/mainwindow_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/mainwindow_8h.tex b/docs/doxygen/latex/mainwindow_8h.tex new file mode 100644 index 0000000..d2eab83 --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8h.tex @@ -0,0 +1,33 @@ +\doxysection{client/mainwindow.h File Reference} +\hypertarget{mainwindow_8h}{}\label{mainwindow_8h}\index{client/mainwindow.h@{client/mainwindow.h}} +{\ttfamily \#include $<$QMain\+Window$>$}\newline +{\ttfamily \#include "{}functions\+\_\+for\+\_\+client.\+h"{}}\newline +{\ttfamily \#include "{}product\+Card.\+h"{}}\newline +{\ttfamily \#include "{}menu\+Card.\+h"{}}\newline +{\ttfamily \#include $<$QMessage\+Box$>$}\newline +Include dependency graph for mainwindow.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{mainwindow_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{mainwindow_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_main_window}{Main\+Window}} +\begin{DoxyCompactList}\small\item\em Главное окно клиента. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Namespaces} +\begin{DoxyCompactItemize} +\item +namespace \mbox{\hyperlink{namespace_ui}{Ui}} +\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/mainwindow_8h__dep__incl.dot b/docs/doxygen/latex/mainwindow_8h__dep__incl.dot new file mode 100644 index 0000000..882ebed --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8h__dep__incl.dot @@ -0,0 +1,19 @@ +digraph "client/mainwindow.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/mainwindow.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge7_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge8_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node1 -> Node4 [id="edge9_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node4 -> Node2 [id="edge10_Node000004_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 -> Node5 [id="edge11_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node4 -> Node6 [id="edge12_Node000004_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/mainwindow_8h__dep__incl.md5 b/docs/doxygen/latex/mainwindow_8h__dep__incl.md5 new file mode 100644 index 0000000..a392657 --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8h__dep__incl.md5 @@ -0,0 +1 @@ +becb857a36b87b03132abb832493ce0c \ No newline at end of file diff --git a/docs/doxygen/latex/mainwindow_8h__dep__incl.pdf b/docs/doxygen/latex/mainwindow_8h__dep__incl.pdf new file mode 100644 index 0000000..042a0e3 Binary files /dev/null and b/docs/doxygen/latex/mainwindow_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/mainwindow_8h__incl.dot b/docs/doxygen/latex/mainwindow_8h__incl.dot new file mode 100644 index 0000000..e0e2afa --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8h__incl.dot @@ -0,0 +1,37 @@ +digraph "client/mainwindow.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/mainwindow.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge16_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge17_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge18_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node5 [id="edge19_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node5 -> Node6 [id="edge20_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node7 [id="edge21_Node000005_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node8 [id="edge22_Node000005_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node9 [id="edge23_Node000005_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node10 [id="edge24_Node000005_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node5 -> Node11 [id="edge25_Node000005_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node12 [id="edge26_Node000001_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node12 -> Node13 [id="edge27_Node000012_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node14 [id="edge28_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node14 -> Node13 [id="edge29_Node000014_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node15 [id="edge30_Node000001_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/mainwindow_8h__incl.md5 b/docs/doxygen/latex/mainwindow_8h__incl.md5 new file mode 100644 index 0000000..da839e8 --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8h__incl.md5 @@ -0,0 +1 @@ +0df10b2c7c447e9492061b4a97979ac4 \ No newline at end of file diff --git a/docs/doxygen/latex/mainwindow_8h__incl.pdf b/docs/doxygen/latex/mainwindow_8h__incl.pdf new file mode 100644 index 0000000..a862cd1 Binary files /dev/null and b/docs/doxygen/latex/mainwindow_8h__incl.pdf differ diff --git a/docs/doxygen/latex/mainwindow_8h_source.tex b/docs/doxygen/latex/mainwindow_8h_source.tex new file mode 100644 index 0000000..d0130aa --- /dev/null +++ b/docs/doxygen/latex/mainwindow_8h_source.tex @@ -0,0 +1,63 @@ +\doxysection{mainwindow.\+h} +\hypertarget{mainwindow_8h_source}{}\label{mainwindow_8h_source}\index{client/mainwindow.h@{client/mainwindow.h}} +\mbox{\hyperlink{mainwindow_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ MAINWINDOW\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ MAINWINDOW\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{functions__for__client_8h}{functions\_for\_client.h}}"{}}} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{product_card_8h}{productCard.h}}"{}}} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{menu_card_8h}{menuCard.h}}"{}}} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00009\ } +\DoxyCodeLine{00010\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{namespace_ui}{Ui}}\ \{} +\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }MainWindow;} +\DoxyCodeLine{00012\ \}} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00020\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_main_window_a996c5a2b6f77944776856f08ec30858d}{MainWindow}}\ :\ \textcolor{keyword}{public}\ QMainWindow} +\DoxyCodeLine{00021\ \{} +\DoxyCodeLine{00022\ \ \ \ \ Q\_OBJECT} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{class_main_window_a996c5a2b6f77944776856f08ec30858d}{MainWindow}}(QWidget\ *parent\ =\ \textcolor{keyword}{nullptr});} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00034\ \ \ \ \ \mbox{\hyperlink{class_main_window_ae98d00a93bc118200eeef9f9bba1dba7}{\string~MainWindow}}();} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00036\ \ \ \ \ QString\ \mbox{\hyperlink{class_main_window_a9ba91413f46ab4481ab8042ac8f2b799}{id}};\ \ \ \ \ \ \ } +\DoxyCodeLine{00037\ \ \ \ \ QString\ \mbox{\hyperlink{class_main_window_a4338481359e3e8145930703e0089340f}{login}};\ \ \ \ } +\DoxyCodeLine{00038\ \ \ \ \ QString\ \mbox{\hyperlink{class_main_window_a25493964c8f550b2380a12616fbc8250}{password}};\ } +\DoxyCodeLine{00039\ \ \ \ \ QString\ \mbox{\hyperlink{class_main_window_a46daecfbbd4056b097b3b470cc4f1618}{email}};\ \ \ \ } +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ \textcolor{keyword}{public}\ slots:} +\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_a9a15eca3ebf289292af72b78b2cf1b56}{slot\_show}}();} +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_a91a9ec299ac67e179bd9e3acbf23eb0c}{set\_current\_user}}(QString\ \textcolor{keywordtype}{id},\ QString\ \mbox{\hyperlink{class_main_window_a4338481359e3e8145930703e0089340f}{login}},\ QString\ \mbox{\hyperlink{class_main_window_a46daecfbbd4056b097b3b470cc4f1618}{email}});} +\DoxyCodeLine{00054\ } +\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_a9e4beb27bda168783b6e71d486ebcb90}{handleProductAdded}}(QString\ name,\ \textcolor{keywordtype}{int}\ proteins,\ \textcolor{keywordtype}{int}\ fats,\ \textcolor{keywordtype}{int}\ carbs,\ \textcolor{keywordtype}{int}\ weight,\ \textcolor{keywordtype}{int}\ cost,\ \textcolor{keywordtype}{int}\ type);} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00068\ \ \ \ \ Ui::MainWindow\ *\mbox{\hyperlink{class_main_window_a35466a70ed47252a0191168126a352a5}{ui}};\ } +\DoxyCodeLine{00069\ } +\DoxyCodeLine{00070\ \textcolor{keyword}{private}\ slots:} +\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_a9c7432f74a43023beb13ba1250e9c6bd}{on\_stableStatButton\_clicked}}();} +\DoxyCodeLine{00075\ } +\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_a0c422ab00483005eb0251aa551869d70}{on\_dynamicStatButton\_clicked}}();} +\DoxyCodeLine{00080\ } +\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_a2ccbff8c6af34935185f027972958b5c}{on\_tableUsersButton\_clicked}}();} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_a11507d87b5fb4a79fb557e8e313c90cd}{on\_productListButton\_clicked}}();} +\DoxyCodeLine{00090\ } +\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_aa811d4e586dc8aee0fb9cbdc953342a2}{on\_createMenButton\_clicked}}();} +\DoxyCodeLine{00095\ } +\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_a0a031c02eff36254765c9030a443ab04}{on\_addProductButton\_clicked}}();} +\DoxyCodeLine{00100\ } +\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_afcbbbc80001065310d2cd6221c5be55c}{on\_exitButton\_clicked}}();} +\DoxyCodeLine{00105\ } +\DoxyCodeLine{00106\ signals:} +\DoxyCodeLine{00110\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_main_window_afa09d58e484be8e5c49e5f5b33f0e3d8}{add\_product}}();} +\DoxyCodeLine{00111\ \};} +\DoxyCodeLine{00112\ } +\DoxyCodeLine{00113\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ MAINWINDOW\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/make.bat b/docs/doxygen/latex/make.bat new file mode 100644 index 0000000..ccd0c1b --- /dev/null +++ b/docs/doxygen/latex/make.bat @@ -0,0 +1,67 @@ +pushd %~dp0 +if not %errorlevel% == 0 goto :end1 + +set ORG_LATEX_CMD=%LATEX_CMD% +set ORG_MKIDX_CMD=%MKIDX_CMD% +set ORG_BIBTEX_CMD=%BIBTEX_CMD% +set ORG_LATEX_COUNT=%LATEX_COUNT% +set ORG_MANUAL_FILE=%MANUAL_FILE% +if "X"%LATEX_CMD% == "X" set LATEX_CMD=pdflatex +if "X"%MKIDX_CMD% == "X" set MKIDX_CMD=makeindex +if "X"%BIBTEX_CMD% == "X" set BIBTEX_CMD=bibtex +if "X"%LATEX_COUNT% == "X" set LATEX_COUNT=8 +if "X"%MANUAL_FILE% == "X" set MANUAL_FILE=refman + +del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl %MANUAL_FILE%.pdf + + +%LATEX_CMD% %MANUAL_FILE% +@if ERRORLEVEL 1 goto :error +echo ---- +%MKIDX_CMD% %MANUAL_FILE%.idx +echo ---- +%LATEX_CMD% %MANUAL_FILE% +@if ERRORLEVEL 1 goto :error + +setlocal enabledelayedexpansion +set count=%LATEX_COUNT% +:repeat +set content=X +for /F "tokens=*" %%T in ( 'findstr /C:"Rerun LaTeX" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get cross-references right" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get bibliographical references right" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X goto :skip +set /a count-=1 +if !count! EQU 0 goto :skip + +echo ---- +%LATEX_CMD% %MANUAL_FILE% +@if ERRORLEVEL 1 goto :error +goto :repeat +:skip +endlocal +%MKIDX_CMD% %MANUAL_FILE%.idx +%LATEX_CMD% %MANUAL_FILE% +@if ERRORLEVEL 1 goto :error + +goto :end +:error +@echo =============== +@echo Please consult %MANUAL_FILE%.log to see the error messages +@echo =============== + +:end +@REM reset environment +popd +set LATEX_CMD=%ORG_LATEX_CMD% +set ORG_LATEX_CMD= +set MKIDX_CMD=%ORG_MKIDX_CMD% +set ORG_MKIDX_CMD= +set BIBTEX_CMD=%ORG_BIBTEX_CMD% +set ORG_BIBTEX_CMD= +set MANUAL_FILE=%ORG_MANUAL_FILE% +set ORG_MANUAL_FILE= +set LATEX_COUNT=%ORG_LATEX_COUNT% +set ORG_LATEX_COUNT= + +:end1 diff --git a/docs/doxygen/latex/managerforms_8cpp.tex b/docs/doxygen/latex/managerforms_8cpp.tex new file mode 100644 index 0000000..ca048e3 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8cpp.tex @@ -0,0 +1,11 @@ +\doxysection{client/managerforms.cpp File Reference} +\hypertarget{managerforms_8cpp}{}\label{managerforms_8cpp}\index{client/managerforms.cpp@{client/managerforms.cpp}} +{\ttfamily \#include "{}managerforms.\+h"{}}\newline +Include dependency graph for managerforms.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{managerforms_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/managerforms_8cpp__incl.dot b/docs/doxygen/latex/managerforms_8cpp__incl.dot new file mode 100644 index 0000000..8295f32 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8cpp__incl.dot @@ -0,0 +1,51 @@ +digraph "client/managerforms.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/managerforms.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge26_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge27_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge28_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node4 -> Node5 [id="edge29_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node4 -> Node6 [id="edge30_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge31_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node7 -> Node3 [id="edge32_Node000007_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node7 -> Node8 [id="edge33_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node8 -> Node9 [id="edge34_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node8 -> Node10 [id="edge35_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node10 -> Node11 [id="edge36_Node000010_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node12 [id="edge37_Node000010_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node13 [id="edge38_Node000010_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node14 [id="edge39_Node000010_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node15 [id="edge40_Node000010_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node10 -> Node16 [id="edge41_Node000010_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node17 [id="edge42_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node17 -> Node3 [id="edge43_Node000017_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node8 [id="edge44_Node000017_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node18 [id="edge45_Node000017_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node18 -> Node5 [id="edge46_Node000018_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node19 [id="edge47_Node000017_Node000019",color="steelblue1",style="solid",tooltip=" "]; + Node19 [id="Node000019",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node19 -> Node5 [id="edge48_Node000019_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node17 -> Node6 [id="edge49_Node000017_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node2 -> Node10 [id="edge50_Node000002_Node000010",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/latex/managerforms_8cpp__incl.md5 b/docs/doxygen/latex/managerforms_8cpp__incl.md5 new file mode 100644 index 0000000..967d760 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8cpp__incl.md5 @@ -0,0 +1 @@ +1a347abf7fc0d78520c78faa9b2187db \ No newline at end of file diff --git a/docs/doxygen/latex/managerforms_8cpp__incl.pdf b/docs/doxygen/latex/managerforms_8cpp__incl.pdf new file mode 100644 index 0000000..4b39275 Binary files /dev/null and b/docs/doxygen/latex/managerforms_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/managerforms_8h.tex b/docs/doxygen/latex/managerforms_8h.tex new file mode 100644 index 0000000..b45c8e0 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8h.tex @@ -0,0 +1,33 @@ +\doxysection{client/managerforms.h File Reference} +\hypertarget{managerforms_8h}{}\label{managerforms_8h}\index{client/managerforms.h@{client/managerforms.h}} +{\ttfamily \#include $<$QMain\+Window$>$}\newline +{\ttfamily \#include "{}add\+\_\+product.\+h"{}}\newline +{\ttfamily \#include "{}authregwindow.\+h"{}}\newline +{\ttfamily \#include "{}mainwindow.\+h"{}}\newline +{\ttfamily \#include "{}Singleton.\+h"{}}\newline +Include dependency graph for managerforms.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{managerforms_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{managerforms_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_manager_forms}{Manager\+Forms}} +\begin{DoxyCompactList}\small\item\em Класс для управления окнами приложения. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Namespaces} +\begin{DoxyCompactItemize} +\item +namespace \mbox{\hyperlink{namespace_ui}{Ui}} +\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/managerforms_8h__dep__incl.dot b/docs/doxygen/latex/managerforms_8h__dep__incl.dot new file mode 100644 index 0000000..f5397a6 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8h__dep__incl.dot @@ -0,0 +1,14 @@ +digraph "client/managerforms.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/managerforms.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge4_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge5_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node1 -> Node4 [id="edge6_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/managerforms_8h__dep__incl.md5 b/docs/doxygen/latex/managerforms_8h__dep__incl.md5 new file mode 100644 index 0000000..40c8af7 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8h__dep__incl.md5 @@ -0,0 +1 @@ +8b2f900e130cd3d0831ba8f15d162563 \ No newline at end of file diff --git a/docs/doxygen/latex/managerforms_8h__dep__incl.pdf b/docs/doxygen/latex/managerforms_8h__dep__incl.pdf new file mode 100644 index 0000000..3bfbe97 Binary files /dev/null and b/docs/doxygen/latex/managerforms_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/managerforms_8h__incl.dot b/docs/doxygen/latex/managerforms_8h__incl.dot new file mode 100644 index 0000000..277b011 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8h__incl.dot @@ -0,0 +1,49 @@ +digraph "client/managerforms.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/managerforms.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge25_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QMainWindow",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge26_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="add_product.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$add__product_8h.html",tooltip=" "]; + Node3 -> Node4 [id="edge27_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node3 -> Node5 [id="edge28_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QMessageBox",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge29_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="authregwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$authregwindow_8h.html",tooltip=" "]; + Node6 -> Node2 [id="edge30_Node000006_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node6 -> Node7 [id="edge31_Node000006_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="functions_for_client.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8h.html",tooltip=" "]; + Node7 -> Node8 [id="edge32_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node9 [id="edge33_Node000007_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="Singleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_singleton_8h.html",tooltip=" "]; + Node9 -> Node10 [id="edge34_Node000009_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node11 [id="edge35_Node000009_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node12 [id="edge36_Node000009_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node13 [id="edge37_Node000009_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node14 [id="edge38_Node000009_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node9 -> Node15 [id="edge39_Node000009_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QStringList",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node16 [id="edge40_Node000001_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node16 -> Node2 [id="edge41_Node000016_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node16 -> Node7 [id="edge42_Node000016_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node16 -> Node17 [id="edge43_Node000016_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="productCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node17 -> Node4 [id="edge44_Node000017_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node16 -> Node18 [id="edge45_Node000016_Node000018",color="steelblue1",style="solid",tooltip=" "]; + Node18 [id="Node000018",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node18 -> Node4 [id="edge46_Node000018_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node16 -> Node5 [id="edge47_Node000016_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node9 [id="edge48_Node000001_Node000009",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/latex/managerforms_8h__incl.md5 b/docs/doxygen/latex/managerforms_8h__incl.md5 new file mode 100644 index 0000000..13f6a21 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8h__incl.md5 @@ -0,0 +1 @@ +dd2c61815b400d55c5ac1945e4fd6ce8 \ No newline at end of file diff --git a/docs/doxygen/latex/managerforms_8h__incl.pdf b/docs/doxygen/latex/managerforms_8h__incl.pdf new file mode 100644 index 0000000..7c76945 Binary files /dev/null and b/docs/doxygen/latex/managerforms_8h__incl.pdf differ diff --git a/docs/doxygen/latex/managerforms_8h_source.tex b/docs/doxygen/latex/managerforms_8h_source.tex new file mode 100644 index 0000000..c6807f7 --- /dev/null +++ b/docs/doxygen/latex/managerforms_8h_source.tex @@ -0,0 +1,35 @@ +\doxysection{managerforms.\+h} +\hypertarget{managerforms_8h_source}{}\label{managerforms_8h_source}\index{client/managerforms.h@{client/managerforms.h}} +\mbox{\hyperlink{managerforms_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ MANAGERFORMS\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ MANAGERFORMS\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{add__product_8h}{add\_product.h}}"{}}} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{authregwindow_8h}{authregwindow.h}}"{}}} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{mainwindow_8h}{mainwindow.h}}"{}}} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_singleton_8h}{Singleton.h}}"{}}} +\DoxyCodeLine{00009\ } +\DoxyCodeLine{00010\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{namespace_ui}{Ui}}\ \{} +\DoxyCodeLine{00011\ \ \ \ \ \textcolor{keyword}{class\ }ManagerForms;} +\DoxyCodeLine{00012\ \}} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00020\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_manager_forms_a28520be4f92d605ac48783497f23cf96}{ManagerForms}}\ :\ \textcolor{keyword}{public}\ QMainWindow} +\DoxyCodeLine{00021\ \{} +\DoxyCodeLine{00022\ \ \ \ \ Q\_OBJECT} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{class_manager_forms_a28520be4f92d605ac48783497f23cf96}{ManagerForms}}(QWidget\ *parent\ =\ \textcolor{keyword}{nullptr});} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00034\ \ \ \ \ \mbox{\hyperlink{class_manager_forms_a6fcef06607418dbf71c05c44847b0112}{\string~ManagerForms}}();} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00036\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00037\ \ \ \ \ \mbox{\hyperlink{class_auth_reg_window}{AuthRegWindow}}\ *\mbox{\hyperlink{class_manager_forms_a30b01a09a0e1859c5c934d77280249c8}{curr\_auth}};\ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00038\ \ \ \ \ \mbox{\hyperlink{class_main_window}{MainWindow}}\ *\mbox{\hyperlink{class_manager_forms_a55e8215156bd70da8b91860773f181a6}{main}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00039\ \ \ \ \ \mbox{\hyperlink{class_add_product_window}{AddProductWindow}}\ *\mbox{\hyperlink{class_manager_forms_a35e56ed089659370d82a6ede47a35ff0}{addProductWindow}};\ } +\DoxyCodeLine{00040\ \};} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ MANAGERFORMS\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/menu_card_8h.tex b/docs/doxygen/latex/menu_card_8h.tex new file mode 100644 index 0000000..f5cd9c6 --- /dev/null +++ b/docs/doxygen/latex/menu_card_8h.tex @@ -0,0 +1,29 @@ +\doxysection{client/menu\+Card.h File Reference} +\hypertarget{menu_card_8h}{}\label{menu_card_8h}\index{client/menuCard.h@{client/menuCard.h}} +{\ttfamily \#include $<$QWidget$>$}\newline +Include dependency graph for menu\+Card.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=176pt]{menu_card_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{menu_card_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classmenu_card}{menu\+Card}} +\begin{DoxyCompactList}\small\item\em Виджет отображения информации о рационе питания. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Namespaces} +\begin{DoxyCompactItemize} +\item +namespace \mbox{\hyperlink{namespace_ui}{Ui}} +\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/menu_card_8h__dep__incl.dot b/docs/doxygen/latex/menu_card_8h__dep__incl.dot new file mode 100644 index 0000000..92c26f2 --- /dev/null +++ b/docs/doxygen/latex/menu_card_8h__dep__incl.dot @@ -0,0 +1,23 @@ +digraph "client/menuCard.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/menuCard.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge9_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge10_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node2 -> Node4 [id="edge11_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node2 -> Node5 [id="edge12_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node5 -> Node3 [id="edge13_Node000005_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 -> Node6 [id="edge14_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node5 -> Node7 [id="edge15_Node000005_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; + Node1 -> Node8 [id="edge16_Node000001_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="client/menucard.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menucard_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/menu_card_8h__dep__incl.md5 b/docs/doxygen/latex/menu_card_8h__dep__incl.md5 new file mode 100644 index 0000000..49a586e --- /dev/null +++ b/docs/doxygen/latex/menu_card_8h__dep__incl.md5 @@ -0,0 +1 @@ +b23ae26cedd7a4fbfba41efd3b6b01b4 \ No newline at end of file diff --git a/docs/doxygen/latex/menu_card_8h__dep__incl.pdf b/docs/doxygen/latex/menu_card_8h__dep__incl.pdf new file mode 100644 index 0000000..c84e31e Binary files /dev/null and b/docs/doxygen/latex/menu_card_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/menu_card_8h__incl.dot b/docs/doxygen/latex/menu_card_8h__incl.dot new file mode 100644 index 0000000..41730dd --- /dev/null +++ b/docs/doxygen/latex/menu_card_8h__incl.dot @@ -0,0 +1,10 @@ +digraph "client/menuCard.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/menuCard.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge2_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/menu_card_8h__incl.md5 b/docs/doxygen/latex/menu_card_8h__incl.md5 new file mode 100644 index 0000000..be8d350 --- /dev/null +++ b/docs/doxygen/latex/menu_card_8h__incl.md5 @@ -0,0 +1 @@ +3d7194b834176b16227b8a23276f12b6 \ No newline at end of file diff --git a/docs/doxygen/latex/menu_card_8h__incl.pdf b/docs/doxygen/latex/menu_card_8h__incl.pdf new file mode 100644 index 0000000..73cf0d4 Binary files /dev/null and b/docs/doxygen/latex/menu_card_8h__incl.pdf differ diff --git a/docs/doxygen/latex/menu_card_8h_source.tex b/docs/doxygen/latex/menu_card_8h_source.tex new file mode 100644 index 0000000..e8a799c --- /dev/null +++ b/docs/doxygen/latex/menu_card_8h_source.tex @@ -0,0 +1,29 @@ +\doxysection{menu\+Card.\+h} +\hypertarget{menu_card_8h_source}{}\label{menu_card_8h_source}\index{client/menuCard.h@{client/menuCard.h}} +\mbox{\hyperlink{menu_card_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ MENUCARD\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ MENUCARD\_H}} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ } +\DoxyCodeLine{00006\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{namespace_ui}{Ui}}\ \{} +\DoxyCodeLine{00007\ \textcolor{keyword}{class\ }menuCard;} +\DoxyCodeLine{00008\ \}} +\DoxyCodeLine{00009\ } +\DoxyCodeLine{00016\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classmenu_card_a2031e638510376289c988f8c9799ab5b}{menuCard}}\ :\ \textcolor{keyword}{public}\ QWidget} +\DoxyCodeLine{00017\ \{} +\DoxyCodeLine{00018\ \ \ \ \ Q\_OBJECT} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{classmenu_card_a2031e638510376289c988f8c9799ab5b}{menuCard}}(QString\ day,\ QStringList\ products,\ \textcolor{keywordtype}{int}\ calories,\ QVector\&\ pfc,\ \textcolor{keywordtype}{int}\ weight,\ \textcolor{keywordtype}{int}\ price,\ QWidget\ *parent\ =\ \textcolor{keyword}{nullptr});} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00036\ \ \ \ \ \mbox{\hyperlink{classmenu_card_af0a4efa29020e128e125a4693b989024}{\string~menuCard}}();} +\DoxyCodeLine{00037\ } +\DoxyCodeLine{00038\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00039\ \ \ \ \ Ui::menuCard\ *\mbox{\hyperlink{classmenu_card_a71b7e60bf8f8341de5cd2631e8701e77}{ui}};\ } +\DoxyCodeLine{00040\ \};} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ MENUCARD\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/menucard_8cpp.tex b/docs/doxygen/latex/menucard_8cpp.tex new file mode 100644 index 0000000..99aa5f5 --- /dev/null +++ b/docs/doxygen/latex/menucard_8cpp.tex @@ -0,0 +1,12 @@ +\doxysection{client/menucard.cpp File Reference} +\hypertarget{menucard_8cpp}{}\label{menucard_8cpp}\index{client/menucard.cpp@{client/menucard.cpp}} +{\ttfamily \#include "{}menu\+Card.\+h"{}}\newline +{\ttfamily \#include "{}ui\+\_\+menu\+Card.\+h"{}}\newline +Include dependency graph for menucard.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=250pt]{menucard_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/menucard_8cpp__incl.dot b/docs/doxygen/latex/menucard_8cpp__incl.dot new file mode 100644 index 0000000..f4ac155 --- /dev/null +++ b/docs/doxygen/latex/menucard_8cpp__incl.dot @@ -0,0 +1,14 @@ +digraph "client/menucard.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/menucard.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge4_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="menuCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$menu_card_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge5_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge6_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="ui_menuCard.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/menucard_8cpp__incl.md5 b/docs/doxygen/latex/menucard_8cpp__incl.md5 new file mode 100644 index 0000000..0df52a8 --- /dev/null +++ b/docs/doxygen/latex/menucard_8cpp__incl.md5 @@ -0,0 +1 @@ +3336cd36a1716509abc4d6180783e96a \ No newline at end of file diff --git a/docs/doxygen/latex/menucard_8cpp__incl.pdf b/docs/doxygen/latex/menucard_8cpp__incl.pdf new file mode 100644 index 0000000..fc9410b Binary files /dev/null and b/docs/doxygen/latex/menucard_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/mytcpserver_8cpp.tex b/docs/doxygen/latex/mytcpserver_8cpp.tex new file mode 100644 index 0000000..f7a0e5e --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8cpp.tex @@ -0,0 +1,14 @@ +\doxysection{server/mytcpserver.cpp File Reference} +\hypertarget{mytcpserver_8cpp}{}\label{mytcpserver_8cpp}\index{server/mytcpserver.cpp@{server/mytcpserver.cpp}} +{\ttfamily \#include "{}mytcpserver.\+h"{}}\newline +{\ttfamily \#include $<$QDebug$>$}\newline +{\ttfamily \#include $<$QCore\+Application$>$}\newline +{\ttfamily \#include $<$QString$>$}\newline +{\ttfamily \#include "{}func2serv.\+h"{}}\newline +Include dependency graph for mytcpserver.\+cpp\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{mytcpserver_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/mytcpserver_8cpp__incl.dot b/docs/doxygen/latex/mytcpserver_8cpp__incl.dot new file mode 100644 index 0000000..a4fcde4 --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8cpp__incl.dot @@ -0,0 +1,33 @@ +digraph "server/mytcpserver.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/mytcpserver.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge15_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="mytcpserver.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge16_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node4 [id="edge17_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QTcpServer",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node5 [id="edge18_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node6 [id="edge19_Node000002_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node7 [id="edge20_Node000002_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node8 [id="edge21_Node000002_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node2 -> Node9 [id="edge22_Node000002_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node8 [id="edge23_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node1 -> Node10 [id="edge24_Node000001_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QCoreApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node11 [id="edge25_Node000001_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QString",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node12 [id="edge26_Node000001_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="func2serv.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$func2serv_8h.html",tooltip=" "]; + Node12 -> Node7 [id="edge27_Node000012_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node12 -> Node8 [id="edge28_Node000012_Node000008",color="steelblue1",style="solid",tooltip=" "]; +} diff --git a/docs/doxygen/latex/mytcpserver_8cpp__incl.md5 b/docs/doxygen/latex/mytcpserver_8cpp__incl.md5 new file mode 100644 index 0000000..a363a97 --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8cpp__incl.md5 @@ -0,0 +1 @@ +412db3576bfa7528cb375a0db2048945 \ No newline at end of file diff --git a/docs/doxygen/latex/mytcpserver_8cpp__incl.pdf b/docs/doxygen/latex/mytcpserver_8cpp__incl.pdf new file mode 100644 index 0000000..0d44cad Binary files /dev/null and b/docs/doxygen/latex/mytcpserver_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/mytcpserver_8h.tex b/docs/doxygen/latex/mytcpserver_8h.tex new file mode 100644 index 0000000..bc898bd --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8h.tex @@ -0,0 +1,29 @@ +\doxysection{server/mytcpserver.h File Reference} +\hypertarget{mytcpserver_8h}{}\label{mytcpserver_8h}\index{server/mytcpserver.h@{server/mytcpserver.h}} +{\ttfamily \#include $<$QObject$>$}\newline +{\ttfamily \#include $<$QTcp\+Server$>$}\newline +{\ttfamily \#include $<$QTcp\+Socket$>$}\newline +{\ttfamily \#include $<$Qt\+Network$>$}\newline +{\ttfamily \#include $<$QByte\+Array$>$}\newline +{\ttfamily \#include $<$QDebug$>$}\newline +{\ttfamily \#include $<$QMap$>$}\newline +Include dependency graph for mytcpserver.\+h\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{mytcpserver_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=302pt]{mytcpserver_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_my_tcp_server}{My\+Tcp\+Server}} +\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/mytcpserver_8h__dep__incl.dot b/docs/doxygen/latex/mytcpserver_8h__dep__incl.dot new file mode 100644 index 0000000..eb41b2f --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8h__dep__incl.dot @@ -0,0 +1,12 @@ +digraph "server/mytcpserver.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/mytcpserver.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge3_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="server/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$server_2main_8cpp.html",tooltip=" "]; + Node1 -> Node3 [id="edge4_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="server/mytcpserver.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/mytcpserver_8h__dep__incl.md5 b/docs/doxygen/latex/mytcpserver_8h__dep__incl.md5 new file mode 100644 index 0000000..990aa20 --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8h__dep__incl.md5 @@ -0,0 +1 @@ +1aa9f4f6f95e87dcdf3df7bc092377be \ No newline at end of file diff --git a/docs/doxygen/latex/mytcpserver_8h__dep__incl.pdf b/docs/doxygen/latex/mytcpserver_8h__dep__incl.pdf new file mode 100644 index 0000000..63c8aea Binary files /dev/null and b/docs/doxygen/latex/mytcpserver_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/mytcpserver_8h__incl.dot b/docs/doxygen/latex/mytcpserver_8h__incl.dot new file mode 100644 index 0000000..4e13870 --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8h__incl.dot @@ -0,0 +1,22 @@ +digraph "server/mytcpserver.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/mytcpserver.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge8_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge9_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QTcpServer",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge10_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge11_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge12_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge13_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node8 [id="edge14_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/mytcpserver_8h__incl.md5 b/docs/doxygen/latex/mytcpserver_8h__incl.md5 new file mode 100644 index 0000000..c9459f0 --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8h__incl.md5 @@ -0,0 +1 @@ +37d0d8275e50a537357b867ec81c2844 \ No newline at end of file diff --git a/docs/doxygen/latex/mytcpserver_8h__incl.pdf b/docs/doxygen/latex/mytcpserver_8h__incl.pdf new file mode 100644 index 0000000..7df3a0f Binary files /dev/null and b/docs/doxygen/latex/mytcpserver_8h__incl.pdf differ diff --git a/docs/doxygen/latex/mytcpserver_8h_source.tex b/docs/doxygen/latex/mytcpserver_8h_source.tex new file mode 100644 index 0000000..92251a1 --- /dev/null +++ b/docs/doxygen/latex/mytcpserver_8h_source.tex @@ -0,0 +1,38 @@ +\doxysection{mytcpserver.\+h} +\hypertarget{mytcpserver_8h_source}{}\label{mytcpserver_8h_source}\index{server/mytcpserver.h@{server/mytcpserver.h}} +\mbox{\hyperlink{mytcpserver_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ MYTCPSERVER\_H}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ MYTCPSERVER\_H}} +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_my_tcp_server_acf367c4695b4d160c7a2d25c2afaaec4}{MyTcpServer}}\ :\ \textcolor{keyword}{public}\ QObject} +\DoxyCodeLine{00012\ \{} +\DoxyCodeLine{00013\ \ \ \ \ Q\_OBJECT} +\DoxyCodeLine{00014\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00015\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{class_my_tcp_server_acf367c4695b4d160c7a2d25c2afaaec4}{MyTcpServer}}(QObject\ *parent\ =\ \textcolor{keyword}{nullptr});\ } +\DoxyCodeLine{00016\ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server_ab39e651ff7c37c152215c02c225e79ef}{\string~MyTcpServer}}();\ } +\DoxyCodeLine{00017\ } +\DoxyCodeLine{00018\ \textcolor{keyword}{public}\ slots:} +\DoxyCodeLine{00022\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_my_tcp_server_a0ba7316ffe1a26c57fabde9e74b6c8dc}{slotNewConnection}}();} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_my_tcp_server_a3e040c49dbefd65b9a58ab662fc9f7a2}{slotClientDisconnected}}();} +\DoxyCodeLine{00028\ } +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_my_tcp_server_ab4a64d2eab985d723090963f5c8a2882}{slotServerRead}}();} +\DoxyCodeLine{00033\ } +\DoxyCodeLine{00034\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00035\ \ \ \ \ QTcpServer\ *\ \mbox{\hyperlink{class_my_tcp_server_a7d854875e1e02887023ec9aac1a1542c}{mTcpServer}};\ } +\DoxyCodeLine{00036\ \ \ \ \ QTcpSocket\ *\ \mbox{\hyperlink{class_my_tcp_server_ab55c030e6eb6cf5d1acfe6d7d2bf0ed1}{mTcpSocket}};\ } +\DoxyCodeLine{00037\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_my_tcp_server_ae0dc69dfef4f9fc3a5f031f4152e4f91}{server\_status}};\ } +\DoxyCodeLine{00038\ \ \ \ \ QMap\ \mbox{\hyperlink{class_my_tcp_server_aae9c5addbbedcfa39ccbe55204f473a3}{mSocketDescriptors}};\ } +\DoxyCodeLine{00039\ \};} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ MYTCPSERVER\_H}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/namespace_ui.tex b/docs/doxygen/latex/namespace_ui.tex new file mode 100644 index 0000000..c06c0f6 --- /dev/null +++ b/docs/doxygen/latex/namespace_ui.tex @@ -0,0 +1,2 @@ +\doxysection{Ui Namespace Reference} +\hypertarget{namespace_ui}{}\label{namespace_ui}\index{Ui@{Ui}} diff --git a/docs/doxygen/latex/namespaces.tex b/docs/doxygen/latex/namespaces.tex new file mode 100644 index 0000000..2cf7755 --- /dev/null +++ b/docs/doxygen/latex/namespaces.tex @@ -0,0 +1,4 @@ +\doxysection{Namespace List} +Here is a list of all namespaces with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{namespace_ui}{Ui}} }{\pageref{namespace_ui}}{} +\end{DoxyCompactList} diff --git a/docs/doxygen/latex/product_card_8cpp.tex b/docs/doxygen/latex/product_card_8cpp.tex new file mode 100644 index 0000000..0da02c3 --- /dev/null +++ b/docs/doxygen/latex/product_card_8cpp.tex @@ -0,0 +1,13 @@ +\doxysection{client/product\+Card.cpp File Reference} +\hypertarget{product_card_8cpp}{}\label{product_card_8cpp}\index{client/productCard.cpp@{client/productCard.cpp}} +{\ttfamily \#include "{}Product\+Card.\+h"{}}\newline +{\ttfamily \#include $<$QVBox\+Layout$>$}\newline +{\ttfamily \#include $<$QLabel$>$}\newline +Include dependency graph for product\+Card.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=319pt]{product_card_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/doxygen/latex/product_card_8cpp__incl.dot b/docs/doxygen/latex/product_card_8cpp__incl.dot new file mode 100644 index 0000000..90f34c2 --- /dev/null +++ b/docs/doxygen/latex/product_card_8cpp__incl.dot @@ -0,0 +1,16 @@ +digraph "client/productCard.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/productCard.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge5_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="ProductCard.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge6_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge7_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QVBoxLayout",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge8_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QLabel",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/product_card_8cpp__incl.md5 b/docs/doxygen/latex/product_card_8cpp__incl.md5 new file mode 100644 index 0000000..29cb49b --- /dev/null +++ b/docs/doxygen/latex/product_card_8cpp__incl.md5 @@ -0,0 +1 @@ +708e915892859d062dd6f7cce9e6ec3d \ No newline at end of file diff --git a/docs/doxygen/latex/product_card_8cpp__incl.pdf b/docs/doxygen/latex/product_card_8cpp__incl.pdf new file mode 100644 index 0000000..77e2f81 Binary files /dev/null and b/docs/doxygen/latex/product_card_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/product_card_8h.tex b/docs/doxygen/latex/product_card_8h.tex new file mode 100644 index 0000000..f0ca442 --- /dev/null +++ b/docs/doxygen/latex/product_card_8h.tex @@ -0,0 +1,24 @@ +\doxysection{client/product\+Card.h File Reference} +\hypertarget{product_card_8h}{}\label{product_card_8h}\index{client/productCard.h@{client/productCard.h}} +{\ttfamily \#include $<$QWidget$>$}\newline +Include dependency graph for product\+Card.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=184pt]{product_card_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{product_card_8h__dep__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classproduct_card}{product\+Card}} +\begin{DoxyCompactList}\small\item\em Виджет карточки продукта. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/doxygen/latex/product_card_8h__dep__incl.dot b/docs/doxygen/latex/product_card_8h__dep__incl.dot new file mode 100644 index 0000000..d6f9554 --- /dev/null +++ b/docs/doxygen/latex/product_card_8h__dep__incl.dot @@ -0,0 +1,23 @@ +digraph "client/productCard.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/productCard.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge9_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="client/mainwindow.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8h.html",tooltip=" "]; + Node2 -> Node3 [id="edge10_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="client/functions_for\l_client.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$functions__for__client_8cpp.html",tooltip=" "]; + Node2 -> Node4 [id="edge11_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="client/mainwindow.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mainwindow_8cpp.html",tooltip=" "]; + Node2 -> Node5 [id="edge12_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="client/managerforms.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8h.html",tooltip=" "]; + Node5 -> Node3 [id="edge13_Node000005_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node5 -> Node6 [id="edge14_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="client/main.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$client_2main_8cpp.html",tooltip=" "]; + Node5 -> Node7 [id="edge15_Node000005_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="client/managerforms.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$managerforms_8cpp.html",tooltip=" "]; + Node1 -> Node8 [id="edge16_Node000001_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="client/productCard.cpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$product_card_8cpp.html",tooltip=" "]; +} diff --git a/docs/doxygen/latex/product_card_8h__dep__incl.md5 b/docs/doxygen/latex/product_card_8h__dep__incl.md5 new file mode 100644 index 0000000..fd1238e --- /dev/null +++ b/docs/doxygen/latex/product_card_8h__dep__incl.md5 @@ -0,0 +1 @@ +f5ffa82bc21ba96cce03060fa59a27c7 \ No newline at end of file diff --git a/docs/doxygen/latex/product_card_8h__dep__incl.pdf b/docs/doxygen/latex/product_card_8h__dep__incl.pdf new file mode 100644 index 0000000..c0125eb Binary files /dev/null and b/docs/doxygen/latex/product_card_8h__dep__incl.pdf differ diff --git a/docs/doxygen/latex/product_card_8h__incl.dot b/docs/doxygen/latex/product_card_8h__incl.dot new file mode 100644 index 0000000..021830c --- /dev/null +++ b/docs/doxygen/latex/product_card_8h__incl.dot @@ -0,0 +1,10 @@ +digraph "client/productCard.h" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="client/productCard.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge2_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QWidget",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/product_card_8h__incl.md5 b/docs/doxygen/latex/product_card_8h__incl.md5 new file mode 100644 index 0000000..db7a13a --- /dev/null +++ b/docs/doxygen/latex/product_card_8h__incl.md5 @@ -0,0 +1 @@ +8176210430963b8d4c6d90134aa85809 \ No newline at end of file diff --git a/docs/doxygen/latex/product_card_8h__incl.pdf b/docs/doxygen/latex/product_card_8h__incl.pdf new file mode 100644 index 0000000..a93a7d8 Binary files /dev/null and b/docs/doxygen/latex/product_card_8h__incl.pdf differ diff --git a/docs/doxygen/latex/product_card_8h_source.tex b/docs/doxygen/latex/product_card_8h_source.tex new file mode 100644 index 0000000..6815fd5 --- /dev/null +++ b/docs/doxygen/latex/product_card_8h_source.tex @@ -0,0 +1,15 @@ +\doxysection{product\+Card.\+h} +\hypertarget{product_card_8h_source}{}\label{product_card_8h_source}\index{client/productCard.h@{client/productCard.h}} +\mbox{\hyperlink{product_card_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00003\ } +\DoxyCodeLine{00009\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classproduct_card_a095d77b284258000ed61c1a7e41c84ab}{productCard}}\ :\ \textcolor{keyword}{public}\ QWidget\ \{} +\DoxyCodeLine{00010\ \ \ \ \ Q\_OBJECT} +\DoxyCodeLine{00011\ } +\DoxyCodeLine{00012\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00022\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{classproduct_card_a095d77b284258000ed61c1a7e41c84ab}{productCard}}(QString\ name,\ \textcolor{keywordtype}{int}\ price,\ \textcolor{keywordtype}{int}\ proteins,\ \textcolor{keywordtype}{int}\ fatness,\ \textcolor{keywordtype}{int}\ carbs,\ QWidget\ *parent\ =\ \textcolor{keyword}{nullptr});} +\DoxyCodeLine{00023\ \};} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/refman.tex b/docs/doxygen/latex/refman.tex new file mode 100644 index 0000000..fc4d661 --- /dev/null +++ b/docs/doxygen/latex/refman.tex @@ -0,0 +1,302 @@ + % Handle batch mode + % to overcome problems with too many open files + \let\mypdfximage\pdfximage\def\pdfximage{\immediate\mypdfximage} + \RequirePackage{iftex} + \ifLuaTeX + \directlua{pdf.setminorversion(7)} + \fi + \ifXeTeX + \special{pdf:minorversion 7} + \fi + \ifPDFTeX + \pdfminorversion=7 + \fi + % Set document class depending on configuration + \documentclass[twoside]{book} + %% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package + \usepackage{ifthen} + \ifx\requestedLaTeXdate\undefined + \usepackage{array} + \else + \usepackage{array}[=2016-10-06] + \fi + %% + % Packages required by doxygen + \makeatletter + \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} + % suppress package identification of infwarerr as it contains the word "warning" + \let\@@protected@wlog\protected@wlog + \def\protected@wlog#1{\wlog{package info suppressed}} + \RequirePackage{infwarerr} + \let\protected@wlog\@@protected@wlog + \makeatother + \IfFormatAtLeastTF{2016/01/01}{}{\usepackage{fixltx2e}} % for \textsubscript + \ifPDFTeX + \IfFormatAtLeastTF{2015/01/01}{\pdfsuppresswarningpagegroup=1}{} + \fi + \usepackage{doxygen} + \usepackage{graphicx} + \iftutex + \usepackage{fontspec} + \defaultfontfeatures{Ligatures={TeX}} + \usepackage{unicode-math} + \else + \usepackage[utf8]{inputenc} + \fi + \usepackage{makeidx} + \PassOptionsToPackage{warn}{textcomp} + \usepackage{textcomp} + \usepackage[nointegrals]{wasysym} + \usepackage{ifxetex} + % NLS support packages + % Define default fonts + % Font selection + \iftutex + \else + \usepackage[T1]{fontenc} + \fi + % set main and monospaced font + \usepackage[scaled=.90]{helvet} +\usepackage{courier} +\renewcommand{\familydefault}{\sfdefault} + \doxyallsectionsfont{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \renewcommand{\DoxyLabelFont}{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} + % Arguments of doxygenemoji: + % 1) '::' form of the emoji, already LaTeX-escaped + % 2) file with the name of the emoji without the .png extension + % in case image exist use this otherwise use the '::' form + \newcommand{\doxygenemoji}[2]{% + \IfFileExists{./#2.png}{\raisebox{-0.1em}{\includegraphics[height=0.9em]{./#2.png}}}{#1}% + } + % Page & text layout + \usepackage{geometry} + \geometry{% + a4paper,% + top=2.5cm,% + bottom=2.5cm,% + left=2.5cm,% + right=2.5cm% + } + \usepackage{changepage} + % Allow a bit of overflow to go unnoticed by other means + \tolerance=750 + \hfuzz=15pt + \hbadness=750 + \setlength{\emergencystretch}{15pt} + \setlength{\parindent}{0cm} + \newcommand{\doxynormalparskip}{\setlength{\parskip}{3ex plus 2ex minus 2ex}} + \newcommand{\doxytocparskip}{\setlength{\parskip}{1ex plus 0ex minus 0ex}} + \doxynormalparskip + % Redefine paragraph/subparagraph environments, using sectsty fonts + \makeatletter + \renewcommand{\paragraph}{% + \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@parafont% + }% + } + \renewcommand{\subparagraph}{% + \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@subparafont% + }% + } + \makeatother + \makeatletter + \newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@} + \makeatother + % Headers & footers + \usepackage{fancyhdr} + \pagestyle{fancyplain} + \renewcommand{\footrulewidth}{0.4pt} + \fancypagestyle{fancyplain}{ + \fancyhf{} + \fancyhead[LE, RO]{\bfseries\thepage} + \fancyhead[LO]{\bfseries\rightmark} + \fancyhead[RE]{\bfseries\leftmark} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + } + \fancypagestyle{plain}{ + \fancyhf{} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + \renewcommand{\headrulewidth}{0pt} + } + \pagestyle{fancyplain} + \renewcommand{\chaptermark}[1]{% + \markboth{#1}{}% + } + \renewcommand{\sectionmark}[1]{% + \markright{\thesection\ #1}% + } + % ToC, LoF, LoT, bibliography, and index + % Indices & bibliography + \usepackage[numbers]{natbib} + \usepackage[titles]{tocloft} + \setcounter{tocdepth}{3} + \setcounter{secnumdepth}{5} + % creating indexes + \makeindex + \ifPDFTeX +\usepackage{newunicodechar} + \makeatletter + \def\doxynewunicodechar#1#2{% + \@tempswafalse + \edef\nuc@tempa{\detokenize{#1}}% + \if\relax\nuc@tempa\relax + \nuc@emptyargerr + \else + \edef\@tempb{\expandafter\@car\nuc@tempa\@nil}% + \nuc@check + \if@tempswa + \@namedef{u8:\nuc@tempa}{#2}% + \fi + \fi + } + \makeatother + \doxynewunicodechar{⁻}{${}^{-}$}% Superscript minus + \doxynewunicodechar{²}{${}^{2}$}% Superscript two + \doxynewunicodechar{³}{${}^{3}$}% Superscript three +\fi + % Hyperlinks + % Hyperlinks (required, but should be loaded last) + \ifPDFTeX + \usepackage[pdftex,pagebackref=true]{hyperref} + \else + \ifXeTeX + \usepackage[xetex,pagebackref=true]{hyperref} + \else + \ifLuaTeX + \usepackage[luatex,pagebackref=true]{hyperref} + \else + \usepackage[ps2pdf,pagebackref=true]{hyperref} + \fi + \fi + \fi + \hypersetup{% + colorlinks=true,% + linkcolor=blue,% + citecolor=blue,% + unicode,% + pdftitle={My Project},% + pdfsubject={Project description}% + } + % Custom commands used by the header + % Custom commands + \newcommand{\clearemptydoublepage}{% + \newpage{\pagestyle{empty}\cleardoublepage}% + } + % caption style definition + \usepackage{caption} + \captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top} + % in page table of contents + \IfFormatAtLeastTF{2023/05/01}{\usepackage[deeplevels]{etoc}}{\usepackage[deeplevels]{etoc_doxygen}} + \etocsettocstyle{\doxytocparskip}{\doxynormalparskip} + \etocsetlevel{subsubsubsection}{4} + \etocsetlevel{subsubsubsubsection}{5} + \etocsetlevel{subsubsubsubsubsection}{6} + \etocsetlevel{subsubsubsubsubsubsection}{7} + \etocsetlevel{paragraph}{8} + \etocsetlevel{subparagraph}{9} + % prevent numbers overlap the titles in toc + \renewcommand{\numberline}[1]{#1~} +% End of preamble, now comes the document contents +%===== C O N T E N T S ===== +\begin{document} + \raggedbottom + % Titlepage & ToC + % To avoid duplicate page anchors due to reuse of same numbers for + % the index (be it as roman numbers) + \hypersetup{pageanchor=false, + bookmarksnumbered=true, + pdfencoding=unicode + } + \pagenumbering{alph} + \begin{titlepage} + \vspace*{7cm} + \begin{center}% + {\Large My Project}\\ + \vspace*{1cm} + {\large Generated by Doxygen 1.13.2}\\ + \end{center} + \end{titlepage} + \clearemptydoublepage + \pagenumbering{roman} + \tableofcontents + \clearemptydoublepage + \pagenumbering{arabic} + % re-enable anchors again + \hypersetup{pageanchor=true} +%--- Begin generated contents --- +\chapter{Namespace Index} +\input{namespaces} +\chapter{Hierarchical Index} +\input{hierarchy} +\chapter{Class Index} +\input{annotated} +\chapter{File Index} +\input{files} +\chapter{Namespace Documentation} +\input{namespace_ui} +\chapter{Class Documentation} +\input{class_add_product_window} +\input{class_auth_reg_window} +\input{class_client_singleton} +\input{class_client_singleton_destroyer} +\input{class_data_base_singleton} +\input{class_main_window} +\input{class_manager_forms} +\input{classmenu_card} +\input{class_my_tcp_server} +\input{classproduct_card} +\input{class_singleton_destroyer} +\chapter{File Documentation} +\input{add__product_8cpp} +\input{add__product_8h} +\input{add__product_8h_source} +\input{authregwindow_8cpp} +\input{authregwindow_8h} +\input{authregwindow_8h_source} +\input{functions__for__client_8cpp} +\input{functions__for__client_8h} +\input{functions__for__client_8h_source} +\input{mainwindow_8cpp} +\input{mainwindow_8h} +\input{mainwindow_8h_source} +\input{managerforms_8cpp} +\input{managerforms_8h} +\input{managerforms_8h_source} +\input{menucard_8cpp} +\input{menu_card_8h} +\input{menu_card_8h_source} +\input{product_card_8cpp} +\input{product_card_8h} +\input{product_card_8h_source} +\input{_singleton_8cpp} +\input{_singleton_8h} +\input{_singleton_8h_source} +\input{databasesingleton_8cpp} +\input{databasesingleton_8h} +\input{databasesingleton_8h_source} +\input{func2serv_8cpp} +\input{func2serv_8h} +\input{func2serv_8h_source} +\input{client_2main_8cpp} +\input{server_2main_8cpp} +\input{mytcpserver_8cpp} +\input{mytcpserver_8h} +\input{mytcpserver_8h_source} +%--- End generated contents --- +% Index + \backmatter + \newpage + \phantomsection + \clearemptydoublepage + \addcontentsline{toc}{chapter}{\indexname} + \printindex +% Required for some languages (in combination with latexdocumentpre from the header) +\end{document} diff --git a/docs/doxygen/latex/server_2main_8cpp.tex b/docs/doxygen/latex/server_2main_8cpp.tex new file mode 100644 index 0000000..110ac0b --- /dev/null +++ b/docs/doxygen/latex/server_2main_8cpp.tex @@ -0,0 +1,48 @@ +\doxysection{server/main.cpp File Reference} +\hypertarget{server_2main_8cpp}{}\label{server_2main_8cpp}\index{server/main.cpp@{server/main.cpp}} +{\ttfamily \#include $<$QCore\+Application$>$}\newline +{\ttfamily \#include $<$QObject$>$}\newline +{\ttfamily \#include $<$QVariant$>$}\newline +{\ttfamily \#include $<$QSql\+Database$>$}\newline +{\ttfamily \#include $<$QSql\+Query$>$}\newline +{\ttfamily \#include "{}mytcpserver.\+h"{}}\newline +{\ttfamily \#include "{}databasesingleton.\+h"{}}\newline +Include dependency graph for main.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{server_2main_8cpp__incl} +\end{center} +\end{figure} +\doxysubsubsection*{Functions} +\begin{DoxyCompactItemize} +\item +int \mbox{\hyperlink{server_2main_8cpp_a0ddf1224851353fc92bfbff6f499fa97}{main}} (int argc, char \texorpdfstring{$\ast$}{*}argv\mbox{[}$\,$\mbox{]}) +\end{DoxyCompactItemize} + + +\doxysubsection{Function Documentation} +\Hypertarget{server_2main_8cpp_a0ddf1224851353fc92bfbff6f499fa97}\index{main.cpp@{main.cpp}!main@{main}} +\index{main@{main}!main.cpp@{main.cpp}} +\doxysubsubsection{\texorpdfstring{main()}{main()}} +{\footnotesize\ttfamily \label{server_2main_8cpp_a0ddf1224851353fc92bfbff6f499fa97} +int main (\begin{DoxyParamCaption}\item[{int}]{argc}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{argv}{\mbox{[}$\,$\mbox{]}}\end{DoxyParamCaption})} + + +\begin{DoxyCode}{0} +\DoxyCodeLine{00011\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00012\ \ \ \ \ QCoreApplication\ a(argc,\ argv);} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00014\ \ \ \ \ \textcolor{comment}{//\ Инициализация\ БД}} +\DoxyCodeLine{00015\ \ \ \ \ \mbox{\hyperlink{class_data_base_singleton}{DataBaseSingleton}}*\ db\ =\ \mbox{\hyperlink{class_data_base_singleton_ae1a24c20c524fd67554e1ffe66319ede}{DataBaseSingleton::getInstance}}();} +\DoxyCodeLine{00016\ \ \ \ \ \textcolor{keywordflow}{if}\ (!db-\/>\mbox{\hyperlink{class_data_base_singleton_a59bda63308000a018c5bdc1989582e50}{initialize}}(\textcolor{stringliteral}{"{}Easyweek.db"{}}))\ \{} +\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ qFatal(\textcolor{stringliteral}{"{}Failed\ to\ initialize\ database"{}});} +\DoxyCodeLine{00018\ \ \ \ \ \}} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \ \ \ \ \mbox{\hyperlink{class_my_tcp_server}{MyTcpServer}}\ myserv;} +\DoxyCodeLine{00022\ \ \ \ \ \textcolor{keywordflow}{return}\ a.exec();} +\DoxyCodeLine{00023\ \}} + +\end{DoxyCode} diff --git a/docs/doxygen/latex/server_2main_8cpp__incl.dot b/docs/doxygen/latex/server_2main_8cpp__incl.dot new file mode 100644 index 0000000..3613b35 --- /dev/null +++ b/docs/doxygen/latex/server_2main_8cpp__incl.dot @@ -0,0 +1,44 @@ +digraph "server/main.cpp" +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; + node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; + Node1 [id="Node000001",label="server/main.cpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; + Node1 -> Node2 [id="edge21_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; + Node2 [id="Node000002",label="QCoreApplication",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node3 [id="edge22_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node3 [id="Node000003",label="QObject",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node4 [id="edge23_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; + Node4 [id="Node000004",label="QVariant",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node5 [id="edge24_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node5 [id="Node000005",label="QSqlDatabase",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node6 [id="edge25_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node6 [id="Node000006",label="QSqlQuery",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node7 [id="edge26_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; + Node7 [id="Node000007",label="mytcpserver.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$mytcpserver_8h.html",tooltip=" "]; + Node7 -> Node3 [id="edge27_Node000007_Node000003",color="steelblue1",style="solid",tooltip=" "]; + Node7 -> Node8 [id="edge28_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; + Node8 [id="Node000008",label="QTcpServer",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node9 [id="edge29_Node000007_Node000009",color="steelblue1",style="solid",tooltip=" "]; + Node9 [id="Node000009",label="QTcpSocket",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node10 [id="edge30_Node000007_Node000010",color="steelblue1",style="solid",tooltip=" "]; + Node10 [id="Node000010",label="QtNetwork",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node11 [id="edge31_Node000007_Node000011",color="steelblue1",style="solid",tooltip=" "]; + Node11 [id="Node000011",label="QByteArray",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node12 [id="edge32_Node000007_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node12 [id="Node000012",label="QDebug",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node7 -> Node13 [id="edge33_Node000007_Node000013",color="steelblue1",style="solid",tooltip=" "]; + Node13 [id="Node000013",label="QMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node1 -> Node14 [id="edge34_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; + Node14 [id="Node000014",label="databasesingleton.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$databasesingleton_8h.html",tooltip=" "]; + Node14 -> Node5 [id="edge35_Node000014_Node000005",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node6 [id="edge36_Node000014_Node000006",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node15 [id="edge37_Node000014_Node000015",color="steelblue1",style="solid",tooltip=" "]; + Node15 [id="Node000015",label="QSqlError",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node14 -> Node12 [id="edge38_Node000014_Node000012",color="steelblue1",style="solid",tooltip=" "]; + Node14 -> Node16 [id="edge39_Node000014_Node000016",color="steelblue1",style="solid",tooltip=" "]; + Node16 [id="Node000016",label="QVariantMap",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; + Node14 -> Node17 [id="edge40_Node000014_Node000017",color="steelblue1",style="solid",tooltip=" "]; + Node17 [id="Node000017",label="QVector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; +} diff --git a/docs/doxygen/latex/server_2main_8cpp__incl.md5 b/docs/doxygen/latex/server_2main_8cpp__incl.md5 new file mode 100644 index 0000000..145ef3f --- /dev/null +++ b/docs/doxygen/latex/server_2main_8cpp__incl.md5 @@ -0,0 +1 @@ +4e0b82e733d180a5ef38fec20b2c5087 \ No newline at end of file diff --git a/docs/doxygen/latex/server_2main_8cpp__incl.pdf b/docs/doxygen/latex/server_2main_8cpp__incl.pdf new file mode 100644 index 0000000..ca70adb Binary files /dev/null and b/docs/doxygen/latex/server_2main_8cpp__incl.pdf differ diff --git a/docs/doxygen/latex/tabu_doxygen.sty b/docs/doxygen/latex/tabu_doxygen.sty new file mode 100644 index 0000000..3f17d1d --- /dev/null +++ b/docs/doxygen/latex/tabu_doxygen.sty @@ -0,0 +1,2557 @@ +%% +%% This is file `tabu.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% tabu.dtx (with options: `package') +%% +%% This is a generated file. +%% Copyright (FC) 2010-2011 - lppl +%% +%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars +%% +%% ********************************************************************************************** +%% \begin{tabu} { preamble } => default target: \linewidth or \linegoal +%% \begin{tabu} to { preamble } => target specified +%% \begin{tabu} spread { preamble } => target relative to the ``natural width'' +%% +%% tabu works in text and in math modes. +%% +%% X columns: automatic width adjustment + horizontal and vertical alignment +%% \begin{tabu} { X[4c] X[1c] X[-2ml] } +%% +%% Horizontal lines and / or leaders: +%% \hline\hline => double horizontal line +%% \firsthline\hline => for nested tabulars +%% \lasthline\hline => for nested tabulars +%% \tabucline[line spec]{column-column} => ``funny'' lines (dash/leader) +%% Automatic lines / leaders : +%% \everyrow{\hline\hline} +%% +%% Vertical lines and / or leaders: +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt blue] } +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt on 2pt off 4pt blue] } +%% +%% Fixed vertical spacing adjustment: +%% \extrarowheight= \extrarowdepth= +%% or: \extrarowsep= => may be prefixed by \global +%% +%% Dynamic vertical spacing adjustment: +%% \abovetabulinesep= \belowtabulinesep= +%% or: \tabulinesep= => may be prefixed by \global +%% +%% delarray.sty shortcuts: in math and text modes +%% \begin{tabu} .... \({ preamble }\) +%% +%% Algorithms reports: +%% \tracingtabu=1 \tracingtabu=2 +%% +%% ********************************************************************************************** +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% +%% This work consists of the main source file tabu.dtx +%% and the derived files +%% tabu.sty, tabu.pdf, tabu.ins +%% +%% tabu : Flexible LaTeX tabulars +%% lppl copyright 2010-2011 by FC +%% + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{tabu_doxygen}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC), frozen version for doxygen] +\RequirePackage{array}[2008/09/09] +\RequirePackage{varwidth}[2009/03/30] +\AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined} +\let\tabu@AtEnd\@empty +\def\TMP@EnsureCode#1={% + \edef\tabu@AtEnd{\tabu@AtEnd + \catcode#1 \the\catcode#1}% + \catcode#1=% +}% \TMP@EnsureCode +\TMP@EnsureCode 33 = 12 % ! +\TMP@EnsureCode 58 = 12 % : (for siunitx) +\TMP@EnsureCode124 = 12 % | +\TMP@EnsureCode 36 = 3 % $ = math shift +\TMP@EnsureCode 38 = 4 % & = tab alignment character +\TMP@EnsureCode 32 = 10 % space +\TMP@EnsureCode 94 = 7 % ^ +\TMP@EnsureCode 95 = 8 % _ +%% Constants -------------------------------------------------------- +\newcount \c@taburow \def\thetaburow {\number\c@taburow} +\newcount \tabu@nbcols +\newcount \tabu@cnt +\newcount \tabu@Xcol +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcount \tabu@alloc \tabu@alloc=\m@ne +\newcount \tabu@nested +\def\tabu@alloc@{\global\advance\tabu@alloc \@ne \tabu@nested\tabu@alloc} +\newdimen \tabu@target +\newdimen \tabu@spreadtarget +\newdimen \tabu@naturalX +\newdimen \tabucolX +\let\tabu@DELTA \@tempdimc +\let\tabu@thick \@tempdima +\let\tabu@on \@tempdimb +\let\tabu@off \@tempdimc +\newdimen \tabu@Xsum +\newdimen \extrarowdepth +\newdimen \abovetabulinesep +\newdimen \belowtabulinesep +\newdimen \tabustrutrule \tabustrutrule \z@ +\newtoks \tabu@thebody +\newtoks \tabu@footnotes +\newsavebox \tabu@box +\newsavebox \tabu@arstrutbox +\newsavebox \tabu@hleads +\newsavebox \tabu@vleads +\newif \iftabu@colortbl +\newif \iftabu@siunitx +\newif \iftabu@measuring +\newif \iftabu@spread +\newif \iftabu@negcoef +\newif \iftabu@everyrow +\def\tabu@everyrowtrue {\global\let\iftabu@everyrow \iftrue} +\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse} +\newif \iftabu@long +\newif \iftabuscantokens +\def\tabu@rescan {\tabu@verbatim \scantokens } +%% Utilities (for internal usage) ----------------------------------- +\def\tabu@gobblespace #1 {#1} +\def\tabu@gobbletoken #1#2{#1} +\def\tabu@gobbleX{\futurelet\@let@token \tabu@gobblex} +\def\tabu@gobblex{\if ^^J\noexpand\@let@token \expandafter\@gobble + \else\ifx \@sptoken\@let@token + \expandafter\tabu@gobblespace\expandafter\tabu@gobbleX + \fi\fi +}% \tabu@gobblex +\def\tabu@X{^^J} +{\obeyspaces +\global\let\tabu@spxiii= % saves an active space (for \ifx) +\gdef\tabu@@spxiii{ }} +\def\tabu@ifenvir {% only for \multicolumn + \expandafter\tabu@if@nvir\csname\@currenvir\endcsname +}% \tabu@ifenvir +\def\tabu@if@nvir #1{\csname @\ifx\tabu#1first\else + \ifx\longtabu#1first\else + second\fi\fi oftwo\endcsname +}% \tabu@ifenvir +\def\tabu@modulo #1#2{\numexpr\ifnum\numexpr#1=\z@ 0\else #1-(#1-(#2-1)/2)/(#2)*(#2)\fi} +{\catcode`\&=3 +\gdef\tabu@strtrim #1{% #1 = control sequence to trim + \ifodd 1\ifx #1\@empty \else \ifx #1\space \else 0\fi \fi + \let\tabu@c@l@r \@empty \let#1\@empty + \else \expandafter \tabu@trimspaces #1\@nnil + \fi +}% \tabu@strtrim +\gdef\tabu@trimspaces #1\@nnil{\let\tabu@c@l@r=#2\tabu@firstspace .#1& }% +\gdef\tabu@firstspace #1#2#3 &{\tabu@lastspace #2#3&} +\gdef\tabu@lastspace #1{\def #3{#1}% + \ifx #3\tabu@c@l@r \def\tabu@c@l@r{\protect\color{#1}}\expandafter\remove@to@nnil \fi + \tabu@trimspaces #1\@nnil} +}% \catcode +\def\tabu@sanitizearg #1#2{{% + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2% + \expandafter}\expandafter\def\expandafter#2\expandafter{#2}% +}% \tabu@sanitizearg +\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}% + \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!! +}% \tabu@textbar +\def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi} +\def\tabu@everyrow@egroup{% + \iftabu@everyrow \expandafter \endgroup \the\toks@ + \else \ifnum0=`{\fi}% + \fi +}% \tabu@everyrow@egroup +\def\tabu@arstrut {\global\setbox\@arstrutbox \hbox{\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \z@}% +}% \tabu@arstrut +\def\tabu@rearstrut {% + \@tempdima \arraystretch\dimexpr\ht\strutbox+\extrarowheight \relax + \@tempdimb \arraystretch\dimexpr\dp\strutbox+\extrarowdepth \relax + \ifodd 1\ifdim \ht\@arstrutbox=\@tempdima + \ifdim \dp\@arstrutbox=\@tempdimb 0 \fi\fi + \tabu@mkarstrut + \fi +}% \tabu@rearstrut +\def\tabu@@DBG #1{\ifdim\tabustrutrule>\z@ \color{#1}\fi} +\def\tabu@DBG@arstrut {\global\setbox\@arstrutbox + \hbox to\z@{\hbox to\z@{\hss + {\tabu@DBG{cyan}\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \z@ + width \tabustrutrule}\kern-\tabustrutrule + {\tabu@DBG{pink}\vrule + height \z@ + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \tabustrutrule}}}% +}% \tabu@DBG@arstrut +\def\tabu@save@decl{\toks\count@ \expandafter{\the\toks\expandafter\count@ + \@nextchar}}% +\def\tabu@savedecl{\ifcat$\d@llarend\else + \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode +}% \tabu@savedecl +\def\tabu@finalstrut #1{\unskip\ifhmode\nobreak\fi\vrule height\z@ depth\z@ width\z@} +\newcommand*\tabuDisableCommands {\g@addto@macro\tabu@trialh@@k } +\let\tabu@trialh@@k \@empty +\def\tabu@nowrite #1#{{\afterassignment}\toks@} +\let\tabu@write\write +\let\tabu@immediate\immediate +\def\tabu@WRITE{\begingroup + \def\immediate\write{\aftergroup\endgroup + \tabu@immediate\tabu@write}% +}% \tabu@WRITE +\expandafter\def\expandafter\tabu@GenericError\expandafter{% + \expandafter\tabu@WRITE\GenericError} +\def\tabu@warn{\tabu@WRITE\PackageWarning{tabu}} +\def\tabu@noxfootnote [#1]{\@gobble} +\def\tabu@nocolor #1#{\@gobble} +\newcommand*\tabu@norowcolor[2][]{} +\def\tabu@maybesiunitx #1{\def\tabu@temp{#1}% + \futurelet\@let@token \tabu@m@ybesiunitx} +\def\tabu@m@ybesiunitx #1{\def\tabu@m@ybesiunitx {% + \ifx #1\@let@token \let\tabu@cellleft \@empty \let\tabu@cellright \@empty \fi + \tabu@temp}% \tabu@m@ybesiunitx +}\expandafter\tabu@m@ybesiunitx \csname siunitx_table_collect_begin:Nn\endcsname +\def\tabu@celllalign@def #1{\def\tabu@celllalign{\tabu@maybesiunitx{#1}}}% +%% Fixed vertical spacing adjustment: \extrarowsep ------------------ +\newcommand*\extrarowsep{\edef\tabu@C@extra{\the\numexpr\tabu@C@extra+1}% + \iftabu@everyrow \aftergroup\tabu@Gextra + \else \aftergroup\tabu@n@Gextra + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@extra} \tabu@extra +}% \extrarowsep +\def\tabu@extra {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setextrasep \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extra +\def\tabu@setextra #1#2{\def\tabu@temp{\tabu@extr@#1#2}\afterassignment\tabu@temp#2} +\def\tabu@extr@ #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extr@ +\def\tabu@setextrasep {\extrarowheight=\extrarowdepth + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth +}% \tabu@setextrasep +\def\tabu@Gextra{\ifx \tabu@G@extra\@empty \else {\tabu@Rextra}\fi} +\def\tabu@n@Gextra{\ifx \tabu@G@extra\@empty \else \noalign{\tabu@Rextra}\fi} +\def\tabu@Rextra{\tabu@Grestore \tabu@G@extra \tabu@C@extra} +\let\tabu@C@extra \z@ +\let\tabu@G@extra \@empty +%% Dynamic vertical spacing adjustment: \tabulinesep ---------------- +\newcommand*\tabulinesep{\edef\tabu@C@linesep{\the\numexpr\tabu@C@linesep+1}% + \iftabu@everyrow \aftergroup\tabu@Glinesep + \else \aftergroup\tabu@n@Glinesep + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@linesep} \tabu@linesep +}% \tabulinesep +\def\tabu@linesep {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setlinesep \abovetabulinesep + \fi \tabu@temp}% +}% \tabu@linesep +\def\tabu@setsep #1#2{\def\tabu@temp{\tabu@sets@p#1#2}\afterassignment\tabu@temp#2} +\def\tabu@sets@p #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep + \fi \tabu@temp}% +}% \tabu@sets@p +\def\tabu@setlinesep {\belowtabulinesep=\abovetabulinesep + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep +}% \tabu@setlinesep +\def\tabu@Glinesep{\ifx \tabu@G@linesep\@empty \else {\tabu@Rlinesep}\fi} +\def\tabu@n@Glinesep{\ifx \tabu@G@linesep\@empty \else \noalign{\tabu@Rlinesep}\fi} +\def\tabu@Rlinesep{\tabu@Grestore \tabu@G@linesep \tabu@C@linesep} +\let\tabu@C@linesep \z@ +\let\tabu@G@linesep \@empty +%% \global\extrarowsep and \global\tabulinesep ------------------- +\def\tabu@Gsave #1#2#3#4{\xdef#1{#1% + \toks#2{\toks\the\currentgrouplevel{\global#3\the#3\global#4\the#4}}}% +}% \tabu@Gsave +\def\tabu@Grestore#1#2{% + \toks#2{}#1\toks\currentgrouplevel\expandafter{\expandafter}\the\toks#2\relax + \ifcat$\the\toks\currentgrouplevel$\else + \global\let#1\@empty \global\let#2\z@ + \the\toks\currentgrouplevel + \fi +}% \tabu@Grestore +%% Setting code for every row --------------------------------------- +\newcommand*\everyrow{\tabu@everyrow@bgroup + \tabu@start \z@ \tabu@stop \z@ \tabu@evrstartstop +}% \everyrow +\def\tabu@evrstartstop {\@ifnextchar^% + {\afterassignment \tabu@evrstartstop \tabu@stop=}% + {\ifx ^\@let@token + \afterassignment\tabu@evrstartstop \tabu@start=% + \else \afterassignment\tabu@everyr@w \toks@ + \fi}% +}% \tabu@evrstartstop +\def\tabu@everyr@w {% + \xdef\tabu@everyrow{% + \noexpand\tabu@everyrowfalse + \let\noalign \relax + \noexpand\tabu@rowfontreset + \iftabu@colortbl \noexpand\tabu@rc@ \fi % \taburowcolors + \let\noexpand\tabu@docline \noexpand\tabu@docline@evr + \the\toks@ + \noexpand\tabu@evrh@@k + \noexpand\tabu@rearstrut + \global\advance\c@taburow \@ne}% + \iftabu@everyrow \toks@\expandafter + {\expandafter\def\expandafter\tabu@evr@L\expandafter{\the\toks@}\ignorespaces}% + \else \xdef\tabu@evr@G{\the\toks@}% + \fi + \tabu@everyrow@egroup +}% \tabu@everyr@w +\def\tabu@evr {\def\tabu@evrh@@k} % for internal use only +\tabu@evr{} +%% line style and leaders ------------------------------------------- +\newcommand*\newtabulinestyle [1]{% + {\@for \@tempa :=#1\do{\expandafter\tabu@newlinestyle \@tempa==\@nil}}% +}% \newtabulinestyle +\def\tabu@newlinestyle #1=#2=#3\@nil{\tabu@getline {#2}% + \tabu@sanitizearg {#1}\@tempa + \ifodd 1\ifx \@tempa\@empty \ifdefined\tabu@linestyle@ 0 \fi\fi + \global\expandafter\let + \csname tabu@linestyle@\@tempa \endcsname =\tabu@thestyle \fi +}% \tabu@newlinestyle +\newcommand*\tabulinestyle [1]{\tabu@everyrow@bgroup \tabu@getline{#1}% + \iftabu@everyrow + \toks@\expandafter{\expandafter \def \expandafter + \tabu@ls@L\expandafter{\tabu@thestyle}\ignorespaces}% + \gdef\tabu@ls@{\tabu@ls@L}% + \else + \global\let\tabu@ls@G \tabu@thestyle + \gdef\tabu@ls@{\tabu@ls@G}% + \fi + \tabu@everyrow@egroup +}% \tabulinestyle +\newcommand*\taburulecolor{\tabu@everyrow@bgroup \tabu@textbar \tabu@rulecolor} +\def\tabu@rulecolor #1{\toks@{}% + \def\tabu@temp #1##1#1{\tabu@ruledrsc{##1}}\@ifnextchar #1% + \tabu@temp + \tabu@rulearc +}% \tabu@rulecolor +\def\tabu@ruledrsc #1{\edef\tabu@temp{#1}\tabu@strtrim\tabu@temp + \ifx \tabu@temp\@empty \def\tabu@temp{\tabu@rule@drsc@ {}{}}% + \else \edef\tabu@temp{\noexpand\tabu@rule@drsc@ {}{\tabu@temp}}% + \fi + \tabu@temp +}% \tabu@ruledrsc@ +\def\tabu@ruledrsc@ #1#{\tabu@rule@drsc@ {#1}} +\def\tabu@rule@drsc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@{\let\CT@drsc@ \relax}% + \else \toks@{\def\CT@drsc@{\color #1{#2}}}% + \fi + \else + \ifx \\#1#2\\\global\let\CT@drsc@ \relax + \else \gdef\CT@drsc@{\color #1{#2}}% + \fi + \fi + \tabu@rulearc +}% \tabu@rule@drsc@ +\def\tabu@rulearc #1#{\tabu@rule@arc@ {#1}} +\def\tabu@rule@arc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@\expandafter{\the\toks@ \def\CT@arc@{}}% + \else \toks@\expandafter{\the\toks@ \def\CT@arc@{\color #1{#2}}}% + \fi + \toks@\expandafter{\the\toks@ + \let\tabu@arc@L \CT@arc@ + \let\tabu@drsc@L \CT@drsc@ + \ignorespaces}% + \else + \ifx \\#1#2\\\gdef\CT@arc@{}% + \else \gdef\CT@arc@{\color #1{#2}}% + \fi + \global\let\tabu@arc@G \CT@arc@ + \global\let\tabu@drsc@G \CT@drsc@ + \fi + \tabu@everyrow@egroup +}% \tabu@rule@arc@ +\def\taburowcolors {\tabu@everyrow@bgroup \@testopt \tabu@rowcolors 1} +\def\tabu@rowcolors [#1]#2#{\tabu@rowc@lors{#1}{#2}} +\def\tabu@rowc@lors #1#2#3{% + \toks@{}\@defaultunits \count@ =\number0#2\relax \@nnil + \@defaultunits \tabu@start =\number0#1\relax \@nnil + \ifnum \count@<\tw@ \count@=\tw@ \fi + \advance\tabu@start \m@ne + \ifnum \tabu@start<\z@ \tabu@start \z@ \fi + \tabu@rowcolorseries #3\in@..\in@ \@nnil +}% \tabu@rowcolors +\def\tabu@rowcolorseries #1..#2\in@ #3\@nnil {% + \ifx \in@#1\relax + \iftabu@everyrow \toks@{\def\tabu@rc@{}\let\tabu@rc@L \tabu@rc@}% + \else \gdef\tabu@rc@{}\global\let\tabu@rc@G \tabu@rc@ + \fi + \else + \ifx \\#2\\\tabu@rowcolorserieserror \fi + \tabu@sanitizearg{#1}\tabu@temp + \tabu@sanitizearg{#2}\@tempa + \advance\count@ \m@ne + \iftabu@everyrow + \def\tabu@rc@ ##1##2##3##4{\def\tabu@rc@{% + \ifnum ##2=\c@taburow + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{##3}{##4}\fi + \ifnum \c@taburow<##2 \else + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\z@ + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}\fi}% + }\edef\x{\noexpand\tabu@rc@ {\the\count@} + {\the\tabu@start} + {\tabu@temp} + {\@tempa}% + }\x + \toks@\expandafter{\expandafter\def\expandafter\tabu@rc@\expandafter{\tabu@rc@}}% + \toks@\expandafter{\the\toks@ \let\tabu@rc@L \tabu@rc@ \ignorespaces}% + \else % inside \noalign + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{\tabu@temp}{\@tempa}% + \expandafter\resetcolorseries\expandafter[\the\count@]{tabu@rcseries@\the\tabu@nested}% + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \let\noalign \relax \rowcolor{tabu@rc@\the\tabu@nested}% + \def\tabu@rc@ ##1##2{\gdef\tabu@rc@{% + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\@ne + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}}% + }\edef\x{\noexpand\tabu@rc@{\the\count@}{\the\c@taburow}}\x + \global\let\tabu@rc@G \tabu@rc@ + \fi + \fi + \tabu@everyrow@egroup +}% \tabu@rowcolorseries +\tabuDisableCommands {\let\tabu@rc@ \@empty } +\def\tabu@rowcolorserieserror {\PackageError{tabu} + {Invalid syntax for \string\taburowcolors + \MessageBreak Please look at the documentation!}\@ehd +}% \tabu@rowcolorserieserror +\newcommand*\tabureset {% + \tabulinesep=\z@ \extrarowsep=\z@ \extratabsurround=\z@ + \tabulinestyle{}\everyrow{}\taburulecolor||{}\taburowcolors{}% +}% \tabureset +%% Parsing the line styles ------------------------------------------ +\def\tabu@getline #1{\begingroup + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef\tabu@temp{#1}\tabu@sanitizearg{#1}\@tempa + \let\tabu@thestyle \relax + \ifcsname tabu@linestyle@\@tempa \endcsname + \edef\tabu@thestyle{\endgroup + \def\tabu@thestyle{\expandafter\noexpand + \csname tabu@linestyle@\@tempa\endcsname}% + }\tabu@thestyle + \else \expandafter\tabu@definestyle \tabu@temp \@nil + \fi +}% \tabu@getline +\def\tabu@definestyle #1#2\@nil {\endlinechar \m@ne \makeatletter + \tabu@thick \maxdimen \tabu@on \maxdimen \tabu@off \maxdimen + \let\tabu@c@lon \@undefined \let\tabu@c@loff \@undefined + \ifodd 1\ifcat .#1\else\ifcat\relax #1\else 0\fi\fi % catcode 12 or non expandable cs + \def\tabu@temp{\tabu@getparam{thick}}% + \else \def\tabu@temp{\tabu@getparam{thick}\maxdimen}% + \fi + {% + \let\tabu@ \relax + \def\:{\obeyspaces \tabu@oXIII \tabu@commaXIII \edef\:}% (space active \: happy ;-)) + \scantokens{\:{\tabu@temp #1#2 \tabu@\tabu@}}% + \expandafter}\expandafter + \def\expandafter\:\expandafter{\:}% line spec rewritten now ;-) + \def\;{\def\:}% + \scantokens\expandafter{\expandafter\;\expandafter{\:}}% space is now inactive (catcode 10) + \let\tabu@ \tabu@getcolor \:% all arguments are ready now ;-) + \ifdefined\tabu@c@lon \else \let\tabu@c@lon\@empty \fi + \ifx \tabu@c@lon\@empty \def\tabu@c@lon{\CT@arc@}\fi + \ifdefined\tabu@c@loff \else \let\tabu@c@loff \@empty \fi + \ifdim \tabu@on=\maxdimen \ifdim \tabu@off<\maxdimen + \tabu@on \tabulineon \fi\fi + \ifdim \tabu@off=\maxdimen \ifdim \tabu@on<\maxdimen + \tabu@off \tabulineoff \fi\fi + \ifodd 1\ifdim \tabu@off=\maxdimen \ifdim \tabu@on=\maxdimen 0 \fi\fi + \in@true % + \else \in@false % + \fi + \ifdim\tabu@thick=\maxdimen \def\tabu@thick{\arrayrulewidth}% + \else \edef\tabu@thick{\the\tabu@thick}% + \fi + \edef \tabu@thestyle ##1##2{\endgroup + \def\tabu@thestyle{% + \ifin@ \noexpand\tabu@leadersstyle {\tabu@thick} + {\the\tabu@on}{##1} + {\the\tabu@off}{##2}% + \else \noexpand\tabu@rulesstyle + {##1\vrule width \tabu@thick}% + {##1\leaders \hrule height \tabu@thick \hfil}% + \fi}% + }\expandafter \expandafter + \expandafter \tabu@thestyle \expandafter + \expandafter \expandafter + {\expandafter\tabu@c@lon\expandafter}\expandafter{\tabu@c@loff}% +}% \tabu@definestyle +{\catcode`\O=\active \lccode`\O=`\o \catcode`\,=\active + \lowercase{\gdef\tabu@oXIII {\catcode`\o=\active \let O=\tabu@oxiii}} + \gdef\tabu@commaXIII {\catcode`\,=\active \let ,=\space} +}% \catcode +\def\tabu@oxiii #1{% + \ifcase \ifx n#1\z@ \else + \ifx f#1\@ne\else + \tw@ \fi\fi + \expandafter\tabu@onxiii + \or \expandafter\tabu@ofxiii + \else o% + \fi#1}% +\def\tabu@onxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx \tabu@spxiii#2\@ne\else + \tw@ \fi\fi\fi + \tabu@getparam{on}#2\expandafter\@gobble + \or \expandafter\tabu@onxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}}% +\def\tabu@ofxiii #1#2{% + \ifx #2f\expandafter\tabu@offxiii + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@offxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx\tabu@spxiii#2\@ne \else + \tw@ \fi\fi\fi + \tabu@getparam{off}#2\expandafter\@gobble + \or \expandafter\tabu@offxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@getparam #1{\tabu@ \csname tabu@#1\endcsname=} +\def\tabu@getcolor #1{% \tabu@ <- \tabu@getcolor after \edef + \ifx \tabu@#1\else % no more spec + \let\tabu@theparam=#1\afterassignment \tabu@getc@l@r #1\fi +}% \tabu@getcolor +\def\tabu@getc@l@r #1\tabu@ {% + \def\tabu@temp{#1}\tabu@strtrim \tabu@temp + \ifx \tabu@temp\@empty + \else%\ifcsname \string\color@\tabu@temp \endcsname % if the color exists + \ifx \tabu@theparam \tabu@off \let\tabu@c@loff \tabu@c@l@r + \else \let\tabu@c@lon \tabu@c@l@r + \fi + %\else \tabu@warncolour{\tabu@temp}% + \fi%\fi + \tabu@ % next spec +}% \tabu@getc@l@r +\def\tabu@warncolour #1{\PackageWarning{tabu} + {Color #1 is not defined. Default color used}% +}% \tabu@warncolour +\def\tabu@leadersstyle #1#2#3#4#5{\def\tabu@leaders{{#1}{#2}{#3}{#4}{#5}}% + \ifx \tabu@leaders\tabu@leaders@G \else + \tabu@LEADERS{#1}{#2}{#3}{#4}{#5}\fi +}% \tabu@leadersstyle +\def\tabu@rulesstyle #1#2{\let\tabu@leaders \@undefined + \gdef\tabu@thevrule{#1}\gdef\tabu@thehrule{#2}% +}% \tabu@rulesstyle +%% The leaders boxes ------------------------------------------------ +\def\tabu@LEADERS #1#2#3#4#5{%% width, dash, dash color, gap, gap color + {\let\color \tabu@color % => during trials -> \color = \tabu@nocolor + {% % but the leaders boxes should have colors ! + \def\@therule{\vrule}\def\@thick{height}\def\@length{width}% + \def\@box{\hbox}\def\@unbox{\unhbox}\def\@elt{\wd}% + \def\@skip{\hskip}\def\@ss{\hss}\def\tabu@leads{\tabu@hleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thehleaders \tabu@theleaders + }% + {% + \def\@therule{\hrule}\def\@thick{width}\def\@length{height}% + \def\@box{\vbox}\def\@unbox{\unvbox}\def\@elt{\ht}% + \def\@skip{\vskip}\def\@ss{\vss}\def\tabu@leads{\tabu@vleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thevleaders \tabu@theleaders + }% + \gdef\tabu@leaders@G{{#1}{#2}{#3}{#4}{#5}}% + }% +}% \tabu@LEADERS +\def\tabu@therule #1#2{\@therule \@thick#1\@length\dimexpr#2/2 \@depth\z@} +\def\tabu@l@@d@rs #1#2#3#4#5{%% width, dash, dash color, gap, gap color + \global\setbox \tabu@leads=\@box{% + {#3\tabu@therule{#1}{#2}}% + \ifx\\#5\\\@skip#4\else{#5\tabu@therule{#1}{#4*2}}\fi + {#3\tabu@therule{#1}{#2}}}% + \global\setbox\tabu@leads=\@box to\@elt\tabu@leads{\@ss + {#3\tabu@therule{#1}{#2}}\@unbox\tabu@leads}% + \edef\tabu@theleaders ##1{\def\noexpand\tabu@theleaders {% + {##1\tabu@therule{#1}{#2}}% + \xleaders \copy\tabu@leads \@ss + \tabu@therule{0pt}{-#2}{##1\tabu@therule{#1}{#2}}}% + }\tabu@theleaders{#3}% +}% \tabu@l@@d@rs +%% \tabu \endtabu \tabu* \longtabu \endlongtabu \longtabu* ---------- +\newcommand*\tabu {\tabu@longfalse + \ifmmode \def\tabu@ {\array}\def\endtabu {\endarray}% + \else \def\tabu@ {\tabu@tabular}\def\endtabu {\endtabular}\fi + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endtabu*\endcsname{\endtabu}% + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {tabu} +\let\tabu@tabular \tabular % +\expandafter\def\csname tabu*\endcsname{\tabuscantokenstrue \tabu} +\newcommand*\longtabu {\tabu@longtrue + \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi + \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}% + \LTchunksize=\@M + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endlongtabu*\endcsname{\endlongtabu}% + \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array struts } + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {longtabu} +\expandafter\def\csname longtabu*\endcsname{\tabuscantokenstrue \longtabu} +\def\tabu@nolongtabu{\PackageError{tabu} + {longtabu requires the longtable package}\@ehd} +%% Read the target and then : \tabular or \@array ------------------ +\def\tabu@settarget {\futurelet\@let@token \tabu@sett@rget } +\def\tabu@sett@rget {\tabu@target \z@ + \ifcase \ifx \bgroup\@let@token \z@ \else + \ifx \@sptoken\@let@token \@ne \else + \if t\@let@token \tw@ \else + \if s\@let@token \thr@@\else + \z@\fi\fi\fi\fi + \expandafter\tabu@begin + \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget + \or \expandafter\tabu@to + \or \expandafter\tabu@spread + \fi +}% \tabu@sett@rget +\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget} +\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget} +\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target } +\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoalt@rget } +\def\tabu@linegoalt@rget {% + \ifx \tabu@temp\LNGL@setlinegoal + \LNGL@setlinegoal \expandafter \@firstoftwo \fi % @gobbles \LNGL@setlinegoal + \tabu@begin +}% \tabu@linegoalt@rget +\def\tabu@begin #1#{% + \iftabu@measuring \expandafter\tabu@nestedmeasure \fi + \ifdim \tabu@target=\z@ \let\tabu@halignto \@empty + \else \edef\tabu@halignto{\tabu@halignto\the\tabu@target}% + \fi + \@testopt \tabu@tabu@ \tabu@aligndefault #1\@nil +}% \tabu@begin +\long\def\tabu@tabu@ [#1]#2\@nil #3{\tabu@setup + \def\tabu@align {#1}\def\tabu@savedpream{\NC@find #3}% + \tabu@ [\tabu@align ]#2{#3\tabu@rewritefirst }% +}% \tabu@tabu@ +\def\tabu@nestedmeasure {% + \ifodd 1\iftabu@spread \else \ifdim\tabu@target=\z@ \else 0 \fi\fi\relax + \tabu@spreadtrue + \else \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}% + \expandafter\tabu@collectbody\expandafter\tabu@quickrule + \expandafter\endgroup + \fi +}% \tabu@nestedmeasure +\def\tabu@quickrule {\indent\vrule height\z@ depth\z@ width\tabu@target} +%% \tabu@setup \tabu@init \tabu@indent +\def\tabu@setup{\tabu@alloc@ + \ifcase \tabu@nested + \ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@ + \let\tabu@afterendpar \par + \fi\fi\fi + \def\tabu@aligndefault{c}\tabu@init \tabu@indent + \else % + \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth + \fi + \let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined + \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% + \everycr{}\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu... + \let\@endpbox \tabu@endpbox % idem " " " " " " + \let\@tabarray \tabu@tabarray % idem " " " " " " + \tabu@setcleanup \tabu@setreset +}% \tabu@setup +\def\tabu@init{\tabu@starttimer \tabu@measuringfalse + \edef\tabu@hfuzz {\the\dimexpr\hfuzz+1sp}\global\tabu@footnotes{}% + \let\firsthline \tabu@firsthline \let\lasthline \tabu@lasthline + \let\firstline \tabu@firstline \let\lastline \tabu@lastline + \let\hline \tabu@hline \let\@xhline \tabu@xhline + \let\color \tabu@color \let\@arstrutbox \tabu@arstrutbox + \iftabu@colortbl\else\let\LT@@hline \tabu@LT@@hline \fi + \tabu@trivlist % + \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext + \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering + \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft + \let\tabudecimal \tabu@tabudecimal \let\Centering \tabu@Centering + \let\RaggedRight \tabu@RaggedRight \let\RaggedLeft \tabu@RaggedLeft + \let\justifying \tabu@justifying \let\rowfont \tabu@rowfont + \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x + \let\tabu@@everycr \everycr \let\tabu@@everypar \everypar + \let\tabu@prepnext@tokORI \prepnext@tok\let\prepnext@tok \tabu@prepnext@tok + \let\tabu@multicolumnORI\multicolumn \let\multicolumn \tabu@multicolumn + \let\tabu@startpbox \@startpbox % for nested tabu inside longtabu pfff !!! + \let\tabu@endpbox \@endpbox % idem " " " " " " " + \let\tabu@tabarray \@tabarray % idem " " " " " " " + \tabu@adl@fix \let\endarray \tabu@endarray % colortbl & arydshln (delarray) + \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi +}% \tabu@init +\def\tabu@indent{% correction for indentation + \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget + \everypar\expandafter{% + \the\everypar\everypar\expandafter{\the\everypar}% + \setbox\z@=\lastbox + \ifdim\wd\z@>\z@ \edef\tabu@thetarget + {\the\dimexpr -\wd\z@+\tabudefaulttarget}\fi + \box\z@}% + \fi\fi +}% \tabu@indent +\def\tabu@setcleanup {% saves last global assignments + \ifodd 1\ifmmode \else \iftabu@long \else 0\fi\fi\relax + \def\tabu@aftergroupcleanup{% + \def\tabu@aftergroupcleanup{\aftergroup\tabu@cleanup}}% + \else + \def\tabu@aftergroupcleanup{% + \aftergroup\aftergroup\aftergroup\tabu@cleanup + \let\tabu@aftergroupcleanup \relax}% + \fi + \let\tabu@arc@Gsave \tabu@arc@G + \let\tabu@arc@G \tabu@arc@L % + \let\tabu@drsc@Gsave \tabu@drsc@G + \let\tabu@drsc@G \tabu@drsc@L % + \let\tabu@ls@Gsave \tabu@ls@G + \let\tabu@ls@G \tabu@ls@L % + \let\tabu@rc@Gsave \tabu@rc@G + \let\tabu@rc@G \tabu@rc@L % + \let\tabu@evr@Gsave \tabu@evr@G + \let\tabu@evr@G \tabu@evr@L % + \let\tabu@celllalign@save \tabu@celllalign + \let\tabu@cellralign@save \tabu@cellralign + \let\tabu@cellleft@save \tabu@cellleft + \let\tabu@cellright@save \tabu@cellright + \let\tabu@@celllalign@save \tabu@@celllalign + \let\tabu@@cellralign@save \tabu@@cellralign + \let\tabu@@cellleft@save \tabu@@cellleft + \let\tabu@@cellright@save \tabu@@cellright + \let\tabu@rowfontreset@save \tabu@rowfontreset + \let\tabu@@rowfontreset@save\tabu@@rowfontreset + \let\tabu@rowfontreset \@empty + \edef\tabu@alloc@save {\the\tabu@alloc}% restore at \tabu@reset + \edef\c@taburow@save {\the\c@taburow}% + \edef\tabu@naturalX@save {\the\tabu@naturalX}% + \let\tabu@naturalXmin@save \tabu@naturalXmin + \let\tabu@naturalXmax@save \tabu@naturalXmax + \let\tabu@mkarstrut@save \tabu@mkarstrut + \edef\tabu@clarstrut{% + \extrarowheight \the\dimexpr \ht\@arstrutbox-\ht\strutbox \relax + \extrarowdepth \the\dimexpr \dp\@arstrutbox-\dp\strutbox \relax + \let\noexpand\@arraystretch \@ne \noexpand\tabu@rearstrut}% +}% \tabu@setcleanup +\def\tabu@cleanup {\begingroup + \globaldefs\@ne \tabu@everyrowtrue + \let\tabu@arc@G \tabu@arc@Gsave + \let\CT@arc@ \tabu@arc@G + \let\tabu@drsc@G \tabu@drsc@Gsave + \let\CT@drsc@ \tabu@drsc@G + \let\tabu@ls@G \tabu@ls@Gsave + \let\tabu@ls@ \tabu@ls@G + \let\tabu@rc@G \tabu@rc@Gsave + \let\tabu@rc@ \tabu@rc@G + \let\CT@do@color \relax + \let\tabu@evr@G \tabu@evr@Gsave + \let\tabu@celllalign \tabu@celllalign@save + \let\tabu@cellralign \tabu@cellralign@save + \let\tabu@cellleft \tabu@cellleft@save + \let\tabu@cellright \tabu@cellright@save + \let\tabu@@celllalign \tabu@@celllalign@save + \let\tabu@@cellralign \tabu@@cellralign@save + \let\tabu@@cellleft \tabu@@cellleft@save + \let\tabu@@cellright \tabu@@cellright@save + \let\tabu@rowfontreset \tabu@rowfontreset@save + \let\tabu@@rowfontreset \tabu@@rowfontreset@save + \tabu@naturalX =\tabu@naturalX@save + \let\tabu@naturalXmax \tabu@naturalXmax@save + \let\tabu@naturalXmin \tabu@naturalXmin@save + \let\tabu@mkarstrut \tabu@mkarstrut@save + \c@taburow =\c@taburow@save + \ifcase \tabu@nested \tabu@alloc \m@ne\fi + \endgroup % + \ifcase \tabu@nested + \the\tabu@footnotes \global\tabu@footnotes{}% + \tabu@afterendpar \tabu@elapsedtime + \fi + \tabu@clarstrut + \everyrow\expandafter {\tabu@evr@G}% +}% \tabu@cleanup +\let\tabu@afterendpar \relax +\def\tabu@setreset {% + \edef\tabu@savedparams {% \relax for \tabu@message@save + \ifmmode \col@sep \the\arraycolsep + \else \col@sep \the\tabcolsep \fi \relax + \arrayrulewidth \the\arrayrulewidth \relax + \doublerulesep \the\doublerulesep \relax + \extratabsurround \the\extratabsurround \relax + \extrarowheight \the\extrarowheight \relax + \extrarowdepth \the\extrarowdepth \relax + \abovetabulinesep \the\abovetabulinesep \relax + \belowtabulinesep \the\belowtabulinesep \relax + \def\noexpand\arraystretch{\arraystretch}% + \ifdefined\minrowclearance \minrowclearance\the\minrowclearance\relax\fi}% + \begingroup + \@temptokena\expandafter{\tabu@savedparams}% => only for \savetabu / \usetabu + \ifx \tabu@arc@L\relax \else \tabu@setsave \tabu@arc@L \fi + \ifx \tabu@drsc@L\relax \else \tabu@setsave \tabu@drsc@L \fi + \tabu@setsave \tabu@ls@L \tabu@setsave \tabu@evr@L + \expandafter \endgroup \expandafter + \def\expandafter\tabu@saved@ \expandafter{\the\@temptokena + \let\tabu@arc@G \tabu@arc@L + \let\tabu@drsc@G \tabu@drsc@L + \let\tabu@ls@G \tabu@ls@L + \let\tabu@rc@G \tabu@rc@L + \let\tabu@evr@G \tabu@evr@L}% + \def\tabu@reset{\tabu@savedparams + \tabu@everyrowtrue \c@taburow \z@ + \let\CT@arc@ \tabu@arc@L + \let\CT@drsc@ \tabu@drsc@L + \let\tabu@ls@ \tabu@ls@L + \let\tabu@rc@ \tabu@rc@L + \global\tabu@alloc \tabu@alloc@save + \everyrow\expandafter{\tabu@evr@L}}% +}% \tabu@reset +\def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}} +\long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}} +%% The Rewriting Process ------------------------------------------- +\def\tabu@newcolumntype #1{% + \expandafter\tabu@new@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@newcolumntype +\def\tabu@new@columntype #1#2#3{% + \def#1##1#3{\NC@{##1}}% + \let#2\relax \newcommand*#2% +}% \tabu@new@columntype +\def\tabu@privatecolumntype #1{% + \expandafter\tabu@private@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\expandafter\endcsname + \csname tabu@NC@find@\string#1\expandafter\endcsname + \csname tabu@NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@privatecolumntype +\def\tabu@private@columntype#1#2#3#4{% + \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}% + \tabu@new@columntype#3#4% +}% \tabu@private@columntype +\let\tabu@privatecolumns \@empty +\newcommand*\tabucolumn [1]{\expandafter \def \expandafter + \tabu@highprioritycolumns\expandafter{\tabu@highprioritycolumns + \NC@do #1}}% +\let\tabu@highprioritycolumns \@empty +%% The | ``column'' : rewriting process -------------------------- +\tabu@privatecolumntype |{\tabu@rewritevline} +\newcommand*\tabu@rewritevline[1][]{\tabu@vlinearg{#1}% + \expandafter \NC@find \tabu@rewritten} +\def\tabu@lines #1{% + \ifx|#1\else \tabu@privatecolumntype #1{\tabu@rewritevline}\fi + \NC@list\expandafter{\the\NC@list \NC@do #1}% +}% \tabu@lines@ +\def\tabu@vlinearg #1{% + \ifx\\#1\\\def\tabu@thestyle {\tabu@ls@}% + \else\tabu@getline {#1}% + \fi + \def\tabu@rewritten ##1{\def\tabu@rewritten{!{##1\tabu@thevline}}% + }\expandafter\tabu@rewritten\expandafter{\tabu@thestyle}% + \expandafter \tabu@keepls \tabu@thestyle \@nil +}% \tabu@vlinearg +\def\tabu@keepls #1\@nil{% + \ifcat $\@cdr #1\@nil $% + \ifx \relax#1\else + \ifx \tabu@ls@#1\else + \let#1\relax + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@savels\noexpand#1}\fi\fi\fi +}% \tabu@keepls +\def\tabu@thevline {\begingroup + \ifdefined\tabu@leaders + \setbox\@tempboxa=\vtop to\dimexpr + \ht\@arstrutbox+\dp\@arstrutbox{{\tabu@thevleaders}}% + \ht\@tempboxa=\ht\@arstrutbox \dp\@tempboxa=\dp\@arstrutbox + \box\@tempboxa + \else + \tabu@thevrule + \fi \endgroup +}% \tabu@thevline +\def\tabu@savels #1{% + \expandafter\let\csname\string#1\endcsname #1% + \expandafter\def\expandafter\tabu@reset\expandafter{\tabu@reset + \tabu@resetls#1}}% +\def\tabu@resetls #1{\expandafter\let\expandafter#1\csname\string#1\endcsname}% +%% \multicolumn inside tabu environment ----------------------------- +\tabu@newcolumntype \tabu@rewritemulticolumn{% + \aftergroup \tabu@endrewritemulticolumn % after \@mkpream group + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \tabu@savedecl + \tabu@privatecolumns + \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}% + \let\tabu@savels \relax + \NC@find +}% \tabu@rewritemulticolumn +\def\tabu@endrewritemulticolumn{\gdef\tabu@mkpreambuffer{}\endgroup} +\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI} +\long\def\tabu@multic@lumn #1#2#3{\multispan{#1}\begingroup + \tabu@everyrowtrue + \NC@list{\NC@do \tabu@rewritemulticolumn}% + \expandafter\@gobbletwo % gobbles \multispan{#1} + \tabu@multicolumnORI{#1}{\tabu@rewritemulticolumn #2}% + {\iftabuscantokens \tabu@rescan \else \expandafter\@firstofone \fi + {#3}}% +}% \tabu@multic@lumn +%% The X column(s): rewriting process ----------------------------- +\tabu@privatecolumntype X[1][]{\begingroup \tabu@siunitx{\endgroup \tabu@rewriteX {#1}}} +\def\tabu@nosiunitx #1{#1{}{}\expandafter \NC@find \tabu@rewritten } +\def\tabu@siunitx #1{\@ifnextchar \bgroup + {\tabu@rewriteX@Ss{#1}} + {\tabu@nosiunitx{#1}}} +\def\tabu@rewriteX@Ss #1#2{\@temptokena{}% + \@defaultunits \let\tabu@temp =#2\relax\@nnil + \ifodd 1\ifx S\tabu@temp \else \ifx s\tabu@temp \else 0 \fi\fi + \def\NC@find{\def\NC@find >####1####2<####3\relax{#1 {####1}{####3}% + }\expandafter\NC@find \the\@temptokena \relax + }\expandafter\NC@rewrite@S \@gobble #2\relax + \else \tabu@siunitxerror + \fi + \expandafter \NC@find \tabu@rewritten +}% \tabu@rewriteX@Ss +\def\tabu@siunitxerror {\PackageError{tabu}{Not a S nor s column ! + \MessageBreak X column can only embed siunitx S or s columns}\@ehd +}% \tabu@siunitxerror +\def\tabu@rewriteX #1#2#3{\tabu@Xarg {#1}{#2}{#3}% + \iftabu@measuring + \else \tabu@measuringtrue % first X column found in the preamble + \let\@halignto \relax \let\tabu@halignto \relax + \iftabu@spread \tabu@spreadtarget \tabu@target \tabu@target \z@ + \else \tabu@spreadtarget \z@ \fi + \ifdim \tabu@target=\z@ + \setlength\tabu@target \tabu@thetarget + \tabu@message{\tabu@message@defaulttarget}% + \else \tabu@message{\tabu@message@target}\fi + \fi +}% \tabu@rewriteX +\def\tabu@rewriteXrestore #1#2#3{\let\@halignto \relax + \def\tabu@rewritten{l}} +\def\tabu@Xarg #1#2#3{% + \advance\tabu@Xcol \@ne \let\tabu@Xlcr \@empty + \let\tabu@Xdisp \@empty \let\tabu@Xmath \@empty + \ifx\\#1\\% + \def\tabu@rewritten{p}\tabucolX \p@ % + \else + \let\tabu@rewritten \@empty \let\tabu@temp \@empty \tabucolX \z@ + \tabu@Xparse {}#1\relax + \fi + \tabu@Xrewritten{#2}{#3}% +}% \tabu@Xarg +\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest} +\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}} +\def\tabu@Xtest{% + \ifcase \ifx \relax\@let@token \z@ \else + \if ,\@let@token \m@ne\else + \if p\@let@token 1\else + \if m\@let@token 2\else + \if b\@let@token 3\else + \if l\@let@token 4\else + \if c\@let@token 5\else + \if r\@let@token 6\else + \if j\@let@token 7\else + \if L\@let@token 8\else + \if C\@let@token 9\else + \if R\@let@token 10\else + \if J\@let@token 11\else + \ifx \@sptoken\@let@token 12\else + \if .\@let@token 13\else + \if -\@let@token 13\else + \ifcat $\@let@token 14\else + 15\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \or \tabu@Xtype {p}% + \or \tabu@Xtype {m}% + \or \tabu@Xtype {b}% + \or \tabu@Xalign \raggedright\relax + \or \tabu@Xalign \centering\relax + \or \tabu@Xalign \raggedleft\relax + \or \tabu@Xalign \tabu@justify\relax + \or \tabu@Xalign \RaggedRight\raggedright + \or \tabu@Xalign \Centering\centering + \or \tabu@Xalign \RaggedLeft\raggedleft + \or \tabu@Xalign \justifying\tabu@justify + \or \expandafter \tabu@Xparsespace + \or \expandafter \tabu@Xcoef + \or \expandafter \tabu@Xm@th + \or \tabu@Xcoef{}% + \else\expandafter \tabu@Xparse + \fi +}% \tabu@Xtest +\def\tabu@Xalign #1#2{% + \ifx \tabu@Xlcr\@empty \else \PackageWarning{tabu} + {Duplicate horizontal alignment specification}\fi + \ifdefined#1\def\tabu@Xlcr{#1}\let#1\relax + \else \def\tabu@Xlcr{#2}\let#2\relax\fi + \expandafter\tabu@Xparse +}% \tabu@Xalign +\def\tabu@Xtype #1{% + \ifx \tabu@rewritten\@empty \else \PackageWarning{tabu} + {Duplicate vertical alignment specification}\fi + \def\tabu@rewritten{#1}\expandafter\tabu@Xparse +}% \tabu@Xtype +\def\tabu@Xcoef#1{\edef\tabu@temp{\tabu@temp#1}% + \afterassignment\tabu@Xc@ef \tabu@cnt\number\if-#10\fi +}% \tabu@Xcoef +\def\tabu@Xc@ef{\advance\tabucolX \tabu@temp\the\tabu@cnt\p@ + \tabu@Xparse{}% +}% \tabu@Xc@ef +\def\tabu@Xm@th #1{\futurelet \@let@token \tabu@Xd@sp} +\def\tabu@Xd@sp{\let\tabu@Xmath=$% + \ifx $\@let@token \def\tabu@Xdisp{\displaystyle}% + \expandafter\tabu@Xparse + \else \expandafter\tabu@Xparse\expandafter{\expandafter}% + \fi +}% \tabu@Xd@sp +\def\tabu@Xrewritten {% + \ifx \tabu@rewritten\@empty \def\tabu@rewritten{p}\fi + \ifdim \tabucolX<\z@ \tabu@negcoeftrue + \else\ifdim \tabucolX=\z@ \tabucolX \p@ + \fi\fi + \edef\tabu@temp{{\the\tabu@Xcol}{\tabu@strippt\tabucolX}}% + \edef\tabu@Xcoefs{\tabu@Xcoefs \tabu@ \tabu@temp}% + \edef\tabu@rewritten ##1##2{\def\noexpand\tabu@rewritten{% + >{\tabu@Xlcr \ifx$\tabu@Xmath$\tabu@Xdisp\fi ##1}% + \tabu@rewritten {\tabu@hsize \tabu@temp}% + <{##2\ifx$\tabu@Xmath$\fi}}% + }\tabu@rewritten +}% \tabu@Xrewritten +\def\tabu@hsize #1#2{% + \ifdim #2\p@<\z@ + \ifdim \tabucolX=\maxdimen \tabu@wd{#1}\else + \ifdim \tabu@wd{#1}<-#2\tabucolX \tabu@wd{#1}\else -#2\tabucolX\fi + \fi + \else #2\tabucolX + \fi +}% \tabu@hsize +%% \usetabu and \preamble: rewriting process --------------------- +\tabu@privatecolumntype \usetabu [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\let\tabu@rewriteX \tabu@rewriteXrestore + \csname tabu@saved@\string#1\expandafter\endcsname\expandafter\@ne}% + \fi +}% \NC@rewrite@\usetabu +\tabu@privatecolumntype \preamble [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}% + \fi +}% \NC@rewrite@\preamble +%% Controlling the rewriting process ------------------------------- +\tabu@newcolumntype \tabu@rewritefirst{% + \iftabu@long \aftergroup \tabu@longpream % + \else \aftergroup \tabu@pream + \fi + \let\tabu@ \relax \let\tabu@hsize \relax + \let\tabu@Xcoefs \@empty \let\tabu@savels \relax + \tabu@Xcol \z@ \tabu@cnt \tw@ + \gdef\tabu@mkpreambuffer{\tabu@{}}\tabu@measuringfalse + \global\setbox\@arstrutbox \box\@arstrutbox + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \NC@list\expandafter{\the\NC@list \NC@do X}% + \iftabu@siunitx % + \NC@list\expandafter{\the\NC@list \NC@do S\NC@do s}\fi + \NC@list\expandafter{\the\expandafter\NC@list \tabu@highprioritycolumns}% + \expandafter\def\expandafter\tabu@NC@list\expandafter{% + \the\expandafter\NC@list \tabu@NC@list}% % * | X S + \NC@list\expandafter{\expandafter \NC@do \expandafter\usetabu + \expandafter \NC@do \expandafter\preamble + \the\NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \tabu@savedecl + \tabu@privatecolumns + \edef\tabu@prev{\the\@temptokena}\NC@find \tabu@rewritemiddle +}% NC@rewrite@\tabu@rewritefirst +\tabu@newcolumntype \tabu@rewritemiddle{% + \edef\tabu@temp{\the\@temptokena}\NC@find \tabu@rewritelast +}% \NC@rewrite@\tabu@rewritemiddle +\tabu@newcolumntype \tabu@rewritelast{% + \ifx \tabu@temp\tabu@prev \advance\tabu@cnt \m@ne + \NC@list\expandafter{\tabu@NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \else \let\tabu@prev\tabu@temp + \fi + \ifcase \tabu@cnt \expandafter\tabu@endrewrite + \else \expandafter\NC@find \expandafter\tabu@rewritemiddle + \fi +}% \NC@rewrite@\tabu@rewritelast +%% Choosing the strategy -------------------------------------------- +\def\tabu@endrewrite {% + \let\tabu@temp \NC@find + \ifx \@arrayright\relax \let\@arrayright \@empty \fi + \count@=% + \ifx \@finalstrut\tabu@finalstrut \z@ % outer in mode 0 print + \iftabu@measuring + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@target \csname tabu@\the\tabu@nested.T\endcsname + \tabucolX \csname tabu@\the\tabu@nested.X\endcsname + \edef\@halignto {\ifx\@arrayright\@empty to\tabu@target\fi}}% + \fi + \else\iftabu@measuring 4 % X columns + \xdef\tabu@mkpreambuffer{\tabu@{\tabu@mkpreambuffer + \tabu@target \the\tabu@target + \tabu@spreadtarget \the\tabu@spreadtarget}% + \def\noexpand\tabu@Xcoefs{\tabu@Xcoefs}% + \edef\tabu@halignto{\ifx \@arrayright\@empty to\tabu@target\fi}}% + \let\tabu@Xcoefs \relax + \else\ifcase\tabu@nested \thr@@ % outer, no X + \global\let\tabu@afterendpar \relax + \else \@ne % inner, no X, outer in mode 1 or 2 + \fi + \ifdefined\tabu@usetabu + \else \ifdim\tabu@target=\z@ + \else \let\tabu@temp \tabu@extracolsep + \fi\fi + \fi + \fi + \xdef\tabu@mkpreambuffer{\count@ \the\count@ \tabu@mkpreambuffer}% + \tabu@temp +}% \tabu@endrewrite +\def\tabu@extracolsep{\@defaultunits \expandafter\let + \expandafter\tabu@temp \expandafter=\the\@temptokena \relax\@nnil + \ifx \tabu@temp\@sptoken + \expandafter\tabu@gobblespace \expandafter\tabu@extracolsep + \else + \edef\tabu@temp{\noexpand\NC@find + \if |\noexpand\tabu@temp @% + \else\if !\noexpand\tabu@temp @% + \else !% + \fi\fi + {\noexpand\extracolsep\noexpand\@flushglue}}% + \fi + \tabu@temp +}% \tabu@extrac@lsep +%% Implementing the strategy ---------------------------------------- +\long\def\tabu@pream #1\@preamble {% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \ifdefined\tabu@usetabu \tabu@usetabu \tabu@target \z@ \fi + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\tabu@aftergroupcleanup}% + \tabu@thebody =\expandafter{\the\expandafter\tabu@thebody + \@preamble}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@pream +\long\def\tabu@longpream #1\LT@bchunk #2\LT@bchunk{% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\LT@bchunk #2\tabu@aftergroupcleanup \LT@bchunk}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@longpream +\def\tabu@select {% + \ifnum\tabu@nested>\z@ \tabuscantokensfalse \fi + \ifnum \count@=\@ne \iftabu@measuring \count@=\tw@ \fi\fi + \ifcase \count@ + \global\let\tabu@elapsedtime \relax + \tabu@seteverycr + \expandafter \tabuthepreamble % vertical adjustment (inherited from outer) + \or % exit in vertical measure + struts per cell because no X and outer in mode 3 + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \tabu@seteverycr + \expandafter \tabuthepreamble + \or % exit without measure because no X and outer in mode 4 + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@seteverycr + \expandafter \tabuthepreamble + \else % needs trials + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@savecounters + \expandafter \tabu@setstrategy + \fi +}% \tabu@select +\def\tabu@@ {\gdef\tabu@mkpreambuffer} +%% Protections to set up before trials ------------------------------ +\def\tabu@setstrategy {\begingroup % + \tabu@trialh@@k \tabu@cnt \z@ % number of trials + \hbadness \@M \let\hbadness \@tempcnta + \hfuzz \maxdimen \let\hfuzz \@tempdima + \let\write \tabu@nowrite\let\GenericError \tabu@GenericError + \let\savetabu \@gobble \let\tabudefaulttarget \linewidth + \let\@footnotetext \@gobble \let\@xfootnote \tabu@xfootnote + \let\color \tabu@nocolor\let\rowcolor \tabu@norowcolor + \let\tabu@aftergroupcleanup \relax % only after the last trial + \tabu@mkpreambuffer + \ifnum \count@>\thr@@ \let\@halignto \@empty \tabucolX@init + \def\tabu@lasttry{\m@ne\p@}\fi + \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\iftabuscantokens \endlinechar=10 \obeyspaces \fi % + \tabu@collectbody \tabu@strategy % +}% \tabu@setstrategy +\def\tabu@savecounters{% + \def\@elt ##1{\csname c@##1\endcsname\the\csname c@##1\endcsname}% + \edef\tabu@clckpt {\begingroup \globaldefs=\@ne \cl@@ckpt \endgroup}\let\@elt \relax +}% \tabu@savecounters +\def\tabucolX@init {% \tabucolX <= \tabu@target / (sum coefs > 0) + \dimen@ \z@ \tabu@Xsum \z@ \tabucolX \z@ \let\tabu@ \tabu@Xinit \tabu@Xcoefs + \ifdim \dimen@>\z@ + \@tempdima \dimexpr \tabu@target *\p@/\dimen@ + \tabu@hfuzz\relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \fi +}% \tabucolX@init +\def\tabu@Xinit #1#2{\tabu@Xcol #1 \advance \tabu@Xsum + \ifdim #2\p@>\z@ #2\p@ \advance\dimen@ #2\p@ + \else -#2\p@ \tabu@negcoeftrue + \@tempdima \dimexpr \tabu@target*\p@/\dimexpr-#2\p@\relax \relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \tabu@wddef{#1}{0pt}% + \fi +}% \tabu@Xinit +%% Collecting the environment body ---------------------------------- +\long\def\tabu@collectbody #1#2\end #3{% + \edef\tabu@stack{\tabu@pushbegins #2\begin\end\expandafter\@gobble\tabu@stack}% + \ifx \tabu@stack\@empty + \toks@\expandafter{\expandafter\tabu@thebody\expandafter{\the\toks@ #2}% + \def\tabu@end@envir{\end{#3}}% + \iftabuscantokens + \iftabu@long \def\tabu@endenvir {\end{#3}\tabu@gobbleX}% + \else \def\tabu@endenvir {\let\endarray \@empty + \end{#3}\tabu@gobbleX}% + \fi + \else \def\tabu@endenvir {\end{#3}}\fi}% + \let\tabu@collectbody \tabu@endofcollect + \else\def\tabu@temp{#3}% + \ifx \tabu@temp\@empty \toks@\expandafter{\the\toks@ #2\end }% + \else \ifx\tabu@temp\tabu@@spxiii \toks@\expandafter{\the\toks@ #2\end #3}% + \else \ifx\tabu@temp\tabu@X \toks@\expandafter{\the\toks@ #2\end #3}% + \else \toks@\expandafter{\the\toks@ #2\end{#3}}% + \fi\fi\fi + \fi + \tabu@collectbody{#1}% +}% \tabu@collectbody +\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}% +\def\tabu@endofcollect #1{\ifnum0=`{}\fi + \expandafter\endgroup \the\toks@ #1% +}% \tabu@endofcollect +%% The trials: switching between strategies ------------------------- +\def\tabu@strategy {\relax % stops \count@ assignment ! + \ifcase\count@ % case 0 = print with vertical adjustment (outer is finished) + \expandafter \tabu@endoftrials + \or % case 1 = exit in vertical measure (outer in mode 3) + \expandafter\xdef\csname tabu@\the\tabu@nested.T\endcsname{\the\tabu@target}% + \expandafter\xdef\csname tabu@\the\tabu@nested.X\endcsname{\the\tabucolX}% + \expandafter \tabu@endoftrials + \or % case 2 = exit with a rule replacing the table (outer in mode 4) + \expandafter \tabu@quickend + \or % case 3 = outer is in mode 3 because of no X + \begingroup + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \expandafter \tabu@measuring + \else % case 4 = horizontal measure + \begingroup + \global\let\tabu@elapsedtime \tabu@message@etime + \long\def\multicolumn##1##2##3{\multispan{##1}}% + \let\tabu@startpboxORI \@startpbox + \iftabu@spread + \def\tabu@naturalXmax {\z@}% + \let\tabu@naturalXmin \tabu@naturalXmax + \tabu@evr{\global\tabu@naturalX \z@}% + \let\@startpbox \tabu@startpboxmeasure + \else\iftabu@negcoef + \let\@startpbox \tabu@startpboxmeasure + \else \let\@startpbox \tabu@startpboxquick + \fi\fi + \expandafter \tabu@measuring + \fi +}% \tabu@strategy +\def\tabu@measuring{\expandafter \tabu@trial \expandafter + \count@ \the\count@ \tabu@endtrial +}% \tabu@measuring +\def\tabu@trial{\iftabu@long \tabu@longtrial \else \tabu@shorttrial \fi} +\def\tabu@shorttrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + $\iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \csname tabu@adl@endtrial\endcsname + \endarray}$\egroup % got \tabu@box +}% \tabu@shorttrial +\def\tabu@longtrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + \iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \tabuendlongtrial}\egroup % got \tabu@box +}% \tabu@longtrial +\def\tabuendlongtrial{% no @ allowed for \scantokens + \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne + \LT@get@widths +}% \tabuendlongtrial +\def\tabu@adl@endtrial{% + \crcr \noalign{\global\adl@ncol \tabu@nbcols}}% anything global is crap, junky and fails ! +\def\tabu@seteverycr {\tabu@reset + \everycr \expandafter{\the\everycr \tabu@everycr}% + \let\everycr \tabu@noeverycr % +}% \tabu@seteverycr +\def\tabu@noeverycr{{\aftergroup\tabu@restoreeverycr \afterassignment}\toks@} +\def\tabu@restoreeverycr {\let\everycr \tabu@@everycr} +\def\tabu@everycr {\iftabu@everyrow \noalign{\tabu@everyrow}\fi} +\def\tabu@endoftrials {% + \iftabuscantokens \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\expandafter \tabu@closetrialsgroup \expandafter + \tabu@rescan \expandafter{% + \expandafter\tabuthepreamble + \the\expandafter\tabu@thebody + \iftabu@long \else \endarray \fi}} + {\expandafter\tabu@closetrialsgroup \expandafter + \tabuthepreamble + \the\tabu@thebody}% + \tabu@endenvir % Finish ! +}% \tabu@endoftrials +\def\tabu@closetrialsgroup {% + \toks@\expandafter{\tabu@endenvir}% + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target + \tabu@cnt \the\tabu@cnt + \def\noexpand\tabu@endenvir{\the\toks@}% + %Quid de \@halignto = \tabu@halignto ?? + }% \tabu@bufferX + \tabu@bufferX + \ifcase\tabu@nested % print out (outer in mode 0) + \global\tabu@cnt \tabu@cnt + \tabu@evr{\tabu@verticaldynamicadjustment}% + \tabu@celllalign@def{\everypar{}}\let\tabu@cellralign \@empty + \let\@finalstrut \tabu@finalstrut + \else % vertical measure of nested tabu + \tabu@evr{\tabu@verticalinit}% + \tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \fi + \tabu@clckpt \let\@halignto \tabu@halignto + \let\@halignto \@empty + \tabu@seteverycr + \ifdim \tabustrutrule>\z@ \ifnum\tabu@nested=\z@ + \setbox\@arstrutbox \box\voidb@x % force \@arstrutbox to be rebuilt (visible struts) + \fi\fi +}% \tabu@closetrialsgroup +\def\tabu@quickend {\expandafter \endgroup \expandafter + \tabu@target \the\tabu@target \tabu@quickrule + \let\endarray \relax \tabu@endenvir +}% \tabu@quickend +\def\tabu@endtrial {\relax % stops \count@ assignment ! + \ifcase \count@ \tabu@err % case 0 = impossible here + \or \tabu@err % case 1 = impossible here + \or \tabu@err % case 2 = impossible here + \or % case 3 = outer goes into mode 0 + \def\tabu@bufferX{\endgroup}\count@ \z@ + \else % case 4 = outer goes into mode 3 + \iftabu@spread \tabu@spreadarith % inner into mode 1 (outer in mode 3) + \else \tabu@arith % or 2 (outer in mode 4) + \fi + \count@=% + \ifcase\tabu@nested \thr@@ % outer goes into mode 3 + \else\iftabu@measuring \tw@ % outer is in mode 4 + \else \@ne % outer is in mode 3 + \fi\fi + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% + \fi + \expandafter \tabu@bufferX \expandafter + \count@ \the\count@ \tabu@strategy +}% \tabu@endtrial +\def\tabu@err{\errmessage{(tabu) Internal impossible error! (\count@=\the\count@)}} +%% The algorithms: compute the widths / stop or go on --------------- +\def\tabu@arithnegcoef {% + \@tempdima \z@ \dimen@ \z@ \let\tabu@ \tabu@arith@negcoef \tabu@Xcoefs +}% \tabu@arithnegcoef +\def\tabu@arith@negcoef #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ % saturated by definition + \advance\@tempdima #2\tabucolX + \else + \ifdim -#2\tabucolX <\tabu@wd{#1}% c_i X < natural width <= \tabu@target-> saturated + \advance\dimen@ -#2\p@ + \advance\@tempdima -#2\tabucolX + \else + \advance\@tempdima \tabu@wd{#1}% natural width <= c_i X => neutralised + \ifdim \tabu@wd{#1}<\tabu@target \else % neutralised + \advance\dimen@ -#2\p@ % saturated (natural width = tabu@target) + \fi + \fi + \fi +}% \tabu@arith@negcoef +\def\tabu@givespace #1#2{% here \tabu@DELTA < \z@ + \ifdim \@tempdima=\z@ + \tabu@wddef{#1}{\the\dimexpr -\tabu@DELTA*\p@/\tabu@Xsum}% + \else + \tabu@wddef{#1}{\the\dimexpr \tabu@hsize{#1}{#2} + *(\p@ -\tabu@DELTA*\p@/\@tempdima)/\p@\relax}% + \fi +}% \tabu@givespace +\def\tabu@arith {\advance\tabu@cnt \@ne + \ifnum \tabu@cnt=\@ne \tabu@message{\tabu@titles}\fi + \tabu@arithnegcoef + \@tempdimb \dimexpr \wd\tabu@box -\@tempdima \relax % + \tabu@DELTA = \dimexpr \wd\tabu@box - \tabu@target \relax + \tabu@message{\tabu@message@arith}% + \ifdim \tabu@DELTA <\tabu@hfuzz + \ifdim \tabu@DELTA<\z@ % wd (tabu)<\tabu@target ? + \let\tabu@ \tabu@givespace \tabu@Xcoefs + \advance\@tempdima \@tempdimb \advance\@tempdima -\tabu@DELTA % for message + \else % already converged: nothing to do but nearly impossible... + \fi + \tabucolX \maxdimen + \tabu@measuringfalse + \else % need for narrower X columns + \tabucolX =\dimexpr (\@tempdima -\tabu@DELTA) *\p@/\tabu@Xsum \relax + \tabu@measuringtrue + \@whilesw \iftabu@measuring\fi {% + \advance\tabu@cnt \@ne + \tabu@arithnegcoef + \tabu@DELTA =\dimexpr \@tempdima+\@tempdimb -\tabu@target \relax % always < 0 here + \tabu@message{\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \@tempdima+\@tempdimb { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim -\tabu@DELTA<\tabu@hfuzz \tabu@spaces target ok\else + \tabu@msgalign \dimexpr -\tabu@DELTA *\p@/\dimen@ {}{}{}{}{}\@@ + \fi}% + \ifdim -\tabu@DELTA<\tabu@hfuzz + \advance\@tempdima \@tempdimb % for message + \tabu@measuringfalse + \else + \advance\tabucolX \dimexpr -\tabu@DELTA *\p@/\dimen@ \relax + \fi + }% + \fi + \tabu@message{\tabu@message@reached}% + \edef\tabu@bufferX{\endgroup \tabu@cnt \the\tabu@cnt + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% +}% \tabu@arith +\def\tabu@spreadarith {% + \dimen@ \z@ \@tempdima \tabu@naturalXmax \let\tabu@ \tabu@spread@arith \tabu@Xcoefs + \edef\tabu@naturalXmin {\the\dimexpr\tabu@naturalXmin*\dimen@/\p@}% + \@tempdimc =\dimexpr \wd\tabu@box -\tabu@naturalXmax+\tabu@naturalXmin \relax + \iftabu@measuring + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \edef\tabu@bufferX{\endgroup \tabucolX \the\tabucolX \tabu@target\the\tabu@target}% + \else + \tabu@message{\tabu@message@spreadarith}% + \ifdim \dimexpr \@tempdimc+\tabu@spreadtarget >\tabu@target + \tabu@message{(tabu) spread + \ifdim \@tempdimc>\tabu@target useless here: default target used% + \else too large: reduced to fit default target\fi.}% + \else + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \tabu@message{(tabu) spread: New target set to \the\tabu@target^^J}% + \fi + \begingroup \let\tabu@wddef \@gobbletwo + \@tempdimb \@tempdima + \tabucolX@init + \tabu@arithnegcoef + \wd\tabu@box =\dimexpr \wd\tabu@box +\@tempdima-\@tempdimb \relax + \expandafter\endgroup \expandafter\tabucolX \the\tabucolX + \tabu@arith + \fi +}% \tabu@spreadarith +\def\tabu@spread@arith #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ + \else \advance\@tempdima \tabu@wd{#1}\relax + \fi +}% \tabu@spread@arith +%% Reporting in the .log file --------------------------------------- +\def\tabu@message@defaulttarget{% + \ifnum\tabu@nested=\z@^^J(tabu) Default target: + \ifx\tabudefaulttarget\linewidth \string\linewidth + \ifdim \tabu@thetarget=\linewidth \else + -\the\dimexpr\linewidth-\tabu@thetarget\fi = + \else\ifx\tabudefaulttarget\linegoal\string\linegoal= + \fi\fi + \else (tabu) Default target (nested): \fi + \the\tabu@target \on@line + \ifnum\tabu@nested=\z@ , page \the\c@page\fi} +\def\tabu@message@target {^^J(tabu) Target specified: + \the\tabu@target \on@line, page \the\c@page} +\def\tabu@message@arith {\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim \tabu@DELTA<\tabu@hfuzz giving space\else + \tabu@msgalign \dimexpr (\@tempdima-\tabu@DELTA) *\p@/\tabu@Xsum -\tabucolX {}{}{}{}{}\@@ + \fi +}% \tabu@message@arith +\def\tabu@message@spreadarith {\tabu@spreadheader + \tabu@msgalign \tabu@spreadtarget { }{ }{ }{ }{}\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{}\@@ + \tabu@msgalign -\tabu@naturalXmax { }{}{}{}{}\@@ + \tabu@msgalign \tabu@naturalXmin { }{ }{ }{ }{}\@@ + \tabu@msgalign \ifdim \dimexpr\@tempdimc>\tabu@target \tabu@target + \else \@tempdimc+\tabu@spreadtarget \fi + {}{}{}{}{}\@@} +\def\tabu@message@negcoef #1#2{ + \tabu@spaces\tabu@spaces\space * #1. X[\rem@pt#2]: + \space width = \tabu@wd {#1} + \expandafter\string\csname tabu@\the\tabu@nested.W\number#1\endcsname + \ifdim -\tabu@pt#2\tabucolX<\tabu@target + < \number-\rem@pt#2 X + = \the\dimexpr -\tabu@pt#2\tabucolX \relax + \else + <= \the\tabu@target\space < \number-\rem@pt#2 X\fi} +\def\tabu@message@reached{\tabu@header + ******* Reached Target: + hfuzz = \tabu@hfuzz\on@line\space *******} +\def\tabu@message@etime{\edef\tabu@stoptime{\the\pdfelapsedtime}% + \tabu@message{(tabu)\tabu@spaces Time elapsed during measure: + \the\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax sec + \the\numexpr\numexpr(\tabu@stoptime-\tabu@starttime) + -\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax*65536\relax + *1000/65536\relax ms \tabu@spaces(\the\tabu@cnt\space + cycle\ifnum\tabu@cnt>\@ne s\fi)^^J^^J}} +\def\tabu@message@verticalsp {% + \ifdim \@tempdima>\tabu@ht + \ifdim \@tempdimb>\tabu@dp + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@ + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J% + \else + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@^^J% + \fi + \else\ifdim \@tempdimb>\tabu@dp + \tabu@spaces\tabu@spaces\tabu@spaces + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J\fi + \fi +}% \tabu@message@verticalsp +\edef\tabu@spaces{\@spaces} +\def\tabu@strippt{\expandafter\tabu@pt\the} +{\@makeother\P \@makeother\T\lowercase{\gdef\tabu@pt #1PT{#1}}} +\def\tabu@msgalign{\expandafter\tabu@msg@align\the\dimexpr} +\def\tabu@msgalign@PT{\expandafter\tabu@msg@align\romannumeral-`\0\tabu@strippt} +\def\do #1{% + \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{% + \ifnum##1<10 #1 #1\else + \ifnum##1<100 #1 \else + \ifnum##1<\@m #1\fi\fi\fi + ##1.##2##3##4##5##6##7##8#1}% + \def\tabu@header{(tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt) }% + \def\tabu@titles{\ifnum \tabu@nested=\z@ + (tabu) Try#1 #1 tabu X #1 #1 #1tabu Width #1 #1 Target + #1 #1 #1 Coefs #1 #1 #1 Update^^J\fi}% + \def\tabu@spreadheader{% + (tabu) Try#1 #1 Spread #1 #1 tabu Width #1 #1 #1 Nat. X #1 #1 #1 #1Nat. Min. + #1 New Target^^J% + (tabu) sprd} + \def\tabu@message@save {\begingroup + \def\x ####1{\tabu@msg@align ####1{ }{ }{ }{ }{}\@@} + \def\z ####1{\expandafter\x\expandafter{\romannumeral-`\0\tabu@strippt + \dimexpr####1\p@{ }{ }}}% + \let\color \relax \def\tabu@rulesstyle ####1####2{\detokenize{####1}}% + \let\CT@arc@ \relax \let\@preamble \@gobble + \let\tabu@savedpream \@firstofone + \let\tabu@savedparams \@firstofone + \def\tabu@target ####1\relax {(tabu) target #1 #1 #1 #1 #1 = \x{####1}^^J}% + \def\tabucolX ####1\relax {(tabu) X columns width#1 = \x{####1}^^J}% + \def\tabu@nbcols ####1\relax {(tabu) Number of columns: \z{####1}^^J}% + \def\tabu@aligndefault ####1{(tabu) Default alignment: #1 #1 ####1^^J}% + \def\col@sep ####1\relax {(tabu) column sep #1 #1 #1 = \x{####1}^^J}% + \def\arrayrulewidth ####1\relax{(tabu) arrayrulewidth #1 = \x{####1}}% + \def\doublerulesep ####1\relax { doublerulesep = \x{####1}^^J}% + \def\extratabsurround####1\relax{(tabu) extratabsurround = \x{####1}^^J}% + \def\extrarowheight ####1\relax{(tabu) extrarowheight #1 = \x{####1}}% + \def\extrarowdepth ####1\relax {extrarowdepth = \x{####1}^^J}% + \def\abovetabulinesep####1\relax{(tabu) abovetabulinesep=\x{####1} }% + \def\belowtabulinesep####1\relax{ belowtabulinesep=\x{####1}^^J}% + \def\arraystretch ####1{(tabu) arraystretch #1 #1 = \z{####1}^^J}% + \def\minrowclearance####1\relax{(tabu) minrowclearance #1 = \x{####1}^^J}% + \def\tabu@arc@L ####1{(tabu) taburulecolor #1 #1 = ####1^^J}% + \def\tabu@drsc@L ####1{(tabu) tabudoublerulecolor= ####1^^J}% + \def\tabu@evr@L ####1{(tabu) everyrow #1 #1 #1 #1 = \detokenize{####1}^^J}% + \def\tabu@ls@L ####1{(tabu) line style = \detokenize{####1}^^J}% + \def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}% + \def\tabu@wddef####1####2{(tabu) Natural width ####1 = \x{####2}^^J}% + \let\edef \@gobbletwo \let\def \@empty \let\let \@gobbletwo + \tabu@message{% + (tabu) \string\savetabu{\tabu@temp}: \on@line^^J% + \tabu@usetabu \@nil^^J}% + \endgroup} +}\do{ } +%% Measuring the natural width (varwidth) - store the results ------- +\def\tabu@startpboxmeasure #1{\bgroup % entering \vtop + \edef\tabu@temp{\expandafter\@secondoftwo \ifx\tabu@hsize #1\else\relax\fi}% + \ifodd 1\ifx \tabu@temp\@empty 0 \else % starts with \tabu@hsize ? + \iftabu@spread \else % if spread -> measure + \ifdim \tabu@temp\p@>\z@ 0 \fi\fi\fi% if coef>0 -> do not measure + \let\@startpbox \tabu@startpboxORI % restore immediately (nesting) + \tabu@measuringtrue % for the quick option... + \tabu@Xcol =\expandafter\@firstoftwo\ifx\tabu@hsize #1\fi + \ifdim \tabu@temp\p@>\z@ \ifdim \tabu@temp\tabucolX<\tabu@target + \tabu@target=\tabu@temp\tabucolX \fi\fi + \setbox\tabu@box \hbox \bgroup + \begin{varwidth}\tabu@target + \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width... + \narrowragged \arraybackslash \parfillskip \@flushglue + \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi + \bgroup \aftergroup\tabu@endpboxmeasure + \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi + \else \expandafter\@gobble + \tabu@startpboxquick{#1}% \@gobble \bgroup + \fi +}% \tabu@startpboxmeasure +\def\tabu@cellspacepatch{\def\bcolumn##1\@nil{}\let\ecolumn\@empty + \bgroup\color@begingroup} +\def\tabu@endpboxmeasure {% + \@finalstrut \@arstrutbox + \end{varwidth}\egroup % + \ifdim \tabu@temp\p@ <\z@ % neg coef + \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box + \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}% + \tabu@debug{\tabu@message@endpboxmeasure}% + \fi + \else % spread coef>0 + \global\advance \tabu@naturalX \wd\tabu@box + \@tempdima =\dimexpr \wd\tabu@box *\p@/\dimexpr \tabu@temp\p@\relax \relax + \ifdim \tabu@naturalXmax <\tabu@naturalX + \xdef\tabu@naturalXmax {\the\tabu@naturalX}\fi + \ifdim \tabu@naturalXmin <\@tempdima + \xdef\tabu@naturalXmin {\the\@tempdima}\fi + \fi + \box\tabu@box \egroup % end of \vtop (measure) restore \tabu@target +}% \tabu@endpboxmeasure +\def\tabu@wddef #1{\expandafter\xdef + \csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@wd #1{\csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@message@endpboxmeasure{\tabu@spaces\tabu@spaces<-> % <-> save natural wd + \the\tabu@Xcol. X[\tabu@temp]: + target = \the\tabucolX \space + \expandafter\expandafter\expandafter\string\tabu@wd\tabu@Xcol + =\tabu@wd\tabu@Xcol +}% \tabu@message@endpboxmeasure +\def\tabu@startpboxquick {\bgroup + \let\@startpbox \tabu@startpboxORI % restore immediately + \let\tabu \tabu@quick % \begin is expanded before... + \expandafter\@gobble \@startpbox % gobbles \bgroup +}% \tabu@startpboxquick +\def\tabu@quick {\begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\tabu@collectbody \tabu@endquick +}% \tabu@quick +\def\tabu@endquick {% + \ifodd 1\ifx\tabu@end@envir\tabu@endtabu \else + \ifx\tabu@end@envir\tabu@endtabus \else 0\fi\fi\relax + \endgroup + \else \let\endtabu \relax + \tabu@end@envir + \fi +}% \tabu@quick +\def\tabu@endtabu {\end{tabu}} +\def\tabu@endtabus {\end{tabu*}} +%% Measuring the heights and depths - store the results ------------- +\def\tabu@verticalmeasure{\everypar{}% + \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group + \setbox\tabu@box =\hbox\bgroup + \let\tabu@verticalspacing \tabu@verticalsp@lcr + \d@llarbegin % after \hbox ... + \else + \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop + \else\ifnum\currentgrouptype=12\vcenter + \else\vbox\fi\fi}% + \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup + \let\tabu@verticalspacing \tabu@verticalsp@pmb + \fi +}% \tabu@verticalmeasure +\def\tabu@verticalsp@lcr{% + \d@llarend \egroup % + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \noindent\vrule height\@tempdima depth\@tempdimb +}% \tabu@verticalsp@lcr +\def\tabu@verticalsp@pmb{% inserts struts as needed + \par \expandafter\egroup + \expandafter$\expandafter + \egroup \expandafter + \@tempdimc \the\prevdepth + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \let\@finalstrut \@gobble + \hrule height\@tempdima depth\@tempdimb width\hsize +%% \box\tabu@box +}% \tabu@verticalsp@pmb + +\def\tabu@verticalinit{% + \ifnum \c@taburow=\z@ \tabu@rearstrut \fi % after \tabu@reset ! + \advance\c@taburow \@ne + \tabu@htdef{\the\ht\@arstrutbox}\tabu@dpdef{\the\dp\@arstrutbox}% + \advance\c@taburow \m@ne +}% \tabu@verticalinit +\def\tabu@htdef {\expandafter\xdef \csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@ht {\csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@dpdef {\expandafter\xdef \csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@dp {\csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@verticaldynamicadjustment {% + \advance\c@taburow \@ne + \extrarowheight \dimexpr\tabu@ht - \ht\strutbox + \extrarowdepth \dimexpr\tabu@dp - \dp\strutbox + \let\arraystretch \@empty + \advance\c@taburow \m@ne +}% \tabu@verticaldynamicadjustment +\def\tabuphantomline{\crcr \noalign{% + {\globaldefs \@ne + \setbox\@arstrutbox \box\voidb@x + \let\tabu@@celllalign \tabu@celllalign + \let\tabu@@cellralign \tabu@cellralign + \let\tabu@@cellleft \tabu@cellleft + \let\tabu@@cellright \tabu@cellright + \let\tabu@@thevline \tabu@thevline + \let\tabu@celllalign \@empty + \let\tabu@cellralign \@empty + \let\tabu@cellright \@empty + \let\tabu@cellleft \@empty + \let\tabu@thevline \relax}% + \edef\tabu@temp{\tabu@multispan \tabu@nbcols{\noindent &}}% + \toks@\expandafter{\tabu@temp \noindent\tabu@everyrowfalse \cr + \noalign{\tabu@rearstrut + {\globaldefs\@ne + \let\tabu@celllalign \tabu@@celllalign + \let\tabu@cellralign \tabu@@cellralign + \let\tabu@cellleft \tabu@@cellleft + \let\tabu@cellright \tabu@@cellright + \let\tabu@thevline \tabu@@thevline}}}% + \expandafter}\the\toks@ +}% \tabuphantomline +%% \firsthline and \lasthline corrections --------------------------- +\def\tabu@firstline {\tabu@hlineAZ \tabu@firsthlinecorrection {}} +\def\tabu@firsthline{\tabu@hlineAZ \tabu@firsthlinecorrection \hline} +\def\tabu@lastline {\tabu@hlineAZ \tabu@lasthlinecorrection {}} +\def\tabu@lasthline {\tabu@hlineAZ \tabu@lasthlinecorrection \hline} +\def\tabu@hline {% replaces \hline if no colortbl (see \AtBeginDocument) + \noalign{\ifnum0=`}\fi + {\CT@arc@\hrule height\arrayrulewidth}% + \futurelet \tabu@temp \tabu@xhline +}% \tabu@hline +\def\tabu@xhline{% + \ifx \tabu@temp \hline + {\ifx \CT@drsc@\relax \vskip + \else\ifx \CT@drsc@\@empty \vskip + \else \CT@drsc@\hrule height + \fi\fi + \doublerulesep}% + \fi + \ifnum0=`{\fi}% +}% \tabu@xhline +\def\tabu@hlineAZ #1#2{\noalign{\ifnum0=`}\fi \dimen@ \z@ \count@ \z@ + \toks@{}\def\tabu@hlinecorrection{#1}\def\tabu@temp{#2}% + \tabu@hlineAZsurround +}% \tabu@hlineAZ +\newcommand*\tabu@hlineAZsurround[1][\extratabsurround]{% + \extratabsurround #1\let\tabucline \tabucline@scan + \let\hline \tabu@hlinescan \let\firsthline \hline + \let\cline \tabu@clinescan \let\lasthline \hline + \expandafter \futurelet \expandafter \tabu@temp + \expandafter \tabu@nexthlineAZ \tabu@temp +}% \tabu@hlineAZsurround +\def\tabu@hlinescan {\tabu@thick \arrayrulewidth \tabu@xhlineAZ \hline} +\def\tabu@clinescan #1{\tabu@thick \arrayrulewidth \tabu@xhlineAZ {\cline{#1}}} +\def\tabucline@scan{\@testopt \tabucline@sc@n {}} +\def\tabucline@sc@n #1[#2]{\tabu@xhlineAZ {\tabucline[{#1}]{#2}}} +\def\tabu@nexthlineAZ{% + \ifx \tabu@temp\hline \else + \ifx \tabu@temp\cline \else + \ifx \tabu@temp\tabucline \else + \tabu@hlinecorrection + \fi\fi\fi +}% \tabu@nexthlineAZ +\def\tabu@xhlineAZ #1{% + \toks@\expandafter{\the\toks@ #1}% + \@tempdimc \tabu@thick % The last line width + \ifcase\count@ \@tempdimb \tabu@thick % The first line width + \else \advance\dimen@ \dimexpr \tabu@thick+\doublerulesep \relax + \fi + \advance\count@ \@ne \futurelet \tabu@temp \tabu@nexthlineAZ +}% \tabu@xhlineAZ +\def\tabu@firsthlinecorrection{% \count@ = number of \hline -1 + \@tempdima \dimexpr \ht\@arstrutbox+\dimen@ + \edef\firsthline{% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + height \the\dimexpr\@tempdima+\extratabsurround + depth \dp\@arstrutbox + width \tabustrutrule}\hss}\cr + \noalign{\vskip -\the\dimexpr \@tempdima+\@tempdimb + +\dp\@arstrutbox \relax}% + \the\toks@ + }\ifnum0=`{\fi + \expandafter}\firsthline % we are then ! +}% \tabu@firsthlinecorrection +\def\tabu@lasthlinecorrection{% + \@tempdima \dimexpr \dp\@arstrutbox+\dimen@+\@tempdimb+\@tempdimc + \edef\lasthline{% + \the\toks@ + \noalign{\vskip -\the\dimexpr\dimen@+\@tempdimb+\dp\@arstrutbox}% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + depth \the\dimexpr \dp\@arstrutbox+\@tempdimb+\dimen@ + +\extratabsurround-\@tempdimc + height \z@ + width \tabustrutrule}\hss}\cr + }\ifnum0=`{\fi + \expandafter}\lasthline % we are then ! +}% \tabu@lasthlinecorrection +\def\tabu@LT@@hline{% + \ifx\LT@next\hline + \global\let\LT@next \@gobble + \ifx \CT@drsc@\relax + \gdef\CT@LT@sep{% + \noalign{\penalty-\@medpenalty\vskip\doublerulesep}}% + \else + \gdef\CT@LT@sep{% + \multispan\LT@cols{% + \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}% + \fi + \else + \global\let\LT@next\empty + \gdef\CT@LT@sep{% + \noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \CT@LT@sep + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \noalign{\penalty\@M}% + \LT@next +}% \tabu@LT@@hline +%% Horizontal lines : \tabucline ------------------------------------ +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcommand*\tabucline{\noalign{\ifnum0=`}\fi \tabu@cline} +\newcommand*\tabu@cline[2][]{\tabu@startstop{#2}% + \ifnum \tabu@stop<\z@ \toks@{}% + \else \tabu@clinearg{#1}\tabu@thestyle + \edef\tabucline{\toks@{% + \ifnum \tabu@start>\z@ \omit + \tabu@multispan\tabu@start {\span\omit}&\fi + \omit \tabu@multispan\tabu@stop {\span\omit}% + \tabu@thehline\cr + }}\tabucline + \tabu@tracinglines{(tabu:tabucline) Style: #1^^J\the\toks@^^J^^J}% + \fi + \futurelet \tabu@temp \tabu@xcline +}% \tabu@cline +\def\tabu@clinearg #1{% + \ifx\\#1\\\let\tabu@thestyle \tabu@ls@ + \else \@defaultunits \expandafter\let\expandafter\@tempa + \romannumeral-`\0#1\relax \@nnil + \ifx \hbox\@tempa \tabu@clinebox{#1}% + \else\ifx \box\@tempa \tabu@clinebox{#1}% + \else\ifx \vbox\@tempa \tabu@clinebox{#1}% + \else\ifx \vtop\@tempa \tabu@clinebox{#1}% + \else\ifx \copy\@tempa \tabu@clinebox{#1}% + \else\ifx \leaders\@tempa \tabu@clineleads{#1}% + \else\ifx \cleaders\@tempa \tabu@clineleads{#1}% + \else\ifx \xleaders\@tempa \tabu@clineleads{#1}% + \else\tabu@getline {#1}% + \fi\fi\fi\fi\fi\fi\fi\fi + \fi +}% \tabu@clinearg +\def\tabu@clinebox #1{\tabu@clineleads{\xleaders#1\hss}} +\def\tabu@clineleads #1{% + \let\tabu@thestyle \relax \let\tabu@leaders \@undefined + \gdef\tabu@thehrule{#1}} +\def\tabu@thehline{\begingroup + \ifdefined\tabu@leaders + \noexpand\tabu@thehleaders + \else \noexpand\tabu@thehrule + \fi \endgroup +}% \tabu@thehline +\def\tabu@xcline{% + \ifx \tabu@temp\tabucline + \toks@\expandafter{\the\toks@ \noalign + {\ifx\CT@drsc@\relax \vskip + \else \CT@drsc@\hrule height + \fi + \doublerulesep}}% + \fi + \tabu@docline +}% \tabu@xcline +\def\tabu@docline {\ifnum0=`{\fi \expandafter}\the\toks@} +\def\tabu@docline@evr {\xdef\tabu@doclineafter{\the\toks@}% + \ifnum0=`{\fi}\aftergroup\tabu@doclineafter} +\def\tabu@multispan #1#2{% + \ifnum\numexpr#1>\@ne #2\expandafter\tabu@multispan + \else \expandafter\@gobbletwo + \fi {#1-1}{#2}% +}% \tabu@multispan +\def\tabu@startstop #1{\tabu@start@stop #1\relax 1-\tabu@nbcols \@nnil} +\def\tabu@start@stop #1-#2\@nnil{% + \@defaultunits \tabu@start\number 0#1\relax \@nnil + \@defaultunits \tabu@stop \number 0#2\relax \@nnil + \tabu@stop \ifnum \tabu@start>\tabu@nbcols \m@ne + \else\ifnum \tabu@stop=\z@ \tabu@nbcols + \else\ifnum \tabu@stop>\tabu@nbcols \tabu@nbcols + \else \tabu@stop + \fi\fi\fi + \advance\tabu@start \m@ne + \ifnum \tabu@start>\z@ \advance\tabu@stop -\tabu@start \fi +}% \tabu@start@stop +%% Numbers: siunitx S columns (and \tabudecimal) ------------------- +\def\tabu@tabudecimal #1{% + \def\tabu@decimal{#1}\@temptokena{}% + \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces + \tabu@scandecimal +}% \tabu@tabudecimal +\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@} +\def\tabu@skipdecimal#1{#1\tabu@scandecimal} +\def\tabu@getdecimal@ignorespaces{% + \ifcase 0\ifx\tabu@temp\ignorespaces\else + \ifx\tabu@temp\@sptoken1\else + 2\fi\fi\relax + \let\tabu@getdecimal@ \tabu@getdecimal + \expandafter\tabu@skipdecimal + \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal + \else \expandafter\tabu@skipdecimal + \fi +}% \tabu@getdecimal@ignorespaces +\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}% + \tabu@scandecimal} +\def\do#1{% + \def\tabu@get@decimalspace#1{% + \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}% +}\do{ } +\let\tabu@@tabudecimal \tabu@tabudecimal +\def\tabu@getdecimal{% + \ifcase 0\ifx 0\tabu@temp\else + \ifx 1\tabu@temp\else + \ifx 2\tabu@temp\else + \ifx 3\tabu@temp\else + \ifx 4\tabu@temp\else + \ifx 5\tabu@temp\else + \ifx 6\tabu@temp\else + \ifx 7\tabu@temp\else + \ifx 8\tabu@temp\else + \ifx 9\tabu@temp\else + \ifx .\tabu@temp\else + \ifx ,\tabu@temp\else + \ifx -\tabu@temp\else + \ifx +\tabu@temp\else + \ifx e\tabu@temp\else + \ifx E\tabu@temp\else + \ifx\tabu@cellleft\tabu@temp1\else + \ifx\ignorespaces\tabu@temp1\else + \ifx\@sptoken\tabu@temp2\else + 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \expandafter\tabu@get@decimal + \or \expandafter\tabu@skipdecimal + \or \expandafter\tabu@get@decimalspace + \else\expandafter\tabu@printdecimal + \fi +}% \tabu@getdecimal +\def\tabu@printdecimal{% + \edef\tabu@temp{\the\@temptokena}% + \ifx\tabu@temp\@empty\else + \ifx\tabu@temp\space\else + \expandafter\tabu@decimal\expandafter{\the\@temptokena}% + \fi\fi +}% \tabu@printdecimal +%% Verbatim inside X columns ---------------------------------------- +\def\tabu@verbatim{% + \let\verb \tabu@verb + \let\FV@DefineCheckEnd \tabu@FV@DefineCheckEnd +}% \tabu@verbatim +\let\tabu@ltx@verb \verb +\def\tabu@verb{\@ifstar {\tabu@ltx@verb*} \tabu@ltx@verb} +\def\tabu@fancyvrb {% + \def\tabu@FV@DefineCheckEnd ##1{% + \def\tabu@FV@DefineCheckEnd{% + ##1% + \let\FV@CheckEnd \tabu@FV@CheckEnd + \let\FV@@CheckEnd \tabu@FV@@CheckEnd + \let\FV@@@CheckEnd \tabu@FV@@@CheckEnd + \edef\FV@EndScanning{% + \def\noexpand\next{\noexpand\end{\FV@EnvironName}}% + \global\let\noexpand\FV@EnvironName\relax + \noexpand\next}% + \xdef\FV@EnvironName{\detokenize\expandafter{\FV@EnvironName}}}% + }\expandafter\tabu@FV@DefineCheckEnd\expandafter{\FV@DefineCheckEnd} +}% \tabu@fancyvrb +\def\tabu@FV@CheckEnd #1{\expandafter\FV@@CheckEnd \detokenize{#1\end{}}\@nil} +\edef\tabu@FV@@@CheckEnd {\detokenize{\end{}}} +\begingroup +\catcode`\[1 \catcode`\]2 +\@makeother\{ \@makeother\} + \edef\x[\endgroup + \def\noexpand\tabu@FV@@CheckEnd ##1\detokenize[\end{]##2\detokenize[}]##3% + ]\x \@nil{\def\@tempa{#2}\def\@tempb{#3}} +\def\tabu@FV@ListProcessLine #1{% + \hbox {%to \hsize{% + \kern\leftmargin + \hbox {%to \linewidth{% + \FV@LeftListNumber + \FV@LeftListFrame + \FancyVerbFormatLine{#1}\hss +%% DG/SR modification begin - Jan. 28, 1998 (for numbers=right add-on) +%% \FV@RightListFrame}% + \FV@RightListFrame + \FV@RightListNumber}% +%% DG/SR modification end + \hss}} +%% \savetabu -------------------------------------------------------- +\newcommand*\savetabu[1]{\noalign{% + \tabu@sanitizearg{#1}\tabu@temp + \ifx \tabu@temp\@empty \tabu@savewarn{}{The tabu will not be saved}\else + \@ifundefined{tabu@saved@\tabu@temp}{}{\tabu@savewarn{#1}{Overwriting}}% + \ifdefined\tabu@restored \expandafter\let + \csname tabu@saved@\tabu@temp \endcsname \tabu@restored + \else {\tabu@save}% + \fi + \fi}% +}% \savetabu +\def\tabu@save {% + \toks0\expandafter{\tabu@saved@}% + \iftabu@negcoef + \let\tabu@wddef \relax \let\tabu@ \tabu@savewd \edef\tabu@savewd{\tabu@Xcoefs}% + \toks0\expandafter{\the\toks\expandafter0\tabu@savewd}\fi + \toks1\expandafter{\tabu@savedpream}% + \toks2\expandafter{\tabu@savedpreamble}% + \let\@preamble \relax + \let\tabu@savedpream \relax \let\tabu@savedparams \relax + \edef\tabu@preamble{% + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \edef\tabu@usetabu{% + \def\@preamble {\noexpand\the\toks2}% + \tabu@target \the\tabu@target \relax + \tabucolX \the\tabucolX \relax + \tabu@nbcols \the\tabu@nbcols \relax + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \let\tabu@aligndefault \relax \let\@sharp \relax + \edef\@tempa{\noexpand\tabu@s@ved + {\tabu@usetabu} + {\tabu@preamble} + {\the\toks1}}\@tempa + \tabu@message@save +}% \tabu@save +\long\def\tabu@s@ved #1#2#3{% + \def\tabu@usetabu{#1}% + \expandafter\gdef\csname tabu@saved@\tabu@temp\endcsname ##1{% + \ifodd ##1% \usetabu + \tabu@measuringfalse \tabu@spreadfalse % Just in case... + \gdef\tabu@usetabu {% + \ifdim \tabu@target>\z@ \tabu@warn@usetabu \fi + \global\let\tabu@usetabu \@undefined + \def\@halignto {to\tabu@target}% + #1% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \else % \preamble + \gdef\tabu@preamble {% + \global\let\tabu@preamble \@undefined + #2% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \fi + #3}% +}% \tabu@s@ved +\def\tabu@aligndefault@text {\tabu@aligndefault}% +\def\tabu@warn@usetabu {\PackageWarning{tabu} + {Specifying a target with \string\usetabu\space is useless + \MessageBreak The target cannot be changed!}} +\def\tabu@savewd #1#2{\ifdim #2\p@<\z@ \tabu@wddef{#1}{\tabu@wd{#1}}\fi} +\def\tabu@savewarn#1#2{\PackageInfo{tabu} + {User-name `#1' already used for \string\savetabu + \MessageBreak #2}}% +\def\tabu@saveerr#1{\PackageError{tabu} + {User-name `#1' is unknown for \string\usetabu + \MessageBreak I cannot restore an unknown preamble!}\@ehd} +%% \rowfont --------------------------------------------------------- +\newskip \tabu@cellskip +\def\tabu@rowfont{\ifdim \baselineskip=\z@\noalign\fi + {\ifnum0=`}\fi \tabu@row@font} +\newcommand*\tabu@row@font[2][]{% + \ifnum7=\currentgrouptype + \global\let\tabu@@cellleft \tabu@cellleft + \global\let\tabu@@cellright \tabu@cellright + \global\let\tabu@@celllalign \tabu@celllalign + \global\let\tabu@@cellralign \tabu@cellralign + \global\let\tabu@@rowfontreset\tabu@rowfontreset + \fi + \global\let\tabu@rowfontreset \tabu@rowfont@reset + \expandafter\gdef\expandafter\tabu@cellleft\expandafter{\tabu@cellleft #2}% + \ifcsname tabu@cell@#1\endcsname % row alignment + \csname tabu@cell@#1\endcsname \fi + \ifnum0=`{\fi}% end of group / noalign group +}% \rowfont +\def\tabu@ifcolorleavevmode #1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}% +\def\tabu@rowfont@reset{% + \global\let\tabu@rowfontreset \tabu@@rowfontreset + \global\let\tabu@cellleft \tabu@@cellleft + \global\let\tabu@cellright \tabu@@cellright + \global\let\tabu@cellfont \@empty + \global\let\tabu@celllalign \tabu@@celllalign + \global\let\tabu@cellralign \tabu@@cellralign +}% \tabu@@rowfontreset +\let\tabu@rowfontreset \@empty % overwritten \AtBeginDocument if colortbl +%% \tabu@prepnext@tok ----------------------------------------------- +\newif \iftabu@cellright +\def\tabu@prepnext@tok{% + \ifnum \count@<\z@ % + \@tempcnta \@M % + \tabu@nbcols\z@ + \let\tabu@fornoopORI \@fornoop + \tabu@cellrightfalse + \else + \ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left + \advance \tabu@nbcols \@ne + \iftabu@cellright % before-previous token is right and is finished + \tabu@cellrightfalse % + \tabu@righttok + \fi + \tabu@lefttok + \or % (case 1) previous token is right + \tabu@cellrighttrue \let\@fornoop \tabu@lastnoop + \else % special column: do not change the token + \iftabu@cellright % before-previous token is right + \tabu@cellrightfalse + \tabu@righttok + \fi + \fi % \ifcase + \fi + \tabu@prepnext@tokORI +}% \tabu@prepnext@tok +\long\def\tabu@lastnoop#1\@@#2#3{\tabu@lastn@@p #2\@nextchar \in@\in@@} +\def\tabu@lastn@@p #1\@nextchar #2#3\in@@{% + \ifx \in@#2\else + \let\@fornoop \tabu@fornoopORI + \xdef\tabu@mkpreambuffer{\tabu@nbcols\the\tabu@nbcols \tabu@mkpreambuffer}% + \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}% + \expandafter\prepnext@tok + \fi +}% \tabu@lastnoop +\def\tabu@righttok{% + \advance \count@ \m@ne + \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}% + \advance \count@ \@ne +}% \tabu@righttok +\def\tabu@lefttok{\toks\count@\expandafter{\expandafter\tabu@celllalign + \the\toks\count@ \tabu@cellleft}% after because of $ +}% \tabu@lefttok +%% Neutralisation of glues ------------------------------------------ +\let\tabu@cellleft \@empty +\let\tabu@cellright \@empty +\tabu@celllalign@def{\tabu@cellleft}% +\let\tabu@cellralign \@empty +\def\tabu@cell@align #1#2#3{% + \let\tabu@maybesiunitx \toks@ \tabu@celllalign + \global \expandafter \tabu@celllalign@def \expandafter {\the\toks@ #1}% + \toks@\expandafter{\tabu@cellralign #2}% + \xdef\tabu@cellralign{\the\toks@}% + \toks@\expandafter{\tabu@cellleft #3}% + \xdef\tabu@cellleft{\the\toks@}% +}% \tabu@cell@align +\def\tabu@cell@l{% force alignment to left + \tabu@cell@align + {\tabu@removehfil \raggedright \tabu@cellleft}% left + {\tabu@flush1\tabu@ignorehfil}% right + \raggedright +}% \tabu@cell@l +\def\tabu@cell@c{% force alignment to center + \tabu@cell@align + {\tabu@removehfil \centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \centering +}% \tabu@cell@c +\def\tabu@cell@r{% force alignment to right + \tabu@cell@align + {\tabu@removehfil \raggedleft \tabu@flush1\tabu@cellleft} + \tabu@ignorehfil + \raggedleft +}% \tabu@cell@r +\def\tabu@cell@j{% force justification (for p, m, b columns) + \tabu@cell@align + {\tabu@justify\tabu@cellleft} + {} + \tabu@justify +}% \tabu@cell@j +\def\tabu@justify{% + \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip + \parfillskip\@flushglue +}% \tabu@justify +%% ragged2e settings +\def\tabu@cell@L{% force alignment to left (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedRight \tabu@cellleft} + {\tabu@flush 1\tabu@ignorehfil} + \RaggedRight +}% \tabu@cell@L +\def\tabu@cell@C{% force alignment to center (ragged2e) + \tabu@cell@align + {\tabu@removehfil \Centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \Centering +}% \tabu@cell@C +\def\tabu@cell@R{% force alignment to right (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedLeft \tabu@flush 1\tabu@cellleft} + \tabu@ignorehfil + \RaggedLeft +}% \tabu@cell@R +\def\tabu@cell@J{% force justification (ragged2e) + \tabu@cell@align + {\justifying \tabu@cellleft} + {} + \justifying +}% \tabu@cell@J +\def\tabu@flush#1{% + \iftabu@colortbl % colortbl uses \hfill rather than \hfil + \hskip \ifnum13<\currentgrouptype \stretch{#1}% + \else \ifdim#1pt<\p@ \tabu@cellskip + \else \stretch{#1} + \fi\fi \relax + \else % array.sty + \ifnum 13<\currentgrouptype + \hfil \hskip1sp \relax \fi + \fi +}% \tabu@flush +\let\tabu@hfil \hfil +\let\tabu@hfill \hfill +\let\tabu@hskip \hskip +\def\tabu@removehfil{% + \iftabu@colortbl + \unkern \tabu@cellskip =\lastskip + \ifnum\gluestretchorder\tabu@cellskip =\tw@ \hskip-\tabu@cellskip + \else \tabu@cellskip \z@skip + \fi + \else + \ifdim\lastskip=1sp\unskip\fi + \ifnum\gluestretchorder\lastskip =\@ne + \hfilneg % \hfilneg for array.sty but not for colortbl... + \fi + \fi +}% \tabu@removehfil +\def\tabu@ignorehfil{\aftergroup \tabu@nohfil} +\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil + \def\hfil{\let\hfil \tabu@hfil}% local to (alignment template) group +}% \tabu@nohfil +\def\tabu@colortblalignments {% if colortbl + \def\tabu@nohfil{% + \def\hfil {\let\hfil \tabu@hfil}% local to (alignment template) group + \def\hfill {\let\hfill \tabu@hfill}% (colortbl uses \hfill) pfff... + \def\hskip ####1\relax{\let\hskip \tabu@hskip}}% local +}% \tabu@colortblalignments +%% Taking care of footnotes and hyperfootnotes ---------------------- +\long\def\tabu@footnotetext #1{% + \edef\@tempa{\the\tabu@footnotes + \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}% + \global\tabu@footnotes\expandafter{\@tempa {#1}}}% +\long\def\tabu@xfootnotetext [#1]#2{% + \global\tabu@footnotes\expandafter{\the\tabu@footnotes + \footnotetext [{#1}]{#2}}} +\let\tabu@xfootnote \@xfootnote +\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }} +\long\def\tabu@Hy@xfootnote [#1]{% + \begingroup + \value\@mpfn #1\relax + \protected@xdef \@thefnmark {\thempfn}% + \endgroup + \@footnotemark \tabu@Hy@ftntxt {#1}% +}% \tabu@Hy@xfootnote +\long\def\tabu@Hy@ftntxt #1#2{% + \edef\@tempa{% + \the\tabu@footnotes + \begingroup + \value\@mpfn #1\relax + \noexpand\protected@xdef\noexpand\@thefnmark {\noexpand\thempfn}% + \expandafter \noexpand \expandafter + \tabu@Hy@footnotetext \expandafter{\Hy@footnote@currentHref}% + }% + \global\tabu@footnotes\expandafter{\@tempa {#2}% + \endgroup}% +}% \tabu@Hy@ftntxt +\long\def\tabu@Hy@footnotetext #1#2{% + \H@@footnotetext{% + \ifHy@nesting + \hyper@@anchor {#1}{#2}% + \else + \Hy@raisedlink{% + \hyper@@anchor {#1}{\relax}% + }% + \def\@currentHref {#1}% + \let\@currentlabelname \@empty + #2% + \fi + }% +}% \tabu@Hy@footnotetext +%% No need for \arraybackslash ! ------------------------------------ +\def\tabu@latextwoe {% +\def\tabu@temp##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@centering \centering \arraybackslash +\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash +\tabu@temp \tabu@raggedright \raggedright \arraybackslash +}% \tabu@latextwoe +\def\tabu@raggedtwoe {% +\def\tabu@temp ##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@Centering \Centering \arraybackslash +\tabu@temp \tabu@RaggedLeft \RaggedLeft \arraybackslash +\tabu@temp \tabu@RaggedRight \RaggedRight \arraybackslash +\tabu@temp \tabu@justifying \justifying \arraybackslash +}% \tabu@raggedtwoe +\def\tabu@normalcrbackslash{\let\\\@normalcr} +\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{% + \expandafter\tabu@normalcrbackslash \@trivlist}} +%% Utilities: \fbox \fcolorbox and \tabudecimal ------------------- +\def\tabu@fbox {\leavevmode\afterassignment\tabu@beginfbox \setbox\@tempboxa\hbox} +\def\tabu@beginfbox {\bgroup \kern\fboxsep + \bgroup\aftergroup\tabu@endfbox} +\def\tabu@endfbox {\kern\fboxsep\egroup\egroup + \@frameb@x\relax} +\def\tabu@color@b@x #1#2{\leavevmode \bgroup + \def\tabu@docolor@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}% + \afterassignment\tabu@begincolor@b@x \setbox\z@ \hbox +}% \tabu@color@b@x +\def\tabu@begincolor@b@x {\kern\fboxsep \bgroup + \aftergroup\tabu@endcolor@b@x \set@color} +\def\tabu@endcolor@b@x {\kern\fboxsep \egroup + \dimen@\ht\z@ \advance\dimen@ \fboxsep \ht\z@ \dimen@ + \dimen@\dp\z@ \advance\dimen@ \fboxsep \dp\z@ \dimen@ + \tabu@docolor@b@x \egroup +}% \tabu@endcolor@b@x +%% Corrections (arydshln, delarray, colortbl) ----------------------- +\def\tabu@fix@arrayright {%% \@arrayright is missing from \endarray + \iftabu@colortbl + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \def\tabu@endarray{% + \crcr \egroup \egroup % + \@arrayright % + \gdef\@preamble{}\CT@end}% + \fi + \else + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \PackageWarning{tabu} + {\string\@arrayright\space is missing from the + \MessageBreak definition of \string\endarray. + \MessageBreak Compatibility with delarray.sty is broken.}% + \fi\fi +}% \tabu@fix@arrayright +\def\tabu@adl@xarraydashrule #1#2#3{% + \ifnum\@lastchclass=\adl@class@start\else + \ifnum\@lastchclass=\@ne\else + \ifnum\@lastchclass=5 \else % @-arg (class 5) and !-arg (class 1) + \adl@leftrulefalse \fi\fi % must be treated the same + \fi + \ifadl@zwvrule\else \ifadl@inactive\else + \@addtopreamble{\vrule\@width\arrayrulewidth + \@height\z@ \@depth\z@}\fi \fi + \ifadl@leftrule + \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}% + {\number#1}#3}% + \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}% + {\number#2}#3} + \fi +}% \tabu@adl@xarraydashrule +\def\tabu@adl@act@endpbox {% + \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox + \egroup \egroup + \adl@colhtdp \box\adl@box \hfil +}% \tabu@adl@act@endpbox +\def\tabu@adl@fix {% + \let\adl@xarraydashrule \tabu@adl@xarraydashrule % arydshln + \let\adl@act@endpbox \tabu@adl@act@endpbox % arydshln + \let\adl@act@@endpbox \tabu@adl@act@endpbox % arydshln + \let\@preamerror \@preamerr % arydshln +}% \tabu@adl@fix +%% Correction for longtable' \@startbox definition ------------------ +%% => \everypar is ``missing'' : TeX should be in vertical mode +\def\tabu@LT@startpbox #1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% +}% \tabu@LT@startpbox +%% \tracingtabu and the package options ------------------ +\DeclareOption{delarray}{\AtEndOfPackage{\RequirePackage{delarray}}} +\DeclareOption{linegoal}{% + \AtEndOfPackage{% + \RequirePackage{linegoal}[2010/12/07]% + \let\tabudefaulttarget \linegoal% \linegoal is \linewidth if not pdfTeX +}} +\DeclareOption{scantokens}{\tabuscantokenstrue} +\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu=\tw@}} +\def\tracingtabu {\begingroup\@ifnextchar=% + {\afterassignment\tabu@tracing\count@} + {\afterassignment\tabu@tracing\count@1\relax}} +\def\tabu@tracing{\expandafter\endgroup + \expandafter\tabu@tr@cing \the\count@ \relax +}% \tabu@tracing +\def\tabu@tr@cing #1\relax {% + \ifnum#1>\thr@@ \let\tabu@tracinglines\message + \else \let\tabu@tracinglines\@gobble + \fi + \ifnum#1>\tw@ \let\tabu@DBG \tabu@@DBG + \def\tabu@mkarstrut {\tabu@DBG@arstrut}% + \tabustrutrule 1.5\p@ + \else \let\tabu@DBG \@gobble + \def\tabu@mkarstrut {\tabu@arstrut}% + \tabustrutrule \z@ + \fi + \ifnum#1>\@ne \let\tabu@debug \message + \else \let\tabu@debug \@gobble + \fi + \ifnum#1>\z@ + \let\tabu@message \message + \let\tabu@tracing@save \tabu@message@save + \let\tabu@starttimer \tabu@pdftimer + \else + \let\tabu@message \@gobble + \let\tabu@tracing@save \@gobble + \let\tabu@starttimer \relax + \fi +}% \tabu@tr@cing +%% Setup \AtBeginDocument +\AtBeginDocument{\tabu@AtBeginDocument} +\def\tabu@AtBeginDocument{\let\tabu@AtBeginDocument \@undefined + \ifdefined\arrayrulecolor \tabu@colortbltrue % + \tabu@colortblalignments % different glues are used + \else \tabu@colortblfalse \fi + \ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi + \ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi + \let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@ + \ifodd 1\ifcsname siunitx_table_collect_begin:Nn\endcsname % + \expandafter\ifx + \csname siunitx_table_collect_begin:Nn\endcsname\relax 0\fi\fi\relax + \tabu@siunitxtrue + \else \let\tabu@maybesiunitx \@firstofone % + \let\tabu@siunitx \tabu@nosiunitx + \tabu@siunitxfalse + \fi + \ifdefined\adl@array % + \else \let\tabu@adl@fix \relax + \let\tabu@adl@endtrial \@empty \fi + \ifdefined\longtable % + \else \let\longtabu \tabu@nolongtabu \fi + \ifdefined\cellspacetoplimit \tabu@warn@cellspace\fi + \csname\ifcsname ifHy@hyperfootnotes\endcsname % + ifHy@hyperfootnotes\else iffalse\fi\endcsname + \let\tabu@footnotetext \tabu@Hy@ftntext + \let\tabu@xfootnote \tabu@Hy@xfootnote \fi + \ifdefined\FV@DefineCheckEnd% + \tabu@fancyvrb \fi + \ifdefined\color % + \let\tabu@color \color + \def\tabu@leavevmodecolor ##1{% + \def\tabu@leavevmodecolor {\leavevmode ##1}% + }\expandafter\tabu@leavevmodecolor\expandafter{\color}% + \else + \let\tabu@color \tabu@nocolor + \let\tabu@leavevmodecolor \@firstofone \fi + \tabu@latextwoe + \ifdefined\@raggedtwoe@everyselectfont % + \tabu@raggedtwoe + \else + \let\tabu@cell@L \tabu@cell@l + \let\tabu@cell@R \tabu@cell@r + \let\tabu@cell@C \tabu@cell@c + \let\tabu@cell@J \tabu@cell@j \fi + \expandafter\in@ \expandafter\@arrayright \expandafter{\endarray}% + \ifin@ \let\tabu@endarray \endarray + \else \tabu@fix@arrayright \fi% + \everyrow{}% +}% \tabu@AtBeginDocument +\def\tabu@warn@cellspace{% + \PackageWarning{tabu}{% + Package cellspace has some limitations + \MessageBreak And redefines some macros of array.sty. + \MessageBreak Please use \string\tabulinesep\space to control + \MessageBreak vertical spacing of lines inside tabu environment}% +}% \tabu@warn@cellspace +%% tabu Package initialisation +\tabuscantokensfalse +\let\tabu@arc@G \relax +\let\tabu@drsc@G \relax +\let\tabu@evr@G \@empty +\let\tabu@rc@G \@empty +\def\tabu@ls@G {\tabu@linestyle@}% +\let\tabu@@rowfontreset \@empty % +\let\tabu@@celllalign \@empty +\let\tabu@@cellralign \@empty +\let\tabu@@cellleft \@empty +\let\tabu@@cellright \@empty +\def\tabu@naturalXmin {\z@} +\def\tabu@naturalXmax {\z@} +\let\tabu@rowfontreset \@empty +\def\tabulineon {4pt}\let\tabulineoff \tabulineon +\tabu@everyrowtrue +\ifdefined\pdfelapsedtime % + \def\tabu@pdftimer {\xdef\tabu@starttime{\the\pdfelapsedtime}}% +\else \let\tabu@pdftimer \relax \let\tabu@message@etime \relax +\fi +\tracingtabu=\z@ +\newtabulinestyle {=\maxdimen}% creates the 'factory' settings \tabu@linestyle@ +\tabulinestyle{} +\taburowcolors{} +\let\tabudefaulttarget \linewidth +\ProcessOptions* % \ProcessOptions* is quicker ! +\endinput +%% +%% End of file `tabu.sty'. diff --git "a/docs/\320\230\320\275\321\202\320\265\321\200\321\204\320\265\320\271\321\201/All.png" "b/docs/\320\230\320\275\321\202\320\265\321\200\321\204\320\265\320\271\321\201/All.png" new file mode 100644 index 0000000..5bddb1d Binary files /dev/null and "b/docs/\320\230\320\275\321\202\320\265\321\200\321\204\320\265\320\271\321\201/All.png" differ diff --git "a/docs/\320\230\320\275\321\202\320\265\321\200\321\204\320\265\320\271\321\201/Main Window.png" "b/docs/\320\230\320\275\321\202\320\265\321\200\321\204\320\265\320\271\321\201/Main Window.png" new file mode 100644 index 0000000..ad873cd Binary files /dev/null and "b/docs/\320\230\320\275\321\202\320\265\321\200\321\204\320\265\320\271\321\201/Main Window.png" differ diff --git "a/docs/\320\240\320\260\321\201\320\277\321\200\320\265\320\264\320\265\320\273\320\265\320\275\320\270\320\265 \321\200\320\276\320\273\320\265\320\271.png" "b/docs/\320\240\320\260\321\201\320\277\321\200\320\265\320\264\320\265\320\273\320\265\320\275\320\270\320\265 \321\200\320\276\320\273\320\265\320\271.png" new file mode 100644 index 0000000..f87c293 Binary files /dev/null and "b/docs/\320\240\320\260\321\201\320\277\321\200\320\265\320\264\320\265\320\273\320\265\320\275\320\270\320\265 \321\200\320\276\320\273\320\265\320\271.png" differ diff --git "a/docs/\320\241\321\205\320\265\320\274\320\260 \320\261\320\260\320\267\321\213 \320\264\320\260\320\275\320\275\321\213\321\205.jpg" "b/docs/\320\241\321\205\320\265\320\274\320\260 \320\261\320\260\320\267\321\213 \320\264\320\260\320\275\320\275\321\213\321\205.jpg" new file mode 100644 index 0000000..02e12ed Binary files /dev/null and "b/docs/\320\241\321\205\320\265\320\274\320\260 \320\261\320\260\320\267\321\213 \320\264\320\260\320\275\320\275\321\213\321\205.jpg" differ diff --git a/server/Easyweek.db b/server/Easyweek.db new file mode 100644 index 0000000..96dfe1a Binary files /dev/null and b/server/Easyweek.db differ diff --git a/server/databasesingleton.cpp b/server/databasesingleton.cpp new file mode 100644 index 0000000..f13a758 --- /dev/null +++ b/server/databasesingleton.cpp @@ -0,0 +1,212 @@ +#include "databasesingleton.h" + +DataBaseSingleton* DataBaseSingleton::p_instance = nullptr; +SingletonDestroyer DataBaseSingleton::destroyer; + +DataBaseSingleton::DataBaseSingleton() { + db = QSqlDatabase::addDatabase("QSQLITE"); +} + +DataBaseSingleton* DataBaseSingleton::getInstance() { + if (!p_instance) { + p_instance = new DataBaseSingleton(); + destroyer.initialize(p_instance); + } + return p_instance; +} + +bool DataBaseSingleton::initialize(const QString& databaseName) { + db.setDatabaseName(databaseName); + if (!db.open()) { + qDebug() << "Ошибка подключения:" << db.lastError().text(); + return false; + } + + // Создание таблицы users + QSqlQuery query(db); + bool success = query.exec( + "CREATE TABLE IF NOT EXISTS users (" + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "name VARCHAR(20) NOT NULL, " + "email VARCHAR(50) NOT NULL , " + "pass VARCHAR(20) NOT NULL, " + "is_admin BOOLEAN DEFAULT FALSE)" + ); + + success &= query.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_users_email ON users(email)"); + + // Создание таблицы products + success &= query.exec( + "CREATE TABLE IF NOT EXISTS products (" + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "id_user INTEGER NOT NULL, " + "name VARCHAR(50) NOT NULL, " + "proteins INTEGER NOT NULL, " + "fatness INTEGER NOT NULL, " + "carbs INTEGER NOT NULL, " + "weight INTEGER NOT NULL, " + "cost INTEGER NOT NULL, " + "type INTEGER NOT NULL, " + "FOREIGN KEY(id_user) REFERENCES users(id))" + ); + + // Создание таблицы favorites + success &= query.exec( + "CREATE TABLE IF NOT EXISTS favorites (" + "id_user INTEGER NOT NULL, " + "products TEXT NOT NULL, " // Хранение массива ID продуктов в виде строки + "calories INTEGER NOT NULL, " + "all_cost INTEGER NOT NULL, " + "all_weight INTEGER NOT NULL, " + "FOREIGN KEY(id_user) REFERENCES users(id))" + ); + + // Создание таблицы statistics + success &= query.exec( + "CREATE TABLE IF NOT EXISTS statistics (" + "count_registrations INTEGER DEFAULT 0, " + "count_visits INTEGER DEFAULT 0, " + "count_generations INTEGER DEFAULT 0)" + ); + + // Инициализация статистики, если таблица пуста + query.exec("INSERT OR IGNORE INTO statistics (count_registrations, count_visits, count_generations) VALUES (0, 0, 0)"); + query.exec("INSERT OR IGNORE INTO users(name, email, pass, is_admin) VALUES ('NewDev','new@devs.su','admin',true)"); + return success; +} + +QSqlQuery DataBaseSingleton::executeQuery(const QString& queryStr, const QVariantMap& params) { + QSqlQuery query(db); + query.prepare(queryStr); + for (auto it = params.begin(); it != params.end(); ++it) { + query.bindValue(it.key(), it.value()); + } + if (!query.exec()) { + qDebug() << "Ошибка запроса:" << query.lastError().text(); + qDebug() << "Текст запроса:" << queryStr; + } + return query; +} + +// Методы для работы с таблицей users +bool DataBaseSingleton::checkUserCredentials(const QString& email, const QString& password) { + QSqlQuery query = executeQuery( + "SELECT * FROM users WHERE email = :email AND pass = :pass", + {{":email", email}, {":pass", password}} + ); + return query.next(); +} + +bool DataBaseSingleton::addUser(const QString& name, const QString& email, const QString& password, bool isAdmin) { + QSqlQuery query = executeQuery( + "INSERT INTO users (name, email, pass, is_admin) VALUES (:name, :email, :pass, :is_admin)", + {{":name", name}, {":email", email}, {":pass", password}, {":is_admin", isAdmin}} + ); + + if (query.lastError().isValid()) { + qDebug() << "Ошибка SQL:" << query.lastError().text(); + return false; + } + return true; +} + +// Методы для работы с таблицей products +bool DataBaseSingleton::addProduct(int userId, const QString& name, int proteins, int fatness, int carbs, int weight, int cost, int type) { + QSqlQuery query = executeQuery( + "INSERT INTO products (id_user, name, proteins, fatness, carbs, weight, cost, type) " + "VALUES (:id_user, :name, :proteins, :fatness, :carbs, :weight, :cost, :type)", + { + {":id_user", userId}, + {":name", name}, + {":proteins", proteins}, + {":fatness", fatness}, + {":carbs", carbs}, + {":weight", weight}, + {":cost", cost}, + {":type", type} + } + ); + return !query.lastError().isValid(); // Возвращаем true, если ошибок нет +} + +QVector DataBaseSingleton::getProductsByUser(int userId) { + QSqlQuery query = executeQuery( + "SELECT * FROM products WHERE id_user = :id_user", + {{":id_user", userId}} + ); + QVector products; + while (query.next()) { + QVariantMap product; + product["id"] = query.value("id").toInt(); + product["name"] = query.value("name").toString(); + product["proteins"] = query.value("proteins").toInt(); + product["fatness"] = query.value("fatness").toInt(); + product["carbs"] = query.value("carbs").toInt(); + product["weight"] = query.value("weight").toInt(); + product["cost"] = query.value("cost").toInt(); + product["type"] = query.value("type").toInt(); + products.append(product); + } + return products; +} + +// Методы для работы с таблицей favorites +bool DataBaseSingleton::addFavoriteRation(int userId, const QVector& productIds, int calories, int allCost, int allWeight) { + // Преобразуем QVector в QVector + QVector productIdsStr; + for (int id : productIds) { + productIdsStr.append(QString::number(id)); // Преобразуем int в QString + } + + // Преобразуем QVector в QStringList и объединяем в строку через запятую + QString productsStr = QStringList::fromVector(productIdsStr).join(","); + + // Выполняем SQL-запрос + return executeQuery( + "INSERT INTO favorites (id_user, products, calories, all_cost, all_weight) " + "VALUES (:id_user, :products, :calories, :all_cost, :all_weight)", + {{":id_user", userId}, {":products", productsStr}, {":calories", calories}, + {":all_cost", allCost}, {":all_weight", allWeight}} + ).exec(); +} + +QVector DataBaseSingleton::getFavoritesByUser(int userId) { + QSqlQuery query = executeQuery( + "SELECT * FROM favorites WHERE id_user = :id_user", + {{":id_user", userId}} + ); + QVector favorites; + while (query.next()) { + QVariantMap favorite; + favorite["products"] = query.value("products").toString(); + favorite["calories"] = query.value("calories").toInt(); + favorite["all_cost"] = query.value("all_cost").toInt(); + favorite["all_weight"] = query.value("all_weight").toInt(); + favorites.append(favorite); + } + return favorites; +} + +// Методы для работы с таблицей statistics +bool DataBaseSingleton::updateStatistics(int registrations, int visits, int generations) { + return executeQuery( + "UPDATE statistics SET count_registrations = :registrations, " + "count_visits = :visits, count_generations = :generations", + {{":registrations", registrations}, {":visits", visits}, {":generations", generations}} + ).exec(); +} + +QVariantMap DataBaseSingleton::getStatistics() { + QSqlQuery query = executeQuery("SELECT * FROM statistics"); + QVariantMap stats; + if (query.next()) { + stats["registrations"] = query.value("count_registrations").toInt(); + stats["visits"] = query.value("count_visits").toInt(); + stats["generations"] = query.value("count_generations").toInt(); + } + return stats; +} + +// Реализация разрушителя +SingletonDestroyer::~SingletonDestroyer() { delete p_instance; } +void SingletonDestroyer::initialize(DataBaseSingleton* p) { p_instance = p; } diff --git a/server/databasesingleton.h b/server/databasesingleton.h new file mode 100644 index 0000000..9e3ce2d --- /dev/null +++ b/server/databasesingleton.h @@ -0,0 +1,176 @@ +#ifndef DATABASESINGLETON_H +#define DATABASESINGLETON_H + +#include +#include +#include +#include +#include +#include + +class DataBaseSingleton; + +/** + * @brief Класс для разрушения экземпляра Singleton. + * + * Используется для корректного удаления экземпляра DataBaseSingleton. + */ +class SingletonDestroyer { +private: + DataBaseSingleton* p_instance; ///< Указатель на экземпляр Singleton +public: + /** + * @brief Деструктор для удаления Singleton. + * + * Уничтожает экземпляр Singleton, если он существует. + */ + ~SingletonDestroyer(); + + /** + * @brief Инициализация указателя на экземпляр Singleton. + * + * @param p Указатель на экземпляр Singleton. + */ + void initialize(DataBaseSingleton* p); +}; + +/** + * @brief Класс для работы с базой данных. + * + * Реализует паттерн Singleton для подключения к базе данных, выполнения SQL-запросов, + * а также управления данными пользователей, продуктов, избранных рационов и статистики. + */ +class DataBaseSingleton { +private: + static DataBaseSingleton* p_instance; ///< Единственный экземпляр класса + static SingletonDestroyer destroyer; ///< Объект-разрушитель + QSqlDatabase db; ///< Объект базы данных + + /** + * @brief Приватный конструктор. + * + * Запрещает создание экземпляров класса напрямую. + */ + DataBaseSingleton(); + + DataBaseSingleton(const DataBaseSingleton&) = delete; ///< Запрещает копирование экземпляра + DataBaseSingleton& operator=(const DataBaseSingleton&) = delete; ///< Запрещает присваивание + + /** + * @brief Приватный деструктор. + * + * Закрыт для предотвращения удаления экземпляра Singleton извне. + */ + ~DataBaseSingleton() = default; + + friend class SingletonDestroyer; ///< Дружественный класс для доступа к деструктору + +public: + /** + * @brief Получение единственного экземпляра Singleton. + * + * @return Экземпляр класса DataBaseSingleton. + */ + static DataBaseSingleton* getInstance(); + + /** + * @brief Инициализация базы данных. + * + * Создает соединение с базой данных и выполняет необходимые операции для создания таблиц. + * + * @param databaseName Имя файла базы данных. + * @return true, если инициализация успешна, иначе false. + */ + bool initialize(const QString& databaseName); + + /** + * @brief Выполнение SQL-запроса с параметрами. + * + * @param query SQL-запрос в виде строки. + * @param params Параметры для SQL-запроса. + * @return Результат выполнения запроса в виде QSqlQuery. + */ + QSqlQuery executeQuery(const QString& query, const QVariantMap& params = QVariantMap()); + + /** + * @brief Проверка учетных данных пользователя. + * + * @param login Логин пользователя. + * @param password Пароль пользователя. + * @return true, если учетные данные корректны, иначе false. + */ + bool checkUserCredentials(const QString& login, const QString& password); + + /** + * @brief Добавление нового пользователя в базу данных. + * + * @param name Имя пользователя. + * @param email Электронная почта пользователя. + * @param password Пароль пользователя. + * @param isAdmin Флаг администратора (по умолчанию false). + * @return true, если пользователь добавлен, иначе false. + */ + bool addUser(const QString& name, const QString& email, const QString& password, bool isAdmin = false); + + /** + * @brief Добавление продукта в базу данных. + * + * @param userId Идентификатор пользователя. + * @param name Название продукта. + * @param proteins Количество белков в продукте. + * @param fatness Количество жиров в продукте. + * @param carbs Количество углеводов в продукте. + * @param weight Вес продукта. + * @param cost Стоимость продукта. + * @param type Тип продукта. + * @return true, если продукт добавлен, иначе false. + */ + bool addProduct(int userId, const QString& name, int proteins, int fatness, int carbs, int weight, int cost, int type); + + /** + * @brief Получение продуктов для конкретного пользователя. + * + * @param userId Идентификатор пользователя. + * @return Список продуктов, принадлежащих пользователю. + */ + QVector getProductsByUser(int userId); + + /** + * @brief Добавление рациона в избранное. + * + * @param userId Идентификатор пользователя. + * @param productIds Список идентификаторов продуктов. + * @param calories Общее количество калорий. + * @param allCost Общая стоимость рациона. + * @param allWeight Общий вес рациона. + * @return true, если рацион добавлен, иначе false. + */ + bool addFavoriteRation(int userId, const QVector& productIds, int calories, int allCost, int allWeight); + + /** + * @brief Получение избранных рационов пользователя. + * + * @param userId Идентификатор пользователя. + * @return Список избранных рационов пользователя. + */ + QVector getFavoritesByUser(int userId); + + /** + * @brief Обновление статистики. + * + * @param registrations Количество регистраций. + * @param visits Количество посещений. + * @param generations Количество генераций. + * @return true, если статистика обновлена, иначе false. + */ + bool updateStatistics(int registrations, int visits, int generations); + + /** + * @brief Получение статистики. + * + * @return Словарь с данными статистики. + */ + QVariantMap getStatistics(); +}; + +#endif // DATABASESINGLETON_H diff --git a/server/echoServer.pro b/server/echoServer.pro new file mode 100644 index 0000000..fa16d4f --- /dev/null +++ b/server/echoServer.pro @@ -0,0 +1,34 @@ +QT -= gui + +QT += network #Для работы с сетью +QT += sql + +CONFIG += c++11 console +CONFIG -= app_bundle + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + databasesingleton.cpp \ + func2serv.cpp \ + main.cpp \ + mytcpserver.cpp + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +HEADERS += \ + databasesingleton.h \ + func2serv.h \ + mytcpserver.h diff --git a/server/func2serv.cpp b/server/func2serv.cpp new file mode 100644 index 0000000..c367c10 --- /dev/null +++ b/server/func2serv.cpp @@ -0,0 +1,316 @@ +#include "func2serv.h" +#include +#include +#include +#include +#include +#include +#include +#include +// Заглушка для базы данных + +QMap> mockDatabase = { + {"1", {"orange_11_45_12_24", "banana_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24", "orange_11_45_12_24"}}, + {"2", {"apple_11_45_12_24", "grape_11_45_12_24"}} + }; + +using namespace std; +QByteArray parsing(QString input, int socdes) +{ + + QStringList container = input.remove("\r\n").split("//"); //пример входящих данных reg//login_user//password_user + + if (container.isEmpty()) { + return "server error: empty command\\n"; + } + + + qDebug() << socdes << " user command: " << container[0]; + QString var = container[0]; + if (var == "check_task") + { + return check_task(); + } + else if (var =="auth") + { + return auth(container); + } + else if (var == "add_product") + { + return add_product(container); + } + else if (var == "user" && container[2] == "get_products") { + return get_products(container[1]); + } + else if (var =="reg") + { + return reg(container); + } + else if (var == "get_stat") + { + return(get_stat()); + } + else if (var == "admin" && container[1] == "dynamic_stat") { + return get_dynamic_stat(); + } + else if (var == "menu_export") + { + return menu_export(); + } + else if (var == "user" && container[2] == "add_favorite_ration") { + return add_favorite_ration(container); + } + else if (var == "admin" && container[1] == "get_all_users") { + return get_all_users(); + } + else if (var == "admin" && container[1] == "stable_stat") { + return get_stable_stat(); + } + else + { + return "server error: unknow command\r\n"; + } +} + + +// дарова Руслан, когда будешь писать тут функцию эту, при успешной авторизации просто пропиши return "true", при неуспешной return "false", на клиенте я так принимаю ответ +QByteArray auth(QStringList log) { + // Проверяем количество параметров + if (log.size() < 3) { + return "auth_failed//Недостаточно параметров для авторизации\r\n"; + } + + DataBaseSingleton* db = DataBaseSingleton::getInstance(); + bool authSuccess = db->checkUserCredentials(log[1], log[2]); + + if (!authSuccess) { + return "auth_failed//Неверный логин или пароль\r\n"; + } + + + + QSqlQuery query = db->executeQuery( + "SELECT id, name, email, pass FROM users WHERE (email = :login OR name = :login) AND pass = :pass", + { + {":login", log[1]}, // логин + {":pass", log[2]} // пароль + } + ); + + + if (!query.next()) { + return "auth_failed//Ошибка при получении данных пользователя\r\n"; + } + + QString userId = query.value("id").toString(); + QString userLogin = query.value("name").toString(); + QString userEmail = query.value("email").toString(); + + QString response = QString("auth_success//%1//%2//%3\r\n") + .arg(userId) + .arg(userLogin) + .arg(userEmail); + + return response.toUtf8(); +} + + +QByteArray reg(QStringList params) { + // 1️⃣ Проверка количества параметров + if (params.size() != 4) { + return "reg_failed//Недостаточно параметров для регистрации\r\n"; + } + + // 2️⃣ Извлечение данных из запроса + QString name = params[1]; // Имя пользователя + QString email = params[2]; // Email (должен быть уникальным) + QString password = params[3]; // Пароль + + DataBaseSingleton* db = DataBaseSingleton::getInstance(); + + // 3️⃣ Проверка, не занят ли email + QSqlQuery checkQuery = db->executeQuery( + "SELECT id FROM users WHERE email = :email", + {{":email", email}} + ); + + // Если запрос не выполнился (ошибка БД) + if (!checkQuery.exec()) { + return "reg_failed//Ошибка при проверке email\r\n"; + } + + // Если email уже существует (найдена запись) + if (checkQuery.next()) { + return "reg_failed//Пользователь с таким email уже зарегистрирован\r\n"; + } + + // 4️⃣ Попытка добавить пользователя + bool success = db->addUser(name, email, password, false); + + if (success) { + // 5️⃣ Обновление статистики (увеличиваем счетчик регистраций) + QVariantMap stats = db->getStatistics(); + db->updateStatistics( + stats["registrations"].toInt() + 1, // +1 новая регистрация + stats["visits"].toInt(), // Визиты без изменений + stats["generations"].toInt() // Генерации без изменений + ); + return "reg_success//Регистрация прошла успешно\r\n"; + } else { + // Если INSERT не сработал (например, из-за UNIQUE INDEX) + return "reg_failed//Ошибка при регистрации (возможно, email уже занят)\r\n"; + } +} + +QByteArray add_product(QStringList params) { + if (params.size() != 9) { + return "add_product//failed//Неверные аргументы\r\n"; + } + + DataBaseSingleton *db = DataBaseSingleton::getInstance(); + int userId = params[1].toInt(); + QString name = params[2]; +/* + // Проверяем, существует ли уже такой продукт + QSqlQuery checkQuery = db->executeQuery( + "SELECT id FROM products WHERE id_user = :id_user AND name = :name", + {{":id_user", userId}, {":name", name}} + ); + + if (checkQuery.next()) { + return "add_product//failed//Продукт уже существует\r\n"; + } +*/ + // Добавляем продукт + bool success = db->addProduct( + userId, + name, + params[3].toInt(), // proteins + params[4].toInt(), // fatness + params[5].toInt(), // carbs + params[6].toInt(), // weight + params[7].toInt(), // cost + params[8].toInt() // type + ); + + return success ? "add_product//success\r\n" : "add_product//failed//Ошибка БД\r\n"; +} + +QByteArray get_stat(/*QStringList*/){ + return "Your Statistic: null\r\n"; +} + +QByteArray check_task(/*QStringList*/){ + return "Task was succesful completed\r\n"; +} +QByteArray menu_export(/*QStringList*/){ + return "Меню успешно экспортировано!\r\n"; +} + +void fetch_products_from_db(const QString& userId, QStringList& products) { + + if (mockDatabase.contains(userId)) { + products = mockDatabase[userId]; + } +} +QByteArray get_products(QString userId) { + DataBaseSingleton* db = DataBaseSingleton::getInstance(); + int userIdInt = userId.toInt(); + QVector products = db->getProductsByUser(userIdInt); + + QJsonArray jsonArray; + for (const QVariantMap& product : products) { + QJsonObject obj = QJsonObject::fromVariantMap(product); + jsonArray.append(obj); + } + + QJsonDocument doc(jsonArray); + QByteArray jsonBytes = doc.toJson(QJsonDocument::Compact); + + qDebug() << "Отправляем продукты в виде JSON:" << jsonBytes; + + return jsonBytes; +} + +QByteArray get_all_users() { + QStringList users; + + // fetch_users_from_db(users); + + QString response; + for (const QString& user : users) { + response += user + "\r\n"; + } + + return response.toUtf8(); +} +int get_user_count() { + // Здесь будет SQL-запрос, пока заглушка + return 152; // Примерное значение +} + +int get_product_count() { + // Здесь будет SQL-запрос, пока заглушка + return 732; // Примерное значение +} +QByteArray get_stable_stat() { + + int userCount = 0; + int productCount = 0; + + userCount = get_user_count(); + productCount = get_product_count(); + + // Формируем строку ответа + QString response = "Users: " + QString::number(userCount) + "\r\n" + + "Products: " + QString::number(productCount) + "\r\n"; + + return response.toUtf8(); +} +int get_weekly_logins() { + // Заглушка, пока без БД + return 78; // Примерное значение +} + +int get_monthly_logins() { + // Заглушка, пока без БД + return 312; // Примерное значение +} +QByteArray get_dynamic_stat() { + int weeklyLogins = 0; + int monthlyLogins = 0; + + // Получаем данные из БД (пока заглушки) + weeklyLogins = get_weekly_logins(); + monthlyLogins = get_monthly_logins(); + + // Формируем строку ответа + QString response = "Logins per week: " + QString::number(weeklyLogins) + "\r\n" + + "Logins per month: " + QString::number(monthlyLogins) + "\r\n"; + + return response.toUtf8(); +} +QByteArray add_favorite_ration(const QStringList& container) { + QString userId = container[1]; // ID пользователя + QString rationId = container[2]; // ID рациона + + bool success = add_ration_to_favorites(userId, rationId); // Вызов функции-заглушки + + if (success) { + return "Ration successfully added to favorites\r\n"; + } else { + return "Error: failed to add ration to favorites\r\n"; + } +} +bool add_ration_to_favorites(const QString& userId, const QString& rationId) { + qDebug() << "Adding ration for user:" << userId << ", ration ID:" << rationId; + return true; // Заглушка, потом заменить на SQL-запрос +} + + + + + + + + diff --git a/server/func2serv.h b/server/func2serv.h new file mode 100644 index 0000000..c595a00 --- /dev/null +++ b/server/func2serv.h @@ -0,0 +1,119 @@ +#ifndef FUNC2SERV_H +#define FUNC2SERV_H + +#include + +/** + * Парсинг входных данных. + * @param input Входная строка. + * @param socdes Дескриптор сокета. + * @return Обработанная строка данных. + */ +QByteArray parsing(QString input, int socdes); + +/** + * Авторизация пользователя. + * @param Входной список данных. + * @return Результат авторизации в виде QByteArray. + */ +QByteArray auth(QStringList ); + +/** + * Регистрация пользователя. + * @param Входной список данных. + * @return Результат регистрации в виде QByteArray. + */ +QByteArray reg(QStringList); + +/** + * Добавление продукта. + * @param Входной список данных. + * @return Результат добавления продукта в виде QByteArray. + */ +QByteArray add_product(QStringList); + +/** + * Получение статистики. + * @return Статистика в виде QByteArray. + */ +QByteArray get_stat(/*QStringList*/); + +/** + * Проверка задания. + * @return Результат проверки задания в виде QByteArray. + */ +QByteArray check_task(/*QStringList*/); + +/** + * Экспорт меню. + * @return Результат экспорта меню в виде QByteArray. + */ +QByteArray menu_export(/*QStringList*/); + +/** + * Получение списка продуктов. + * @param UserId Идентификатор пользователя. + * @return Список продуктов в виде QByteArray. + */ +QByteArray get_products(QString UserId); + +/** + * Получение всех пользователей. + * @return Список всех пользователей в виде QByteArray. + */ +QByteArray get_all_users(); + +/** + * Получение стабильной статистики. + * @return Стабильная статистика в виде QByteArray. + */ +QByteArray get_stable_stat(); + +/** + * Получение количества пользователей. + * @return Количество пользователей. + */ +int get_user_count(); + +/** + * Получение количества продуктов. + * @return Количество продуктов. + */ +int get_product_count(); + +/** + * Получение динамической статистики. + * @return Динамическая статистика в виде QByteArray. + */ +QByteArray get_dynamic_stat(); + +/** + * Получение количества входов за неделю. + * @return Количество входов за неделю. + */ +int get_weekly_logins(); + +/** + * Получение количества входов за месяц. + * @return Количество входов за месяц. + */ +int get_monthly_logins(); + +/** + * Добавление рациона в избранное. + * @param container Список данных. + * @return Результат добавления в избранное в виде QByteArray. + */ +QByteArray add_favorite_ration(const QStringList& container); + +/** + * Добавление рациона в избранное для пользователя. + * @param userId Идентификатор пользователя. + * @param rationId Идентификатор рациона. + * @return Результат добавления в избранное. + */ +bool add_ration_to_favorites(const QString& userId, const QString& rationId); + +#include + +#endif // FUNC2SERV_H diff --git a/server/main.cpp b/server/main.cpp new file mode 100644 index 0000000..c999dfb --- /dev/null +++ b/server/main.cpp @@ -0,0 +1,23 @@ +#include +#include +#include +#include +#include +#include "mytcpserver.h" +#include "databasesingleton.h" + + + +int main(int argc, char *argv[]) { + QCoreApplication a(argc, argv); + + // Инициализация БД + DataBaseSingleton* db = DataBaseSingleton::getInstance(); + if (!db->initialize("../../Easyweek.db")) { + qFatal("Failed to initialize database"); + } + + + MyTcpServer myserv; + return a.exec(); +} diff --git a/server/mytcpserver.cpp b/server/mytcpserver.cpp new file mode 100644 index 0000000..463ae2c --- /dev/null +++ b/server/mytcpserver.cpp @@ -0,0 +1,85 @@ +#include "mytcpserver.h" +#include +#include +#include +#include "func2serv.h" + +MyTcpServer::~MyTcpServer() +{ + mTcpServer->close(); + server_status = 0; + qDeleteAll(mSocketDescriptors); // Удаляем все сокеты +} + +MyTcpServer::MyTcpServer(QObject *parent) : QObject(parent) +{ + mTcpServer = new QTcpServer(this); + + connect(mTcpServer, &QTcpServer::newConnection, this, &MyTcpServer::slotNewConnection); + + if (!mTcpServer->listen(QHostAddress::Any, 33333)) { + qDebug() << "server is not started"; + } else { + server_status = 1; + qDebug() << "server is started"; + } +} + +void MyTcpServer::slotNewConnection() +{ + if (server_status == 1) { + QTcpSocket *clientSocket = mTcpServer->nextPendingConnection(); + int socketDescriptor = clientSocket->socketDescriptor(); // Получаем дескриптор сокета + + if (socketDescriptor == -1) { + qDebug() << "Invalid socket descriptor!"; + clientSocket->deleteLater(); // Удаляем сокет, если дескриптор недействителен + return; + } + + mSocketDescriptors.insert(socketDescriptor, clientSocket); // Сохраняем сокет в контейнере + + qDebug() << "New connection, socket descriptor:" << socketDescriptor; + + connect(clientSocket, &QTcpSocket::readyRead, this, &MyTcpServer::slotServerRead); + connect(clientSocket, &QTcpSocket::disconnected, this, &MyTcpServer::slotClientDisconnected); + } +} + +void MyTcpServer::slotServerRead() { + QTcpSocket *clientSocket = qobject_cast(sender()); + if (!clientSocket) return; + + QByteArray data = clientSocket->readAll(); + qDebug() << "Received data:" << data; + + // Обрабатываем данные сразу, без накопления + QByteArray response = parsing(QString(data).trimmed(), clientSocket->socketDescriptor()); + clientSocket->write(response); +} + +void MyTcpServer::slotClientDisconnected() +{ + QTcpSocket *clientSocket = qobject_cast(sender()); + if (!clientSocket) { + return; + } + + // Получаем дескриптор сокета из контейнера + int socketDescriptor = -1; + for (auto it = mSocketDescriptors.begin(); it != mSocketDescriptors.end(); ++it) { + if (it.value() == clientSocket) { + socketDescriptor = it.key(); + break; + } + } + + if (socketDescriptor != -1) { + mSocketDescriptors.remove(socketDescriptor); // Удаляем сокет из контейнера + qDebug() << "Client disconnected, socket descriptor:" << socketDescriptor; + } else { + qDebug() << "Client disconnected, but socket descriptor not found!"; + } + + clientSocket->deleteLater(); // Удаляем сокет +} diff --git a/server/mytcpserver.h b/server/mytcpserver.h new file mode 100644 index 0000000..fcce555 --- /dev/null +++ b/server/mytcpserver.h @@ -0,0 +1,41 @@ +#ifndef MYTCPSERVER_H +#define MYTCPSERVER_H +#include +#include +#include +#include +#include +#include +#include + +class MyTcpServer : public QObject +{ + Q_OBJECT +public: + explicit MyTcpServer(QObject *parent = nullptr); /**< Конструктор */ + ~MyTcpServer(); /**< Деструктор */ + +public slots: + /** + * Слот для обработки нового подключения. + */ + void slotNewConnection(); + + /** + * Слот для обработки отключения клиента. + */ + void slotClientDisconnected(); + + /** + * Слот для чтения данных от клиента. + */ + void slotServerRead(); + +private: + QTcpServer * mTcpServer; /**< Сервер для обработки TCP-соединений */ + QTcpSocket * mTcpSocket; /**< Сокет для взаимодействия с клиентом */ + int server_status; /**< Статус сервера */ + QMap mSocketDescriptors; /**< Хранение дескрипторов сокетов */ +}; + +#endif // MYTCPSERVER_H