├── resources
├── images
│ ├── ad.png
│ ├── book.png
│ ├── main.png
│ ├── dollar.png
│ ├── laptop.png
│ ├── logout.png
│ ├── sklad.png
│ ├── vendor.png
│ ├── worker.png
│ ├── ad-white.png
│ ├── bitmap1.bmp
│ ├── catalog.png
│ ├── closeEye.png
│ ├── downArrow.png
│ ├── history.png
│ ├── openEye.png
│ ├── settings.png
│ ├── t-white.png
│ ├── tp-white.png
│ ├── upArrow.png
│ ├── book-white.png
│ ├── deal-white.png
│ ├── sklad-white.png
│ ├── client-white.png
│ ├── history-white.png
│ ├── vendor-white.png
│ └── worker-white.png
├── resources.rc
├── main.icns
├── main.ico
├── Comfortaa.ttf
└── resources.qrc
├── .gitattributes
├── .clang-format
├── Images
├── login_image.jpg
└── supplier_image.jpg
├── .gitmodules
├── .github
├── dependabot.yml
└── workflows
│ ├── macos-build.yml
│ ├── windows-build.yml
│ └── linux-build.yml
├── packages
└── com.pinguins.crm
│ └── meta
│ └── package.xml
├── CRM
├── leader
│ └── leaderWidget.h
├── main.cpp
├── db_settings
│ ├── db_settings.h
│ ├── db_settings.cpp
│ └── db_settings.ui
├── seller
│ └── sellerWidget.h
├── marketer
│ └── marketerWidget.h
├── manager
│ └── managerWidget.h
├── login
│ ├── login.h
│ ├── login.cpp
│ └── login.ui
├── mainwindow.ui
├── database-types
│ ├── seller.h
│ ├── leader.h
│ ├── marketer.h
│ ├── provider.h
│ ├── stock_manager.h
│ ├── views.h
│ ├── comment.h
│ ├── advertisement.h
│ ├── stock.h
│ ├── employee.h
│ ├── client.h
│ ├── laptop.h
│ └── deal.h
├── mainwindow.h
├── db_pool.h
├── mainwindow.cpp
├── interface
│ └── interfaceWidget.h
├── editUI
│ ├── editProvider.ui
│ ├── editAd.ui
│ ├── editStock.ui
│ ├── editEmployee.ui
│ ├── editDeal.ui
│ └── editClient.ui
└── db_methods.h
├── config
└── config.xml
├── README.md
├── Диаграмма.drawio
├── CMakeLists.txt
└── .gitignore
/resources/images/ad.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/resources/resources.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON "main.ico"
--------------------------------------------------------------------------------
/resources/main.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/main.icns
--------------------------------------------------------------------------------
/resources/main.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/main.ico
--------------------------------------------------------------------------------
/.clang-format:
--------------------------------------------------------------------------------
1 | BasedOnStyle: google
2 | DerivePointerAlignment: false
3 | IndentWidth: 4
4 |
--------------------------------------------------------------------------------
/Images/login_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/Images/login_image.jpg
--------------------------------------------------------------------------------
/Images/supplier_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/Images/supplier_image.jpg
--------------------------------------------------------------------------------
/resources/Comfortaa.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/Comfortaa.ttf
--------------------------------------------------------------------------------
/resources/images/book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/book.png
--------------------------------------------------------------------------------
/resources/images/main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/main.png
--------------------------------------------------------------------------------
/resources/images/dollar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/dollar.png
--------------------------------------------------------------------------------
/resources/images/laptop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/laptop.png
--------------------------------------------------------------------------------
/resources/images/logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/logout.png
--------------------------------------------------------------------------------
/resources/images/sklad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/sklad.png
--------------------------------------------------------------------------------
/resources/images/vendor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/vendor.png
--------------------------------------------------------------------------------
/resources/images/worker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/worker.png
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "libs/soci"]
2 | path = libs/soci
3 | url = https://github.com/SOCI/soci.git
4 |
--------------------------------------------------------------------------------
/resources/images/ad-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/ad-white.png
--------------------------------------------------------------------------------
/resources/images/bitmap1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/bitmap1.bmp
--------------------------------------------------------------------------------
/resources/images/catalog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/catalog.png
--------------------------------------------------------------------------------
/resources/images/closeEye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/closeEye.png
--------------------------------------------------------------------------------
/resources/images/downArrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/downArrow.png
--------------------------------------------------------------------------------
/resources/images/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/history.png
--------------------------------------------------------------------------------
/resources/images/openEye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/openEye.png
--------------------------------------------------------------------------------
/resources/images/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/settings.png
--------------------------------------------------------------------------------
/resources/images/t-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/t-white.png
--------------------------------------------------------------------------------
/resources/images/tp-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/tp-white.png
--------------------------------------------------------------------------------
/resources/images/upArrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/upArrow.png
--------------------------------------------------------------------------------
/resources/images/book-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/book-white.png
--------------------------------------------------------------------------------
/resources/images/deal-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/deal-white.png
--------------------------------------------------------------------------------
/resources/images/sklad-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/sklad-white.png
--------------------------------------------------------------------------------
/resources/images/client-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/client-white.png
--------------------------------------------------------------------------------
/resources/images/history-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/history-white.png
--------------------------------------------------------------------------------
/resources/images/vendor-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/vendor-white.png
--------------------------------------------------------------------------------
/resources/images/worker-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Plnguins/CRM/HEAD/resources/images/worker-white.png
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Dependabot file for actions
2 | # Copyright (C) 2022 Plnguins
3 |
4 | # This program is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU General Public License as published by
6 | # the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 |
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU General Public License for more details.
13 |
14 | # You should have received a copy of the GNU General Public License
15 | # along with this program. If not, see .
16 |
17 | version: 2
18 | updates:
19 | - package-ecosystem: github-actions
20 | directory: "/"
21 | schedule:
22 | interval: daily
23 | target-branch: master
24 | assignees:
25 | - "VadVergasov"
26 | - package-ecosystem: gitsubmodule
27 | directory: "/"
28 | schedule:
29 | interval: daily
30 | target-branch: master
31 | assignees:
32 | - "VadVergasov"
33 |
--------------------------------------------------------------------------------
/packages/com.pinguins.crm/meta/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | CRM
19 | Установка самой CRM
20 |
21 | 1.0.0
22 |
23 |
24 |
25 | true
26 |
27 |
--------------------------------------------------------------------------------
/CRM/leader/leaderWidget.h:
--------------------------------------------------------------------------------
1 | // Leader window header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include "../interface/interfaceWidget.h"
19 |
20 | class leaderWidget : public interfaceWidget {
21 | Q_OBJECT
22 |
23 | public:
24 | explicit leaderWidget(QMainWindow* parent = nullptr, std::string name = "",
25 | std::string surname = "")
26 | : interfaceWidget(parent, name, surname) {}
27 | ~leaderWidget() = default;
28 | };
29 |
--------------------------------------------------------------------------------
/CRM/main.cpp:
--------------------------------------------------------------------------------
1 | // Main source code for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #include
17 | #include
18 |
19 | #include "mainwindow.h"
20 |
21 | int main(int argc, char* argv[]) {
22 | QApplication a(argc, argv);
23 | QTranslator translator;
24 | if (translator.load(QLocale::system(), u"crm"_qs, u"_"_qs,
25 | u":/i18n"_qs)) { // Если удалось загрузить перевод -
26 | // устанавливаем его
27 | a.installTranslator(&translator);
28 | }
29 | MainWindow w;
30 | w.show();
31 | return a.exec();
32 | }
33 |
--------------------------------------------------------------------------------
/config/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | CRM
19 | 1.0.0
20 | CRM
21 | Pinguins
22 | https://github.com/Plnguins/CRM
23 | @HomeDir@/CRM
24 | ../resources/main
25 | ../resources/images/main
26 | modern
27 | uninstall
28 |
29 |
--------------------------------------------------------------------------------
/CRM/db_settings/db_settings.h:
--------------------------------------------------------------------------------
1 | // Login window header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include "../mainwindow.h"
19 | #include "ui_db_settings.h"
20 |
21 | namespace Ui {
22 | class db_settingsUi;
23 | }
24 |
25 | class db_settings : public QWidget {
26 | Q_OBJECT
27 |
28 | public:
29 | explicit db_settings(QMainWindow* parent = nullptr);
30 | ~db_settings() { delete ui; }
31 |
32 | private slots:
33 | void on_ApplyButton_clicked();
34 | void on_ShowPassword_clicked(bool checked);
35 |
36 | private:
37 | Ui::db_settingsUi* ui;
38 | MainWindow* parent;
39 | };
40 |
--------------------------------------------------------------------------------
/CRM/seller/sellerWidget.h:
--------------------------------------------------------------------------------
1 | // Seller window header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include "../interface/interfaceWidget.h"
19 |
20 | class sellerWidget : public interfaceWidget {
21 | Q_OBJECT
22 |
23 | public:
24 | explicit sellerWidget(QMainWindow* parent = nullptr, std::string name = "",
25 | std::string surname = "")
26 | : interfaceWidget(parent, name, surname) {
27 | // Скрываем ненужные элементы интерфейса
28 | ui->Ads->hide();
29 | ui->Employee->hide();
30 | ui->Provider->hide();
31 | }
32 | ~sellerWidget() = default;
33 | };
34 |
--------------------------------------------------------------------------------
/CRM/marketer/marketerWidget.h:
--------------------------------------------------------------------------------
1 | // Marketer window header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include "../interface/interfaceWidget.h"
19 |
20 | class marketerWidget : public interfaceWidget {
21 | Q_OBJECT
22 |
23 | public:
24 | explicit marketerWidget(QMainWindow* parent = nullptr,
25 | std::string name = "", std::string surname = "")
26 | : interfaceWidget(parent, name, surname) {
27 | // Скрываем ненужные элементы интерфейса
28 | ui->Client->hide();
29 | ui->Employee->hide();
30 | ui->Provider->hide();
31 | ui->Deal->hide();
32 | ui->Stock->hide();
33 | ui->Laptop->hide();
34 | }
35 | ~marketerWidget() = default;
36 | };
37 |
--------------------------------------------------------------------------------
/CRM/manager/managerWidget.h:
--------------------------------------------------------------------------------
1 | // Manager window header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include "../interface/interfaceWidget.h"
19 |
20 | namespace Ui {
21 | class managerUi;
22 | }
23 |
24 | class managerWidget : public interfaceWidget {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit managerWidget(QMainWindow* parent = nullptr, std::string name = "",
29 | std::string surname = "")
30 | : interfaceWidget(parent, name, surname) {
31 | // Скрываем ненужные элементы интерфейса
32 | ui->Client->hide();
33 | ui->Ads->hide();
34 | ui->Employee->hide();
35 | }
36 | ~managerWidget() = default;
37 |
38 | // void on_Provider_clicked();
39 | // void on_Deal_clicked();
40 | // void on_Stock_clicked();
41 | };
42 |
--------------------------------------------------------------------------------
/CRM/login/login.h:
--------------------------------------------------------------------------------
1 | // Login window header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include
19 | #include
20 | #include
21 |
22 | #include "../db_methods.h"
23 | #include "../mainwindow.h"
24 | #include "ui_login.h"
25 |
26 | enum class Role { Leader, Manager, Marketer, Seller, Unknown };
27 |
28 | namespace Ui {
29 | class loginUi;
30 | }
31 |
32 | class login : public QWidget {
33 | Q_OBJECT
34 |
35 | public:
36 | explicit login(QMainWindow* parent = nullptr);
37 | ~login() { delete ui; }
38 |
39 | private slots:
40 | void on_LoginButton_clicked();
41 | void on_ShowPassword_clicked(bool checked);
42 |
43 | void on_Settings_clicked() { parent->setSettingsInterface(); }
44 |
45 | private:
46 | MainWindow* parent;
47 | Ui::loginUi* ui;
48 | };
49 |
--------------------------------------------------------------------------------
/CRM/mainwindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | MainWindowUi
19 |
20 |
21 |
22 | 0
23 | 0
24 | 299
25 | 225
26 |
27 |
28 |
29 |
30 | 0
31 | 0
32 |
33 |
34 |
35 |
36 | 0
37 | 0
38 |
39 |
40 |
41 |
42 | 16777215
43 | 16777215
44 |
45 |
46 |
47 |
48 |
49 |
50 | border-radius:20px;
51 | background-color: rgb(255, 255, 255);
52 |
53 |
54 |
55 | background-color:rgb(255,255,255);
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/CRM/database-types/seller.h:
--------------------------------------------------------------------------------
1 | // Seller table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct seller {
22 | int id; // ID продавца
23 | int employee; // ID сотрудника
24 |
25 | seller() = default;
26 |
27 | seller(int id, int employee) : id(id), employee(employee) {}
28 |
29 | seller(const seller &other) : id(other.id), employee(other.employee) {}
30 |
31 | seller &operator=(const seller &rhs) {
32 | if (this != std::addressof(rhs)) {
33 | id = rhs.id;
34 | employee = rhs.employee;
35 | }
36 | return *this;
37 | }
38 | };
39 |
40 | namespace soci {
41 | template <>
42 | struct type_conversion {
43 | using base_type = values;
44 |
45 | static void from_base(values const &v, indicator ind, seller &l) {
46 | /*
47 | * Конвертация из данных в структуру
48 | */
49 | if (ind == i_null) {
50 | return;
51 | }
52 | try {
53 | l.id = v.get("id");
54 | l.employee = v.get("employee");
55 | } catch (const std::exception &l) {
56 | // Logging
57 | }
58 | }
59 |
60 | static void to_base(seller const &l, values &v, indicator &ind) {
61 | /*
62 | * Конвертация из структуры в данные
63 | */
64 | try {
65 | v.set("id", l.id);
66 | v.set("employee", l.employee);
67 |
68 | ind = i_ok;
69 | return;
70 | } catch (const std::exception &l) {
71 | // Logging
72 | }
73 | ind = i_null;
74 | }
75 | };
76 | } // namespace soci
77 |
--------------------------------------------------------------------------------
/CRM/database-types/leader.h:
--------------------------------------------------------------------------------
1 | // Leader table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct leader {
22 | int id; // ID руководителя
23 | int employee; // ID сотрудника
24 |
25 | leader() = default;
26 |
27 | leader(int id, int employee) : id(id), employee(employee) {}
28 |
29 | leader(const leader& other) : id(other.id), employee(other.employee) {}
30 |
31 | leader& operator=(const leader& rhs) {
32 | if (this != std::addressof(rhs)) {
33 | id = rhs.id;
34 | employee = rhs.employee;
35 | }
36 | return *this;
37 | }
38 | };
39 |
40 | namespace soci {
41 | template <>
42 | struct type_conversion {
43 | using base_type = values;
44 |
45 | static void from_base(values const& v, indicator ind, leader& l) {
46 | /*
47 | * Конвертация из данных в структуру
48 | */
49 | if (ind == i_null) {
50 | return;
51 | }
52 | try {
53 | l.id = v.get("id");
54 | l.employee = v.get("employee");
55 | } catch (const std::exception& l) {
56 | // Logging
57 | }
58 | }
59 |
60 | static void to_base(leader const& l, values& v, indicator& ind) {
61 | /*
62 | * Конвертация из структуры в данные
63 | */
64 | try {
65 | v.set("id", l.id);
66 | v.set("employee", l.employee);
67 |
68 | ind = i_ok;
69 | return;
70 | } catch (const std::exception& l) {
71 | // Logging
72 | }
73 | ind = i_null;
74 | }
75 | };
76 | } // namespace soci
77 |
--------------------------------------------------------------------------------
/CRM/database-types/marketer.h:
--------------------------------------------------------------------------------
1 | // Marketer table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct marketer {
22 | int id; // ID маркетолога
23 | int employee; // ID сотрудника
24 |
25 | marketer() = default;
26 |
27 | marketer(int id, int employee) : id(id), employee(employee) {}
28 |
29 | marketer(const marketer& other) : id(other.id), employee(other.employee) {}
30 |
31 | marketer& operator=(const marketer& rhs) {
32 | if (this != std::addressof(rhs)) {
33 | id = rhs.id;
34 | employee = rhs.employee;
35 | }
36 | return *this;
37 | }
38 | };
39 |
40 | namespace soci {
41 | template <>
42 | struct type_conversion {
43 | using base_type = values;
44 |
45 | static void from_base(values const& v, indicator ind, marketer& l) {
46 | /*
47 | * Конвертация из данных в структуру
48 | */
49 | if (ind == i_null) {
50 | return;
51 | }
52 | try {
53 | l.id = v.get("id");
54 | l.employee = v.get("employee");
55 | } catch (const std::exception& l) {
56 | // Logging
57 | }
58 | }
59 |
60 | static void to_base(marketer const& l, values& v, indicator& ind) {
61 | /*
62 | * Конвертация из структуры в данные
63 | */
64 | try {
65 | v.set("id", l.id);
66 | v.set("employee", l.employee);
67 |
68 | ind = i_ok;
69 | return;
70 | } catch (const std::exception& l) {
71 | // Logging
72 | }
73 | ind = i_null;
74 | }
75 | };
76 | } // namespace soci
77 |
--------------------------------------------------------------------------------
/CRM/database-types/provider.h:
--------------------------------------------------------------------------------
1 | // Provider table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct provider {
22 | int id; // ID поставщика
23 | std::string name; // Название поставщика
24 |
25 | provider() = default;
26 |
27 | provider(int id, std::string name) : id(id), name(name) {}
28 |
29 | provider(const provider& other)
30 | : id(other.id),
31 | name(other.name) {
32 | }
33 |
34 | provider& operator=(const provider& rhs) {
35 | if (this != std::addressof(rhs)) {
36 | id = rhs.id;
37 | name = rhs.name;
38 | }
39 | return *this;
40 | }
41 | };
42 |
43 | namespace soci {
44 | template <>
45 | struct type_conversion {
46 | using base_type = values;
47 |
48 | static void from_base(values const& v, indicator ind, provider& l) {
49 | /*
50 | * Конвертация из данных в структуру
51 | */
52 | if (ind == i_null) {
53 | return;
54 | }
55 | try {
56 | l.id = v.get("id");
57 | l.name = v.get("name");
58 | } catch (const std::exception& l) {
59 | // Logging
60 | }
61 | }
62 |
63 | static void to_base(provider const& l, values& v, indicator& ind) {
64 | /*
65 | * Конвертация из структуры в данные
66 | */
67 | try {
68 | v.set("id", l.id);
69 | v.set("name", l.name);
70 |
71 | ind = i_ok;
72 | return;
73 | } catch (const std::exception& l) {
74 | // Logging
75 | }
76 | ind = i_null;
77 | }
78 | };
79 | } // namespace soci
80 |
--------------------------------------------------------------------------------
/CRM/database-types/stock_manager.h:
--------------------------------------------------------------------------------
1 | // Stock manager table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct stock_manager {
22 | int id; // ID менеджера по поставкам
23 | int employee; // ID сотрудника
24 |
25 | stock_manager() = default;
26 |
27 | stock_manager(int id, int employee) : id(id), employee(employee) {}
28 |
29 | stock_manager(const stock_manager& other)
30 | : id(other.id), employee(other.employee) {}
31 |
32 | stock_manager& operator=(const stock_manager& rhs) {
33 | if (this != std::addressof(rhs)) {
34 | id = rhs.id;
35 | employee = rhs.employee;
36 | }
37 | return *this;
38 | }
39 | };
40 |
41 | namespace soci {
42 | template <>
43 | struct type_conversion {
44 | using base_type = values;
45 |
46 | static void from_base(values const& v, indicator ind, stock_manager& l) {
47 | /*
48 | * Конвертация из данных в структуру
49 | */
50 | if (ind == i_null) {
51 | return;
52 | }
53 | try {
54 | l.id = v.get("id");
55 | l.employee = v.get("employee");
56 | } catch (const std::exception& l) {
57 | // Logging
58 | }
59 | }
60 |
61 | static void to_base(stock_manager const& l, values& v, indicator& ind) {
62 | /*
63 | * Конвертация из структуры в данные
64 | */
65 | try {
66 | v.set("id", l.id);
67 | v.set("employee", l.employee);
68 |
69 | ind = i_ok;
70 | return;
71 | } catch (const std::exception& l) {
72 | // Logging
73 | }
74 | ind = i_null;
75 | }
76 | };
77 | } // namespace soci
78 |
--------------------------------------------------------------------------------
/CRM/mainwindow.h:
--------------------------------------------------------------------------------
1 | // MainWindow window header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include
19 | #include
20 | #include
21 |
22 | #include "db_pool.h"
23 |
24 | namespace Ui {
25 | class MainWindowUi;
26 | }
27 |
28 | class MainWindow : public QMainWindow {
29 | Q_OBJECT
30 |
31 | public:
32 | MainWindow(QWidget* parent = nullptr);
33 | ~MainWindow() { delete ui; }
34 | void setLeaderInterface(std::string, std::string);
35 | void setLoginInterface();
36 | void setManagerInterface(std::string, std::string);
37 | void setMarketerInterface(std::string, std::string);
38 | void setSellerInterface(std::string, std::string);
39 | void setSettingsInterface();
40 |
41 | const std::string& getDataBaseLogin() { return database_login; }
42 | const unsigned short int& getDataBasePort() { return database_port; }
43 | const std::string& getDataBasePassword() { return database_password; }
44 | const std::string& getDataBaseName() { return database_name; }
45 | const std::string& getDataBaseIP() { return database_ip; }
46 |
47 | db_pool database;
48 | bool connectDatabase();
49 | void setDatabase(const std::string& host, const unsigned short int& port,
50 | const std::string& user, const std::string& password,
51 | const std::string& database);
52 |
53 | private:
54 | // Параметры подключения к СУБД
55 | std::string database_ip = "localhost";
56 | unsigned short int database_port = 5432;
57 | std::string database_login = "practice";
58 | std::string database_password = "root";
59 | std::string database_name = "Practice";
60 |
61 | // Указатель на интерфейс
62 | Ui::MainWindowUi* ui;
63 |
64 | std::string get_connection_string();
65 | };
66 |
--------------------------------------------------------------------------------
/CRM/db_settings/db_settings.cpp:
--------------------------------------------------------------------------------
1 | // vLogin window header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include "db_settings.h"
19 |
20 | db_settings::db_settings(QMainWindow* parent)
21 | : parent(dynamic_cast(parent)), ui(new Ui::db_settingsUi) {
22 | ui->setupUi(this);
23 |
24 | ui->DataBaseIPEnter->setText(this->parent->getDataBaseIP().c_str());
25 | ui->DataBasePortEnter->setText(
26 | QString::number(this->parent->getDataBasePort()));
27 | ui->DataBaseLoginEnter->setText(this->parent->getDataBaseLogin().c_str());
28 | ui->DataBasePasswordEnter->setText(
29 | this->parent->getDataBasePassword().c_str());
30 | ui->DataBaseNameEnter->setText(this->parent->getDataBaseName().c_str());
31 | }
32 |
33 | void db_settings::on_ApplyButton_clicked() {
34 | std::string database_ip = ui->DataBaseIPEnter->text().toStdString();
35 | unsigned short int database_port = ui->DataBasePortEnter->text().toUShort();
36 | std::string database_login = ui->DataBaseLoginEnter->text().toStdString();
37 | std::string database_password =
38 | ui->DataBasePasswordEnter->text().toStdString();
39 | std::string database_name = ui->DataBaseNameEnter->text().toStdString();
40 |
41 | parent->setDatabase(database_ip, database_port, database_login,
42 | database_password, database_name);
43 |
44 | if (!this->parent->connectDatabase()) {
45 | QMessageBox::critical(this, "Ошибка", "Невозможно подключиться к БД");
46 | } else {
47 | parent->setLoginInterface();
48 | }
49 | }
50 |
51 | void db_settings::on_ShowPassword_clicked(bool checked) {
52 | if (checked) {
53 | ui->DataBasePasswordEnter->setEchoMode(QLineEdit::Normal);
54 | } else {
55 | ui->DataBasePasswordEnter->setEchoMode(QLineEdit::Password);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | CRM система [](https://github.com/Plnguins/CRM/actions/workflows/linux-build.yml) [](https://github.com/Plnguins/CRM/actions/workflows/macos-build.yml) [](https://github.com/Plnguins/CRM/actions/workflows/windows-build.yml)
2 | ======
3 |
4 | Проект для учебной практики в БГУИРе.
5 |
6 | ## Введение ##
7 | CRM (Costumer Relationship Management) - это система, помогающая выстраивать эффективные отношения между бизнесом и его клиентами. Успешное взаимодействие достигается за счет множества факторов: от учета заявок и сделок до автоматизации бизнес-процессов.
8 | CRM система, представленная в качестве проекта для учебной практики, специализируется на продаже ноутбуков.
9 |
10 | ## Структура приложения ##
11 | | Раздел | Краткое описание |
12 | | --- | --- |
13 | | Поставщики | Организация работы с поставщиками |
14 | | Сделки | Контроль сделок: учет времени, статуса заказа |
15 | | Склад | Наличие техники на складе, ее цена |
16 | | Реклама | Управление рекламой и анализ источников |
17 | | Работники | Организация работы с сотрудниками компании |
18 |
19 | 
20 |
21 | 
22 |
23 |
24 | ## Основной функционал ##
25 | * Удобное взаимодействие с поставщиками.
26 | * Отслеживание статуса сделки.
27 | * Прогноз даты доставки заказа.
28 | * Контроль наличия и количества товаров на складе.
29 | * Отслеживание эффективности различных источников рекламы.
30 | * Управление сотрудниками компании, их данными.
31 | * Работа с финансами.
32 |
33 | ## Используемые технологии ##
34 | * C++
35 | * Qt6
36 | * PostgreSQL
37 | * Boost
38 | * SOCI
39 | * Git
40 |
41 | ## To Do ##
42 | * Использование микросервисной архитектуры для развития гибкости системы.
43 | * Внедрение API для упрощения поддержки приложения. Получится схема работы такой:
44 | ```mermaid
45 | sequenceDiagram
46 | App->>+Server: api/get-providers
47 | Server->>+Database: SELECT * FROM provider
48 | Database-->>-Server: 10 rows
49 | Server-->>-App: JSON response
50 | ```
51 | * Покрытие некоторых участков кода тестами.
52 | * Создание более подробной документации.
53 | * Адаптация приложения под другие ОС.
54 | * Оптимизация работы системы.
55 | * Расширение сферы применения CRM системы.
56 | * Внедрение алгоритмов ML для улучшения рекомендательной системы.
57 |
58 |
--------------------------------------------------------------------------------
/CRM/database-types/views.h:
--------------------------------------------------------------------------------
1 | // View table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct view {
22 | int id; // ID просмотра
23 | int source; // ID источника просмотра
24 | int deal; // ID сделки
25 |
26 | view() = default;
27 |
28 | view(int id, int source, int deal) : id(id), source(source), deal(deal) {}
29 |
30 | view(const view& other)
31 | : id(other.id), source(other.source), deal(other.deal) {}
32 |
33 | view& operator=(const view& rhs) {
34 | if (this != std::addressof(rhs)) {
35 | id = rhs.id;
36 | source = rhs.source;
37 | deal = rhs.deal;
38 | }
39 | return *this;
40 | }
41 | };
42 |
43 | namespace soci {
44 | template <>
45 | struct type_conversion {
46 | using base_type = values;
47 |
48 | static void from_base(values const& v, indicator ind, view& l) {
49 | /*
50 | * Конвертация из данных в структуру
51 | */
52 | if (ind == i_null) {
53 | return;
54 | }
55 | try {
56 | l.id = v.get("id");
57 | l.source = v.get("source");
58 | l.deal = v.get("deal");
59 | } catch (const std::exception& l) {
60 | // Logging
61 | }
62 | }
63 |
64 | static void to_base(view const& l, values& v, indicator& ind) {
65 | /*
66 | * Конвертация из структуры в данные
67 | */
68 | try {
69 | v.set("id", l.id);
70 | v.set("source", l.source);
71 | v.set("deal", l.deal);
72 |
73 | ind = i_ok;
74 | return;
75 | } catch (const std::exception& l) {
76 | // Logging
77 | }
78 | ind = i_null;
79 | }
80 | };
81 | } // namespace soci
82 |
--------------------------------------------------------------------------------
/resources/resources.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | images/ad.png
4 |
5 |
6 | images/ad-white.png
7 |
8 |
9 | images/bitmap1.bmp
10 |
11 |
12 | images/book-white.png
13 |
14 |
15 | images/book.png
16 |
17 |
18 | images/client-white.png
19 |
20 |
21 | images/closeEye.png
22 |
23 |
24 | images/deal-white.png
25 |
26 |
27 | images/dollar.png
28 |
29 |
30 | images/history-white.png
31 |
32 |
33 | images/history.png
34 |
35 |
36 | images/logout.png
37 |
38 |
39 | images/main.png
40 |
41 |
42 | images/openEye.png
43 |
44 |
45 | images/sklad-white.png
46 |
47 |
48 | images/sklad.png
49 |
50 |
51 | images/t-white.png
52 |
53 |
54 | images/tp-white.png
55 |
56 |
57 | images/vendor-white.png
58 |
59 |
60 | images/vendor.png
61 |
62 |
63 | images/worker-white.png
64 |
65 |
66 | images/worker.png
67 |
68 |
69 | Comfortaa.ttf
70 |
71 |
72 | images/settings.png
73 |
74 |
75 | images/catalog.png
76 |
77 |
78 | images/downArrow.png
79 |
80 |
81 | images/laptop.png
82 |
83 |
84 | images/upArrow.png
85 |
86 |
87 |
--------------------------------------------------------------------------------
/CRM/db_pool.h:
--------------------------------------------------------------------------------
1 | // Database pool for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 |
24 | #include // Умные указатели
25 | #include
26 |
27 | class db_pool {
28 | boost::shared_ptr pool_;
29 | std::size_t pool_size_;
30 |
31 | public:
32 | db_pool() : pool_(nullptr), pool_size_(0) {}
33 | ~db_pool() { close(); }
34 |
35 | boost::weak_ptr get_pool() { return pool_; }
36 |
37 | bool connect(const std::string& conn_str, std::size_t pool_size = 5) {
38 | if (pool_ != nullptr) {
39 | close();
40 | }
41 | pool_size_ = pool_size;
42 | boost::optional is_connected;
43 | pool_ = boost::shared_ptr(
44 | new soci::connection_pool(pool_size_));
45 | if (!pool_) {
46 | return false;
47 | }
48 | try {
49 | for (std::size_t _i = 0; _i < pool_size_; _i++) {
50 | soci::session& sql = pool_->at(_i);
51 | sql.open(conn_str);
52 | sql << "SELECT 1;", soci::into(is_connected);
53 | if (!is_connected) {
54 | break;
55 | } else if (_i + 1 < pool_size_) {
56 | is_connected.get() = 0;
57 | }
58 | }
59 | } catch (std::exception const& e) {
60 | // Logging
61 | }
62 | if (!is_connected) {
63 | close();
64 | }
65 | return (pool_ != nullptr);
66 | }
67 |
68 | void close() {
69 | if (pool_ != nullptr) {
70 | try {
71 | for (std::size_t _i = 0; _i < pool_size_; _i++) {
72 | soci::session& sql = pool_->at(_i);
73 | sql.close();
74 | }
75 | pool_.reset();
76 | } catch (std::exception const& e) {
77 | // Logging
78 | }
79 | pool_size_ = 0;
80 | }
81 | }
82 | };
83 |
--------------------------------------------------------------------------------
/CRM/database-types/comment.h:
--------------------------------------------------------------------------------
1 | // Comment table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct comment {
22 | int id; // ID комментария
23 | int deal; // ID сделки комментария
24 | boost::gregorian::date date; // Дата комментария
25 | std::string content; // Содержимое комментария
26 |
27 | comment() = default;
28 |
29 | comment(int id, int deal, boost::gregorian::date date, std::string content)
30 | : id(id), deal(deal), date(date), content(content) {}
31 |
32 | comment(const comment& other)
33 | : id(other.id),
34 | deal(other.deal),
35 | date(other.date),
36 | content(other.content) {}
37 |
38 | comment& operator=(const comment& rhs) {
39 | if (this != std::addressof(rhs)) {
40 | id = rhs.id;
41 | deal = rhs.deal;
42 | date = rhs.date;
43 | content = rhs.content;
44 | }
45 | return *this;
46 | }
47 | };
48 |
49 | namespace soci {
50 | template <>
51 | struct type_conversion {
52 | using base_type = values;
53 |
54 | static void from_base(values const& v, indicator ind, comment& c) {
55 | /*
56 | * Конвертация из данных в структуру
57 | */
58 | if (ind == i_null) {
59 | return;
60 | }
61 | try {
62 | c.id = v.get("id", 0);
63 | c.deal = v.get("deal", 0);
64 | c.date =
65 | v.get("date", boost::gregorian::date());
66 | c.content = v.get("content", "");
67 | } catch (soci_error const& e) {
68 | // Logging
69 | }
70 | }
71 |
72 | static void to_base(const comment& p, values& v, indicator& ind) {
73 | /*
74 | * Конвертация из структуры в данные
75 | */
76 | try {
77 | v.set("id", p.id);
78 | v.set("deal", p.deal);
79 | v.set("date", p.date);
80 | v.set("content", p.content);
81 |
82 | ind = i_ok;
83 | return;
84 | } catch (std::exception const& e) {
85 | // Logging
86 | }
87 | ind = i_null;
88 | }
89 | };
90 | } // namespace soci
91 |
--------------------------------------------------------------------------------
/CRM/database-types/advertisement.h:
--------------------------------------------------------------------------------
1 | // Advertisement table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | // структура таблицы advertisement
22 | struct advertisement {
23 | int id; // ID рекламы
24 | std::string source; // Источник рекламы
25 | int budget; // Бюджет рекламы
26 | std::string comments; // Комментарий к рекламе
27 |
28 | advertisement() = default;
29 |
30 | advertisement(int id, std::string source, int budget, std::string comments)
31 | : id(id), source(source), budget(budget), comments(comments) {}
32 |
33 | advertisement(const advertisement& other)
34 | : id(other.id),
35 | source(other.source),
36 | budget(other.budget),
37 | comments(other.comments) {}
38 |
39 | advertisement& operator=(const advertisement& rhs) {
40 | if (this != std::addressof(rhs)) {
41 | id = rhs.id;
42 | source = rhs.source;
43 | budget = rhs.budget;
44 | comments = rhs.comments;
45 | }
46 | return *this;
47 | }
48 | };
49 |
50 | namespace soci {
51 |
52 | template <>
53 | struct type_conversion {
54 | using base_type = values;
55 |
56 | static void from_base(values const& v, indicator ind, advertisement& ad) {
57 | /*
58 | * Конвертация из данных в структуру
59 | */
60 | if (ind == i_null) {
61 | return;
62 | }
63 | try {
64 | ad.id = v.get("id", 0);
65 | ad.source = v.get("source", "");
66 | ad.budget = v.get("budget", 0);
67 | ad.comments = v.get("comments", "");
68 | } catch (std::exception const& e) {
69 | // Logging
70 | }
71 | }
72 |
73 | static void to_base(const advertisement& p, values& v, indicator& ind) {
74 | /*
75 | * Конвертация из структуры в данные
76 | */
77 | try {
78 | v.set("id", p.id);
79 | v.set("source", p.source);
80 | v.set("budget", p.budget);
81 | v.set("comments", p.comments);
82 |
83 | ind = i_ok;
84 | return;
85 | } catch (std::exception const& e) {
86 | // Logging
87 | }
88 | ind = i_null;
89 | }
90 | };
91 |
92 | } // namespace soci
93 |
--------------------------------------------------------------------------------
/CRM/database-types/stock.h:
--------------------------------------------------------------------------------
1 | // Stock table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct stock {
22 | int id; // ID поставки
23 | int laptop; // ID ноутбука
24 | int price; // Цена поставки
25 | int count; // Количество ноутбуков
26 | int available; // Количество доступных ноутбуков
27 | int source; // ID поставщика
28 |
29 | stock() = default;
30 |
31 | stock(int id, int laptop, int price, int count, int available, int source)
32 | : id(id),
33 | laptop(laptop),
34 | price(price),
35 | count(count),
36 | available(available),
37 | source(source) {}
38 |
39 | stock(const stock& other)
40 | : id(other.id),
41 | laptop(other.laptop),
42 | price(other.price),
43 | count(other.count),
44 | available(other.available),
45 | source(other.source) {}
46 |
47 | stock& operator=(const stock& rhs) {
48 | if (this != &rhs) {
49 | id = rhs.id;
50 | laptop = rhs.laptop;
51 | price = rhs.price;
52 | count = rhs.count;
53 | available = rhs.available;
54 | source = rhs.source;
55 | }
56 | return *this;
57 | }
58 | };
59 |
60 | namespace soci {
61 | template <>
62 | struct type_conversion {
63 | using base_type = values;
64 |
65 | static void from_base(values const& v, indicator ind, stock& d) {
66 | /*
67 | * Конвертация из данных в структуру
68 | */
69 | if (ind == i_null) {
70 | return;
71 | }
72 | try {
73 | d.id = v.get("id");
74 | d.laptop = v.get("laptop");
75 | d.price = v.get("price");
76 | d.count = v.get("count");
77 | d.available = v.get("available");
78 | d.source = v.get("source");
79 | } catch (std::exception const& e) {
80 | // Logging
81 | }
82 | }
83 |
84 | static void to_base(stock const& d, values& v, indicator& ind) {
85 | /*
86 | * Конвертация из структуры в данные
87 | */
88 | try {
89 | v.set("id", d.id);
90 | v.set("laptop", d.laptop);
91 | v.set("price", d.price);
92 | v.set("count", d.count);
93 | v.set("available", d.available);
94 | v.set("source", d.source);
95 |
96 | ind = i_ok;
97 | return;
98 | } catch (std::exception const& e) {
99 | // Logging
100 | }
101 | ind = i_null;
102 | }
103 | };
104 | } // namespace soci
105 |
--------------------------------------------------------------------------------
/CRM/database-types/employee.h:
--------------------------------------------------------------------------------
1 | // Employee table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct employee {
22 | int id; // ID сотрудника
23 | std::string surname; // Фамилия сотрудника
24 | std::string name; // Имя сотрудника
25 | std::string patronymic; // Отчество сотрудника
26 | std::string login; // Логин сотрудника
27 | std::string password; // Пароль сотрудника
28 |
29 | employee() = default;
30 |
31 | employee(int id, std::string surname, std::string name,
32 | std::string patronymic, std::string login, std::string password)
33 | : id(id),
34 | name(name),
35 | surname(surname),
36 | patronymic(patronymic),
37 | login(login),
38 | password(password) {}
39 |
40 | employee(const employee& other)
41 | : id(other.id),
42 | surname(other.surname),
43 | name(other.name),
44 | patronymic(other.patronymic),
45 | login(other.login),
46 | password(other.password) {}
47 |
48 | employee& operator=(const employee& rhs) {
49 | if (this != std::addressof(rhs)) {
50 | id = rhs.id;
51 | surname = rhs.surname;
52 | name = rhs.name;
53 | patronymic = rhs.patronymic;
54 | login = rhs.login;
55 | password = rhs.password;
56 | }
57 | return *this;
58 | }
59 | };
60 |
61 | namespace soci {
62 | template <>
63 | struct type_conversion {
64 | using base_type = values;
65 |
66 | static void from_base(values const& v, indicator ind, employee& e) {
67 | /*
68 | * Конвертация из данных в структуру
69 | */
70 | if (ind == i_null) {
71 | return;
72 | }
73 | try {
74 | e.id = v.get("id");
75 | e.surname = v.get("surname");
76 | e.name = v.get("name");
77 | e.patronymic = v.get("patronymic");
78 | e.login = v.get("login");
79 | e.password = v.get("password");
80 | } catch (const std::exception& e) {
81 | // Logging
82 | }
83 | }
84 |
85 | static void to_base(employee const& e, values& v, indicator& ind) {
86 | /*
87 | * Конвертация из структуры в данные
88 | */
89 | try {
90 | v.set("id", e.id);
91 | v.set("surname", e.surname);
92 | v.set("name", e.name);
93 | v.set("patronymic", e.patronymic);
94 | v.set("login", e.login);
95 | v.set("password", e.password);
96 |
97 | ind = i_ok;
98 | return;
99 | } catch (const std::exception& e) {
100 | // Logging
101 | }
102 | ind = i_null;
103 | }
104 | };
105 | } // namespace soci
106 |
--------------------------------------------------------------------------------
/CRM/mainwindow.cpp:
--------------------------------------------------------------------------------
1 | // MainWindow source code for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #include "mainwindow.h"
17 |
18 | #include "db_settings/db_settings.h"
19 | #include "leader/leaderWidget.h"
20 | #include "login/login.h"
21 | #include "manager/managerWidget.h"
22 | #include "marketer/marketerWidget.h"
23 | #include "seller/sellerWidget.h"
24 | #include "ui_mainwindow.h"
25 |
26 | MainWindow::MainWindow(QWidget* parent)
27 | : QMainWindow(parent), ui(new Ui::MainWindowUi) {
28 | QFontDatabase::addApplicationFont(":/Comfortaa.ttf");
29 | ui->setupUi(this);
30 | database = db_pool();
31 | setLoginInterface();
32 | }
33 |
34 | void MainWindow::setSellerInterface(std::string name, std::string surname) {
35 | /*
36 | * Функция открывает интерфейс продавца
37 | */
38 | setCentralWidget(new sellerWidget(this, name, surname));
39 | setFixedSize({821, 492});
40 | }
41 |
42 | void MainWindow::setMarketerInterface(std::string name, std::string surname) {
43 | /*
44 | * Функция открывает интерфейс маркетолога
45 | */
46 | setCentralWidget(new marketerWidget(this, name, surname));
47 | setFixedSize({821, 492});
48 | }
49 |
50 | void MainWindow::setManagerInterface(std::string name, std::string surname) {
51 | /*
52 | * Функция открывает интерфейс менеджера
53 | */
54 | setCentralWidget(new managerWidget(this, name, surname));
55 | setFixedSize({821, 492});
56 | }
57 |
58 | void MainWindow::setLeaderInterface(std::string name, std::string surname) {
59 | /*
60 | * Функция открывает интерфейс руководителя
61 | */
62 | setCentralWidget(new leaderWidget(this, name, surname));
63 | setFixedSize({821, 492});
64 | }
65 |
66 | void MainWindow::setSettingsInterface() {
67 | /*
68 | * Функция открывает интерфейс с параметрами СУБД
69 | */
70 | setCentralWidget(new db_settings(this));
71 | setFixedSize({331, 311});
72 | }
73 |
74 | void MainWindow::setLoginInterface() {
75 | /*
76 | * Функция открывает интерфейс авторизации
77 | */
78 | setCentralWidget(new login(this));
79 | setFixedSize({300, 233});
80 | }
81 |
82 | bool MainWindow::connectDatabase() {
83 | /*
84 | * Функция пытается подключиться к СУБД и возвращает true в случае успеха
85 | * и false в случае неудачи
86 | */
87 | return database.connect(get_connection_string());
88 | }
89 |
90 | void MainWindow::setDatabase(const std::string& host,
91 | const unsigned short int& port,
92 | const std::string& user,
93 | const std::string& password,
94 | const std::string& database) {
95 | /*
96 | * Функция устанавливает параметры подключения к СУБД
97 | */
98 | database_ip = host;
99 | database_port = port;
100 | database_login = user;
101 | database_password = password;
102 | database_name = database;
103 | }
104 |
105 | std::string MainWindow::get_connection_string() {
106 | /*
107 | * Функция возвращает строку подключения к СУБД
108 | */
109 | return "postgresql://host='" + database_ip + "' dbname='" + database_name +
110 | "' port=" + std::to_string(database_port) + " user='" +
111 | database_login + "' password='" + database_password + "'";
112 | }
113 |
--------------------------------------------------------------------------------
/CRM/database-types/client.h:
--------------------------------------------------------------------------------
1 | // Client table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct client {
22 | int id; // ID клиента
23 | std::string surname; // Фамилия клиента
24 | std::string name; // Имя клиента
25 | std::string patronymic; // Отчество клиента
26 | std::string email; // Email клиента
27 | std::string phone; // Телефон клиента
28 | std::string sex; // Пол клиента
29 | std::string city; // Город клиента
30 |
31 | client() = default;
32 |
33 | client(int id, std::string surname, std::string name,
34 | std::string patronymic, std::string email, std::string phone,
35 | std::string sex, std::string city)
36 | : id(id),
37 | name(name),
38 | surname(surname),
39 | patronymic(patronymic),
40 | email(email),
41 | phone(phone),
42 | sex(sex),
43 | city(city) {}
44 |
45 | client(const client& other)
46 | : id(other.id),
47 | surname(other.surname),
48 | name(other.name),
49 | patronymic(other.patronymic),
50 | email(other.email),
51 | phone(other.phone),
52 | sex(other.sex),
53 | city(other.city) {}
54 |
55 | client& operator=(const client& rhs) {
56 | if (this != std::addressof(rhs)) {
57 | id = rhs.id;
58 | surname = rhs.surname;
59 | name = rhs.name;
60 | patronymic = rhs.patronymic;
61 | email = rhs.email;
62 | phone = rhs.phone;
63 | sex = rhs.sex;
64 | city = rhs.city;
65 | }
66 | return *this;
67 | }
68 | };
69 |
70 | namespace soci {
71 |
72 | template <>
73 | struct type_conversion {
74 | using base_type = values;
75 |
76 | static void from_base(values const& v, indicator ind, client& c) {
77 | /*
78 | * Конвертация из данных в структуру
79 | */
80 | if (ind == i_null) {
81 | return;
82 | }
83 | try {
84 | c.id = v.get("id", 0);
85 | c.surname = v.get("surname", "");
86 | c.name = v.get("name", "");
87 | c.patronymic = v.get("patronymic", "");
88 | c.email = v.get("email", "");
89 | c.phone = v.get("phone", "");
90 | c.sex = v.get("sex", "");
91 | c.city = v.get("city", "");
92 | } catch (std::exception const& e) {
93 | // Logging
94 | }
95 | }
96 |
97 | static void to_base(const client& c, values& v, indicator& ind) {
98 | /*
99 | * Конвертация из структуры в данные
100 | */
101 | try {
102 | v.set("id", c.id);
103 | v.set("surname", c.surname);
104 | v.set("name", c.name);
105 | v.set("patronymic", c.patronymic);
106 | v.set("email", c.email);
107 | v.set("phone", c.phone);
108 | v.set("sex", c.sex);
109 | v.set("city", c.city);
110 |
111 | ind = i_ok;
112 | return;
113 | } catch (std::exception const& e) {
114 | // Logging
115 | }
116 | ind = i_null;
117 | }
118 | };
119 | } // namespace soci
120 |
--------------------------------------------------------------------------------
/CRM/database-types/laptop.h:
--------------------------------------------------------------------------------
1 | // Laptop table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct laptop {
22 | int id; // ID ноутбука
23 | std::string name; // Название ноутбука
24 | double income; // Желаемая прибыль
25 | std::string type; // Тип ноутбука
26 | std::string cpu; // Процессор ноутбука
27 | std::string gpu; // Видеокарта ноутбука
28 | int ram; // Объем оперативной памяти ноутбука
29 | int rom; // Объем внутренней памяти ноутбука
30 | std::string color; // Цвет ноутбука
31 |
32 | laptop() = default;
33 |
34 | laptop(int id, std::string name, double income, std::string type,
35 | std::string cpu, std::string gpu, int ram, int rom,
36 | std::string color)
37 | : id(id),
38 | name(name),
39 | income(income),
40 | type(type),
41 | cpu(cpu),
42 | gpu(gpu),
43 | ram(ram),
44 | rom(rom),
45 | color(color) {}
46 |
47 | laptop(const laptop& other)
48 | : id(other.id),
49 | name(other.name),
50 | income(other.income),
51 | type(other.type),
52 | cpu(other.cpu),
53 | gpu(other.gpu),
54 | ram(other.ram),
55 | rom(other.rom),
56 | color(other.color) {}
57 |
58 | laptop& operator=(const laptop& rhs) {
59 | if (this != std::addressof(rhs)) {
60 | id = rhs.id;
61 | name = rhs.name;
62 | income = rhs.income;
63 | type = rhs.type;
64 | cpu = rhs.cpu;
65 | gpu = rhs.gpu;
66 | ram = rhs.ram;
67 | rom = rhs.rom;
68 | color = rhs.color;
69 | }
70 | return *this;
71 | }
72 | };
73 |
74 | namespace soci {
75 | template <>
76 | struct type_conversion {
77 | using base_type = values;
78 |
79 | static void from_base(values const& v, indicator ind, laptop& l) {
80 | /*
81 | * Конвертация из данных в структуру
82 | */
83 | if (ind == i_null) {
84 | return;
85 | }
86 | try {
87 | l.id = v.get("id");
88 | l.name = v.get("name");
89 | l.income = v.get("income");
90 | l.type = v.get("type");
91 | l.cpu = v.get("cpu");
92 | l.gpu = v.get("gpu");
93 | l.ram = v.get("ram");
94 | l.rom = v.get("rom");
95 | l.color = v.get("color");
96 | } catch (const std::exception& l) {
97 | // Logging
98 | }
99 | }
100 |
101 | static void to_base(laptop const& l, values& v, indicator& ind) {
102 | /*
103 | * Конвертация из структуры в данные
104 | */
105 | try {
106 | v.set("id", l.id);
107 | v.set("name", l.name);
108 | v.set("income", l.income);
109 | v.set("type", l.type);
110 | v.set("cpu", l.cpu);
111 | v.set("gpu", l.gpu);
112 | v.set("ram", l.ram);
113 | v.set("rom", l.rom);
114 | v.set("color", l.color);
115 |
116 | ind = i_ok;
117 | return;
118 | } catch (const std::exception& l) {
119 | // Logging
120 | }
121 | ind = i_null;
122 | }
123 | };
124 | } // namespace soci
125 |
--------------------------------------------------------------------------------
/CRM/database-types/deal.h:
--------------------------------------------------------------------------------
1 | // Deal table structure
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 | #include
18 |
19 | #include "../db_pool.h"
20 |
21 | struct deal {
22 | int id; // ID сделки
23 | int laptop; // ID ноутбука
24 | int cost; // Сумма сделки
25 | int client; // ID клиента
26 | std::string status; // Статус сделки
27 | boost::gregorian::date created; // Дата создания
28 | int seller; // ID ответственного сотрудника
29 | int rate; // Оценка покупателя
30 | boost::gregorian::date last_update; // Дата последнего обновления
31 |
32 | deal() = default;
33 |
34 | deal(int id, int laptop, int cost, int client, std::string status,
35 | boost::gregorian::date created, int seller, int rate,
36 | boost::gregorian::date last_update)
37 | : id(id),
38 | laptop(laptop),
39 | cost(cost),
40 | client(client),
41 | status(status),
42 | created(created),
43 | seller(seller),
44 | rate(rate),
45 | last_update(last_update) {}
46 |
47 | deal(const deal& other)
48 | : id(other.id),
49 | laptop(other.laptop),
50 | cost(other.cost),
51 | client(other.client),
52 | status(other.status),
53 | created(other.created),
54 | seller(other.seller),
55 | rate(other.rate),
56 | last_update(other.last_update) {}
57 |
58 | deal& operator=(const deal& rhs) {
59 | if (this != std::addressof(rhs)) {
60 | id = rhs.id;
61 | laptop = rhs.laptop;
62 | cost = rhs.cost;
63 | client = rhs.client;
64 | status = rhs.status;
65 | created = rhs.created;
66 | seller = rhs.seller;
67 | rate = rhs.rate;
68 | last_update = rhs.last_update;
69 | }
70 | return *this;
71 | }
72 | };
73 |
74 | namespace soci {
75 | template <>
76 | struct type_conversion {
77 | using base_type = values;
78 |
79 | static void from_base(values const& v, indicator ind, deal& d) {
80 | /*
81 | * Конвертация из данных в структуру
82 | */
83 | if (ind == i_null) {
84 | return;
85 | }
86 | try {
87 | d.id = v.get("id");
88 | d.laptop = v.get("laptop");
89 | d.cost = v.get("cost");
90 | d.client = v.get("client");
91 | d.status = v.get("status");
92 | d.created = v.get("created");
93 | d.seller = v.get("seller");
94 | d.rate = v.get("rate", 0);
95 | d.last_update = v.get("last_update");
96 | } catch (std::exception const& e) {
97 | // Logging
98 | }
99 | }
100 |
101 | static void to_base(deal const& d, values& v, indicator& ind) {
102 | /*
103 | * Конвертация из структуры в данные
104 | */
105 | try {
106 | v.set("id", d.id);
107 | v.set("laptop", d.laptop);
108 | v.set("cost", d.cost);
109 | v.set("client", d.client);
110 | v.set("status", d.status);
111 | v.set("created", d.created);
112 | v.set("seller", d.seller);
113 | v.set("rate", d.rate);
114 | v.set("last_update", d.last_update);
115 |
116 | ind = i_ok;
117 | return;
118 | } catch (std::exception const& e) {
119 | // Logging
120 | }
121 | ind = i_null;
122 | }
123 | };
124 | } // namespace soci
125 |
--------------------------------------------------------------------------------
/.github/workflows/macos-build.yml:
--------------------------------------------------------------------------------
1 | # Github action script for building linux executables of this project
2 | # Copyright (C) 2022 VadVergasov as part of Plnguins
3 |
4 | # This program is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU Affero General Public License as published
6 | # by the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 |
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU Affero General Public License for more details.
13 |
14 | # You should have received a copy of the GNU Affero General Public License
15 | # along with this program. If not, see .
16 | name: MacOS build
17 |
18 | on:
19 | push:
20 | tags:
21 | - "*"
22 | branches-ignore:
23 | - "dependabot/**"
24 | paths-ignore:
25 | - "**.md"
26 | - "LICENSE.txt"
27 | - "README.md"
28 | - ".github/**"
29 | - "!.github/workflows/macos-build.yml"
30 | pull_request:
31 | paths-ignore:
32 | - "**.md"
33 | - "LICENSE.txt"
34 | - "README.md"
35 | - ".github/**"
36 | - "!.github/workflows/macos-build.yml"
37 |
38 | env:
39 | BUILD_TYPE: Debug
40 | QT_VERSION: "6.2.4"
41 | QT_DIR: ${{ github.workspace }}
42 | QT_TOOLS: "tools_ifw"
43 | BOOST_PLATFORM: 11
44 | BOOST_VERSION: "1.79.0"
45 | BOOST_DIR: ${{ github.workspace }}
46 |
47 | jobs:
48 | macos:
49 | name: MacOS
50 | runs-on: macos-latest
51 | strategy:
52 | matrix:
53 | arch: [x64]
54 | steps:
55 | - name: Change to Release if tag
56 | if: startsWith(github.ref, 'refs/tags/')
57 | run: |
58 | echo "BUILD_TYPE=Release" >> $GITHUB_ENV
59 | - uses: actions/checkout@v3
60 | name: Clone
61 | with:
62 | submodules: recursive
63 | - name: Install Qt
64 | uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa
65 | with:
66 | cache: true
67 | cache-key-prefix: ${{ runner.os }}-Qt-${{ env.QT_VERSION }}-${{ env.QT_DIR }}-${{ env.QT_TOOLS }}
68 | version: ${{ env.QT_VERSION }}
69 | dir: ${{ env.QT_DIR }}
70 | host: "mac"
71 | target: "desktop"
72 | setup-python: "false"
73 | tools: ${{ env.QT_TOOLS }}
74 | - name: Install boost
75 | id: install-boost
76 | uses: MarkusJx/install-boost@v2.4.3
77 | with:
78 | boost_version: ${{ env.BOOST_VERSION }}
79 | platform_version: ${{ env.BOOST_PLATFORM }}
80 | toolset: clang
81 | boost_install_dir: ${{ env.BOOST_DIR }}
82 | cache: true
83 | - name: Create symlinks
84 | run: |
85 | sudo ln -s $(pg_config --libdir)/* /usr/local/lib/ || true
86 | sudo ln -s $(pg_config --includedir)/* /usr/local/include/
87 | - name: Configure CMake
88 | run: |
89 | cmake -B ${{ github.workspace }}/build \
90 | -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
91 | -DBoost_INCLUDE_DIR=${{ env.BOOST_DIR }}/boost/boost/include \
92 | -DBoost_LIBRARY_DIRS=${{ env.BOOST_DIR }}/boost/boost/lib \
93 | -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 \
94 | -DOPENSSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib \
95 | -DPostgreSQL_INCLUDE_DIR="/usr/local/opt/libpq/include" \
96 | -DPostgreSQL_LIBRARY="/usr/local/opt/libpq/lib/libpq.dylib"
97 | - name: Build
98 | run: cmake --build ${{ github.workspace }}/build --parallel --config ${{ env.BUILD_TYPE }}
99 | - uses: actions/upload-artifact@v3
100 | name: Upload bundle
101 | with:
102 | name: MacOS
103 | path: ${{ github.workspace }}/build/bin/CRM.dmg
104 | release:
105 | if: startsWith(github.ref, 'refs/tags/')
106 | needs: macos
107 | name: Create\Update release
108 | runs-on: ubuntu-latest
109 | steps:
110 | - name: Download artifact
111 | uses: actions/download-artifact@v3
112 | with:
113 | name: MacOS
114 | path: ${{ github.workspace }}/MacOS
115 | - name: Create Release
116 | id: create_release
117 | uses: ncipollo/release-action@v1.11.2
118 | with:
119 | allowUpdates: true
120 | artifactErrorsFailBuild: true
121 | artifacts: "${{ github.workspace }}/MacOS/CRM.dmg"
122 | name: ${{ github.event.head_commit.message }}
123 | draft: false
124 | prerelease: startsWith(github.ref, 'refs/tags/')
125 |
--------------------------------------------------------------------------------
/CRM/interface/interfaceWidget.h:
--------------------------------------------------------------------------------
1 | // Interface header for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #pragma once
17 |
18 | #include "../db_methods.h"
19 | #include "../editUI/ui_editAd.h"
20 | #include "../editUI/ui_editClient.h"
21 | #include "../editUI/ui_editDeal.h"
22 | #include "../editUI/ui_editEmployee.h"
23 | #include "../editUI/ui_editLaptop.h"
24 | #include "../editUI/ui_editProvider.h"
25 | #include "../editUI/ui_editStock.h"
26 | #include "../mainwindow.h"
27 | #include "ui_interface.h"
28 |
29 | namespace Ui {
30 | class interfaceUi;
31 | class editAd;
32 | class editDeal;
33 | class editEmployee;
34 | class editProvider;
35 | class editStock;
36 | class editLaptop;
37 | } // namespace Ui
38 |
39 | class interfaceWidget : public QWidget {
40 | Q_OBJECT
41 |
42 | public:
43 | explicit interfaceWidget(QMainWindow* parent = nullptr, std::string = "",
44 | std::string = "");
45 | ~interfaceWidget() { delete ui; }
46 |
47 | private slots:
48 | void on_Provider_clicked();
49 | void on_Employee_clicked();
50 | void on_Stock_clicked();
51 | void on_Ads_clicked();
52 | void on_Deal_clicked();
53 | void on_Client_clicked();
54 | void on_Laptop_clicked();
55 |
56 | void on_Add_clicked();
57 | void on_Edit_clicked();
58 | void on_Delete_clicked();
59 |
60 | void on_Logout_clicked() { parent->setLoginInterface(); }
61 |
62 | void on_Page_1_clicked();
63 | void on_Page_2_clicked() { goToPage(pages[1]); }
64 | void on_Page_3_clicked() { goToPage(pages[2]); }
65 | void on_Page_4_clicked() { goToPage(pages[3]); }
66 | void on_Page_5_clicked();
67 |
68 | protected:
69 | Ui::interfaceUi* ui;
70 |
71 | private:
72 | MainWindow* parent;
73 | int numberOfPages = 0;
74 | std::vector pages = {1, 2, 3, 4, 5};
75 | std::vector pageButtons;
76 | int limit = 10;
77 |
78 | void updateProvider(const int& = 0, const int& = 10);
79 | void updateEmployee(const int& = 0, const int& = 10);
80 | void updateStock(const int& = 0, const int& = 10);
81 | void updateAds(const int& = 0, const int& = 10);
82 | void updateDeal(const int& = 0, const int& = 10);
83 | void updateClient(const int& = 0, const int& = 10);
84 | void updateLaptop(const int& = 0, const int& = 10);
85 |
86 | void editProvider(soci::session&, const int&);
87 | void editEmployee(soci::session&, const int&);
88 | void editStock(soci::session&, const int&);
89 | void editAd(soci::session&, const int&);
90 | void editDeal(soci::session&, const int&);
91 | void editClient(soci::session&, const int&);
92 | void editLaptop(soci::session&, const int&);
93 |
94 | void deleteProvider(soci::session&, const std::vector&);
95 | void deleteEmployee(soci::session&, const std::vector&);
96 | void deleteStock(soci::session&, const std::vector&);
97 | void deleteAd(soci::session&, const std::vector&);
98 | void deleteDeal(soci::session&, const std::vector&);
99 | void deleteClient(soci::session&, const std::vector&);
100 | void deleteLaptop(soci::session&, const std::vector&);
101 |
102 | void addProvider(soci::session&);
103 | void addEmployee(soci::session&);
104 | void addStock(soci::session&);
105 | void addAd(soci::session&);
106 | void addDeal(soci::session&);
107 | void addClient(soci::session&);
108 | void addLaptop(soci::session&);
109 |
110 | void (interfaceWidget::*updateTable)(const int&, const int&) = nullptr;
111 | void (interfaceWidget::*editElement)(soci::session&, const int&) = nullptr;
112 | void (interfaceWidget::*deleteElement)(soci::session&,
113 | const std::vector&) = nullptr;
114 | void (interfaceWidget::*addElement)(soci::session&) = nullptr;
115 |
116 | void hideGreeting();
117 | void updatePageButtons();
118 | void goToPage(int pageNumber) {
119 | (this->*updateTable)(pageNumber - 1, limit);
120 | }
121 | };
122 |
--------------------------------------------------------------------------------
/CRM/login/login.cpp:
--------------------------------------------------------------------------------
1 | // Login source code for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | #include "login.h"
17 |
18 | login::login(QMainWindow* parent)
19 | : parent(dynamic_cast(parent)), ui(new Ui::loginUi) {
20 | ui->setupUi(this);
21 | if (!this->parent->connectDatabase()) {
22 | QMessageBox::critical(this, tr("Ошибка"),
23 | tr("Невозможно подключиться к БД"));
24 | }
25 | }
26 |
27 | void login::on_ShowPassword_clicked(bool checked) {
28 | if (checked) {
29 | ui->Password->setEchoMode(QLineEdit::Normal);
30 | } else {
31 | ui->Password->setEchoMode(QLineEdit::Password);
32 | }
33 | }
34 |
35 | void login::on_LoginButton_clicked() {
36 | if (!this->parent->connectDatabase()) {
37 | QMessageBox::critical(this, tr("Ошибка"),
38 | tr("Невозможно подключиться к БД"));
39 | return;
40 | }
41 | std::string Login, Password;
42 | Role role = Role::Unknown;
43 | Login = ui->Login->text().toStdString();
44 | if (Login.empty() || ui->Password->text().isEmpty()) {
45 | QMessageBox::critical(this, tr("Ошибка"), tr("Введите логин и пароль"));
46 | return;
47 | }
48 | Password = db_methods::hashPassword(ui->Password->text().toStdString());
49 | try {
50 | soci::session sql(*parent->database.get_pool().lock());
51 | std::string get_employee =
52 | "SELECT employee.name, employee.surname, employee.password, "
53 | "leader.id, stock_manager.id, marketer.id, seller.id FROM (((( "
54 | "employee LEFT OUTER JOIN leader ON leader.employee = employee.id) "
55 | "LEFT OUTER JOIN stock_manager ON stock_manager.employee = "
56 | "employee.id) LEFT OUTER JOIN marketer ON marketer.employee = "
57 | "employee.id) LEFT OUTER JOIN seller ON seller.employee = "
58 | "employee.id) WHERE login = :login LIMIT 1";
59 | boost::tuple, boost::optional,
60 | boost::optional, boost::optional,
61 | boost::optional, boost::optional,
62 | boost::optional>
63 | result;
64 | sql << get_employee, soci::into(result), soci::use(Login, "login");
65 | if (!result.get<2>() || result.get<2>().get() != Password) {
66 | QMessageBox::critical(this, tr("Ошибка"),
67 | tr("Неверный логин или пароль"));
68 | return;
69 | }
70 | if (result.get<3>().is_initialized()) {
71 | role = Role::Leader;
72 | } else if (result.get<4>().is_initialized()) {
73 | role = Role::Manager;
74 | } else if (result.get<5>().is_initialized()) {
75 | role = Role::Marketer;
76 | } else if (result.get<6>().is_initialized()) {
77 | role = Role::Seller;
78 | }
79 | std::string name = result.get<0>().get(),
80 | surname = result.get<1>().get();
81 | switch (role) {
82 | case Role::Leader:
83 | parent->setLeaderInterface(name, surname);
84 | break;
85 | case Role::Manager:
86 | parent->setManagerInterface(name, surname);
87 | break;
88 | case Role::Marketer:
89 | parent->setMarketerInterface(name, surname);
90 | break;
91 | case Role::Seller:
92 | parent->setSellerInterface(name, surname);
93 | break;
94 | case Role::Unknown:
95 | QMessageBox::critical(
96 | this, tr("Ошибка"),
97 | tr("Пользователь не принадлежит ни к одной роли"));
98 | break;
99 | }
100 | } catch (const std::exception& e) {
101 | QMessageBox::critical(this, tr("Ошибка"),
102 | tr("Что-то пошло не так. Ошибка:\n") + e.what());
103 | // Logging
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/.github/workflows/windows-build.yml:
--------------------------------------------------------------------------------
1 | # Github action script for building windows executables of this project
2 | # Copyright (C) 2022 Plnguins
3 |
4 | # This program is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU Affero General Public License as published
6 | # by the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 |
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU Affero General Public License for more details.
13 |
14 | # You should have received a copy of the GNU Affero General Public License
15 | # along with this program. If not, see .
16 | name: Windows build
17 |
18 | on:
19 | push:
20 | tags:
21 | - "*"
22 | branches-ignore:
23 | - "dependabot/**"
24 | paths-ignore:
25 | - "docs/**"
26 | - "**.md"
27 | - "LICENSE.txt"
28 | - ".github/**"
29 | - "!.github/workflows/windows-build.yml"
30 | pull_request:
31 | paths-ignore:
32 | - "docs/**"
33 | - "**.md"
34 | - "LICENSE.txt"
35 | - ".github/**"
36 | - "!.github/workflows/windows-build.yml"
37 |
38 | env:
39 | BUILD_TYPE: Debug
40 | QT_VERSION: "6.2.4"
41 | QT_DIR: ${{ github.workspace }}
42 | QT_ARCH: "win64_msvc2019_64"
43 | QT_TOOLS: "tools_ifw"
44 | BOOST_PLATFORM: 2019
45 | BOOST_VERSION: "1.79.0"
46 | BOOST_DIR: ${{ github.workspace }}
47 |
48 | jobs:
49 | windows:
50 | name: Windows
51 | runs-on: windows-2019
52 | strategy:
53 | matrix:
54 | arch: [x64]
55 | steps:
56 | - name: Change to Release if tag
57 | if: startsWith(github.ref, 'refs/tags/')
58 | run: echo "BUILD_TYPE=Release" >> $env:GITHUB_ENV
59 | - uses: actions/checkout@v3
60 | name: Clone
61 | with:
62 | submodules: recursive
63 | - name: Install Qt
64 | uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa
65 | with:
66 | cache: true
67 | cache-key-prefix: ${{ runner.os }}-Qt-${{ env.QT_VERSION }}-${{ env.QT_DIR }}-${{ env.QT_ARCH }}-${{ env.QT_TOOLS }}
68 | version: ${{ env.QT_VERSION }}
69 | dir: ${{ env.QT_DIR }}
70 | host: "windows"
71 | arch: ${{ env.QT_ARCH }}
72 | target: "desktop"
73 | setup-python: "false"
74 | tools: ${{ env.QT_TOOLS }}
75 | - name: Install boost
76 | id: install-boost
77 | uses: MarkusJx/install-boost@v2.4.3
78 | with:
79 | boost_version: ${{ env.BOOST_VERSION }}
80 | platform_version: ${{ env.BOOST_PLATFORM }}
81 | toolset: msvc
82 | boost_install_dir: ${{ env.BOOST_DIR }}
83 | cache: true
84 | - name: Setup PATH
85 | run: echo 'C:\Program Files\PostgreSQL\14\bin;C:\Program Files\PostgreSQL\14;C:\Program Files\PostgreSQL\14\include;${{ env.BOOST_DIR}}/boost/boost' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
86 | - name: Configure CMake
87 | run: cmake -B ${{ github.workspace }}\build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBoost_INCLUDE_DIR=${{ env.BOOST_DIR }}/boost/boost/include -DBoost_LIBRARY_DIRS=${{ env.BOOST_DIR }}/boost/boost/lib -DPostgreSQL_ADDITIONAL_VERSIONS=14 -DPOSTGRESQL_INCLUDE_DIR='C:\Program Files\PostgreSQL\14\include'
88 | - name: Build
89 | run: cmake --build ${{ github.workspace }}/build --parallel --config ${{ env.BUILD_TYPE }}
90 | - name: Create Setup
91 | run: ${{ env.IQTA_TOOLS }}\QtInstallerFramework\4.5\bin\binarycreator.exe -c config\config.xml -p packages Windows-Setup.exe -v
92 | - uses: actions/upload-artifact@v3
93 | name: Upload builded app
94 | with:
95 | name: Windows
96 | path: ${{ github.workspace }}/Windows-Setup.exe
97 | release:
98 | if: startsWith(github.ref, 'refs/tags/')
99 | needs: windows
100 | name: Create\Update release
101 | runs-on: ubuntu-latest
102 | steps:
103 | - name: Download artifact
104 | uses: actions/download-artifact@v3
105 | with:
106 | name: Windows
107 | path: ${{ github.workspace }}/Windows
108 | - name: Create Release
109 | id: create_release
110 | uses: ncipollo/release-action@v1.11.2
111 | with:
112 | allowUpdates: true
113 | artifactErrorsFailBuild: true
114 | artifacts: "${{ github.workspace }}/Windows/Windows-Setup.exe"
115 | name: ${{ github.event.head_commit.message }}
116 | draft: false
117 | prerelease: startsWith(github.ref, 'refs/tags/')
118 |
--------------------------------------------------------------------------------
/.github/workflows/linux-build.yml:
--------------------------------------------------------------------------------
1 | # Github action script for building linux executables of this project
2 | # Copyright (C) 2022 Plnguins
3 |
4 | # This program is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU Affero General Public License as published
6 | # by the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 |
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU Affero General Public License for more details.
13 |
14 | # You should have received a copy of the GNU Affero General Public License
15 | # along with this program. If not, see .
16 | name: Linux build
17 |
18 | on:
19 | push:
20 | tags:
21 | - "*"
22 | branches-ignore:
23 | - "dependabot/**"
24 | paths-ignore:
25 | - "**.md"
26 | - "LICENSE.txt"
27 | - "README.md"
28 | - ".github/**"
29 | - "!.github/workflows/linux-build.yml"
30 | pull_request:
31 | paths-ignore:
32 | - "**.md"
33 | - "LICENSE.txt"
34 | - "README.md"
35 | - ".github/**"
36 | - "!.github/workflows/linux-build.yml"
37 |
38 | env:
39 | BUILD_TYPE: Debug
40 | QT_VERSION: "6.2.4"
41 | QT_DIR: ${{ github.workspace }}
42 | QT_ARCH: "gcc_64"
43 | QT_TOOLS: "tools_ifw"
44 | BOOST_PLATFORM: 20.04
45 | BOOST_DIR: ${{ github.workspace }}
46 | BOOST_VERSION: "1.79.0"
47 |
48 | jobs:
49 | linux:
50 | name: Linux
51 | runs-on: ubuntu-20.04
52 | strategy:
53 | matrix:
54 | arch: [x64]
55 | steps:
56 | - name: Change to Release if tag
57 | if: startsWith(github.ref, 'refs/tags/')
58 | run: echo "BUILD_TYPE=Release" >> $GITHUB_ENV
59 | - uses: actions/checkout@v3
60 | name: Clone
61 | with:
62 | submodules: recursive
63 | - name: Install Qt
64 | uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa
65 | with:
66 | cache: true
67 | cache-key-prefix: ${{ runner.os }}-Qt-${{ env.QT_VERSION }}-${{ env.QT_DIR }}-${{ env.QT_ARCH }}-${{ env.QT_TOOLS }}
68 | version: ${{ env.QT_VERSION }}
69 | dir: ${{ env.QT_DIR }}
70 | host: "linux"
71 | arch: ${{ env.QT_ARCH }}
72 | target: "desktop"
73 | setup-python: "false"
74 | tools: ${{ env.QT_TOOLS }}
75 | - name: Install PostgreSQL and cmake
76 | uses: awalsh128/cache-apt-pkgs-action@latest
77 | with:
78 | packages: cmake postgresql libpq-dev g++ build-essential libxkbcommon-dev
79 | - name: Install boost
80 | id: install-boost
81 | uses: MarkusJx/install-boost@v2.4.3
82 | with:
83 | boost_version: ${{ env.BOOST_VERSION }}
84 | platform_version: ${{ env.BOOST_PLATFORM }}
85 | toolset: gcc
86 | boost_install_dir: ${{ env.BOOST_DIR }}
87 | cache: true
88 | - name: Configure CMake
89 | run: |
90 | cmake -B ${{ github.workspace }}/build \
91 | -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
92 | -DBoost_INCLUDE_DIR=${{ env.BOOST_DIR }}/boost/boost/include \
93 | -DBoost_LIBRARY_DIRS=${{ env.BOOST_DIR }}/boost/boost/lib
94 | - name: Build
95 | run: cmake --build ${{ github.workspace }}/build --parallel --config ${{ env.BUILD_TYPE }}
96 | - name: Download linuxdeploy
97 | run: |
98 | wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O ${{ github.workspace }}/linuxdeploy.AppImage -q
99 | wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -O ${{ github.workspace }}/linuxdeploy-plugin-qt.AppImage -q
100 | chmod +x ${{ github.workspace }}/linuxdeploy.AppImage
101 | chmod +x ${{ github.workspace }}/linuxdeploy-plugin-qt.AppImage
102 | - name: Create app folder
103 | run: |
104 | mkdir -p ${{ github.workspace }}/app
105 | ${{ github.workspace }}/linuxdeploy.AppImage --appdir ${{ github.workspace }}/build/bin/app -e ${{ github.workspace }}/build/bin/CRM --plugin qt
106 | cp -R ${{ github.workspace }}/build/bin/app/usr ${{ github.workspace }}/packages/com.pinguins.crm/data
107 | - name: Create installer
108 | run: ${{ env.IQTA_TOOLS }}/QtInstallerFramework/4.5/bin/binarycreator -c ${{ github.workspace }}/config/config.xml -p ${{ github.workspace }}/packages ${{ github.workspace }}/Linux-Setup -v
109 | - uses: actions/upload-artifact@v3
110 | name: Upload builded app
111 | with:
112 | name: Linux
113 | path: ${{ github.workspace }}/Linux-Setup
114 | release:
115 | if: startsWith(github.ref, 'refs/tags/')
116 | needs: linux
117 | name: Create\Update release
118 | runs-on: ubuntu-latest
119 | steps:
120 | - name: Download artifact
121 | uses: actions/download-artifact@v3
122 | with:
123 | name: Linux
124 | path: ${{ github.workspace }}/Linux
125 | - name: Create Release
126 | id: create_release
127 | uses: ncipollo/release-action@v1.11.2
128 | with:
129 | allowUpdates: true
130 | artifactErrorsFailBuild: true
131 | artifacts: "${{ github.workspace }}/Linux/Linux-Setup"
132 | name: ${{ github.event.head_commit.message }}
133 | draft: false
134 | prerelease: startsWith(github.ref, 'refs/tags/')
135 |
--------------------------------------------------------------------------------
/Диаграмма.drawio:
--------------------------------------------------------------------------------
1 | 7Z3rc5s6FsD/Gs/c/ZA7iJfho19pO9tu76bt3uZ+ozFJvOuYDKE3Sf/65SUQSGBwjIV1zkzHxTLGRDqHn3RemhiLh5d3ofd4/ylY+9uJrq1fJsZyoutkOnXi/5KW16xF1y0ta7kLN+v8rLLhy+aXnzfS035u1v5T5cQoCLbR5rHaeBPsdv5NVGnzwjB4rp52G2yrv/ro3flcw5cbb8u3/rlZR/d5q22Z5Qfv/c3dPf1pYrvZJz+8m//dhcHPXf6Du2DnZ588ePQ6+R/5dO+tg2emyVhNjEUYBFF29PCy8LdJx9Iuy7532fBpcc+hv4u6fGF3uVuS16tg9f3Lr//4394/BdrLRX6Vv73tz7wvJkttMtOS13n2StLX1WRJJk766XyZvjrp6yw/zv7E6JV2afzXPiaHkfcjaZo/RV4Y5SNvaHFDPJaRt9n5YdxA0vfbrff4tElPz1ruN9v1R+81+BnRC9F389vNi7++ygY+OTeWgY/xxZK3ycVv44t/yW8m+djbbu528fFN3FfJL85D/ym+l4/eU5SfkX4juz3djN/zvUu7yg8j/4Vpynv7nR88+FH4Gp/yUpXuXCsuHDNveC5lzKKacs+KF230crm+K65djm98kA9xj+HW+eFuHbirRGDn90G4+ZUM1zbvXnYw0/fPm4ett4t1xFvXmuZB+lRIB2Wz3S6CbZCMeKon9UFPTlqHweNXL7zzo7zhMdjsorQfrHn8L+6Zhfa7NbHie13E70n5Pv6XnB5Gi2D3FIWxcCXX8OMxfvaTcZ5HwWN+0a1/S68f5v2eHP8Ioih46CwRrRq1X0xyuTA6SoUxlFAYnFD88c9GsYj//mjjba/ix7C3u9tmg5g+lb1yEAUjLez7or/rA1HX3yDuzttt+vS836zX/u7w8dE7jw8zIEbP8cgvVvZS76t52/hBtfOiWIFiuDxxg1zc5+HjbnLj/mEpedzpczo7d/706N1sdncfs2/aNcGwZAnGS7Pi6kcVlE6XO4Gk0NtAbuzhhna4+PXmhi2bGzo/ebwcEzi0Iz8ftM4jpDo5qPrXlw1m8uqmCwN3dU4okScqKrNk7t18/vFhdT1bmX89XV/tZu/vby8MfrqJLJHNEveELBFLBT8ZVYQl7UoAiiXirrCELHHn1OwUvxqMwemslijyxAYeV2zkyui4QnTpYJnCAovdeYiUB4sjBssl9W2QiaMxkJmnLQvIeOkuPCrjRWwkd8XSNKOyU0xQLOojy/xl8eu8HUQT9I7p+oU17YgK3TwCK8QGcTRzDu4eK/TofPxjJm/nVNlBVmgBqCmEuCt4OydoF1kP0QA3QTDRrjn4+rM/PKQ7yUxlDZvtWoDwMMWGTXSS9RcVcDAhGj/zQJpIp8kp3WQNcsHPMlTGSakHyBOi8VOJFCImY9DU82Odt2/a6atZtVFlVqv4zEvAJOojZeBQVPwmomhMKDqpZ61BMIDF/xWKgCzSDcH8NGGRwSQLsfAxAeOlj+DAw4stWCYjXqTjxZKOF5sP6FEaL4UiIF50m4/aYWI3aLwGYKT0EBaVkSIMY7EE62QkinSiOLJDAS1+pqEIUNrVABRPxF0hiA2u4CRerUyr9jMIaHmr2MAji2BagmSRTZYilFAeWfhQY6XJMu08RMqTRRwWPNMZN8ucHsd8MZkFzBIyZbqLkMqUET4BG2TKXTKzFYOZrRDaguWY2gSoHnDePbB4MBsXjU7D+cRwAedW7/mE9IBzG1bAeaEFoKYT4q7g3WqgA857iAa4aYKNAeeDL0b7w0N6wLkNK+DcxoDzoisaKmksmWKuWYrqggsCzFakOnMmW+TVOicEyRMweAjCmhsjRJD0KHWB915pBIGsuSHuioaaGzZnDtWYlgUTwH450bOPLpkYQoexc82rxTq037QLomn/gEwoLNvR2DdEkLyPiJKOKPnR60SQ268ypEpFQEoRUa5+6bVzcv7EbGGqD2aocqvrp4xQ8SupeF+yM/UFZdmK8f05zPlLhmjs+ayXkIUjrYDI/Apk8PWRaYDkwzDIMZJPemA9ERQmUJt8IAMhG/qiORKylrGV8WXK2AVXDJscJv7Aqq7IAOMIQydbOgdjJ8eIo1NG5TcIhrLBk3sUAXFETD7U7Wr2CTRDMDCyuXPogwkZMiaGnDT+vkEwYJWiKBUBGUIs3pB79Rk0Q3pIB0CGYNjcGBnSdW/kARkCK3CuVARkCBGkhi/++AaaIRj21tI5GPc2RoZ03UFkQIbAinwrFQEZQgRJ4O+AMwQD0xo7R7cFWb7IENkMMTTZDCkoBoQhpSIgQ/SpIFo17vCZzbjhrdz1DhcsfUQGHFiIoCwzV+yKVIpd5bIVt7hM6AeWkmiUplopCb0rNNzBFh6iesw4mzhuJYlSs86nlAQxeHO3yrUkSkXA2QQxeIs26GoSfYQD4LwBC7EPviA9ACHSC0oQA1Yh9lIRECHEaCjEjjUlTiVi8EA0FaxlEiMIm2PHJpE37y0DeInqatU16oXTNfGoWN0enyRTjL0ZfpVaqM8ZrVKn/EpF6VXqFGNvyr7g1x2wV6k9hAPg5ABDb4ZfpfZHiPxV6hRY6M0UQ2/KvuBDbxKEaNXF6N6y6do5UUeiPAGkDgbrjJE60isdFunTYKiDwTrl2LcG67CWUG1SFjUsDKMzhj+XnSIuIFAII3taBE5gGEUKSafQCIoZOrxhVWkMOd0HSX0MCeq8JS66WWWv5GVRtGnKRJGycYC0yBNg+vQQK4D0wfiQUdJHfkFBB1iAiIMBImVfNASImIzVraBMbb2zROL0ECVwxNEJVrAdJXGk1wyMoQeKOKUmIHF00lDC1uFWNCtmvcOGHs7ib/9WOogOS4wCveVIH4EExy3iiHfByQMYTW4vHMy06x7GaHUtNljkUQ+w3kFvYLd5yVvCGAslOqMwRuqPhBLG6KA3sBx73hsIO4yxh3DAmyK46MobfmnbHyHywxhdYJ68QhEQIcQV52tjGOMw8gSQOujCGyN15IcxusA8eC568Mq+EHvw9oQx1nYLMxmLqY1hjD3kCxyFdNHuq0gh6RSSH8aoC7YsVRlDpSYghnTBrqRMGOOc8b8VSIJeBrOH+MCjDBFkZyBl5FNGerhiDDpYlCHdva7KU4YI5p65a56N+2DDFdOoEMCU6SE+8Cgj2k8bKSOfMvJDFAX7XStNGRPrUZR9IQ4Ac80qXwqTWhZ4eFBsGAAA9ZAslQE0924+//iwup6tzL+erq92s/f3txcCQUP8SMfPSXdEFsoFH6GoCHxatQAUeoQ9QQVPsPlHi8eG3VjGhoGaN8oRONDYaE4bJWlOuW+yWDCUtaa16wGyxhbb0txVzpFlLXxghiueo8uYyhwSrwYFu1GkFlyNESS+RvxiT2QkpliVKVakayJN4cs5vvVMtO8ETjeOm2JVqtL5pFjpBm/xUDnFqlQEUPONhr7grRqgU6z6CAe8iQJdGSFChluxHoAQ6SlWusmbMhRZse5RBESIbvLWinTNumAsoNUSIvlqde/yIj5nfk4skihlKrPo31Njt324vrlePzt/rv97cfv186cLtJ2OkUSnTLsSioWyltNWJQBFIWFPNNhNM+6w3jmboVLzI0MpuLxRdMChBUskjhEtJ82lEsqFsgUSW7UA2dJQHJEtBr8Q7ddci35nd3YG4op7o2CpTJ6GFZ+gDN6ypRBnIVPx8eVEnEpe+IUXTIvOBS/tgdwEHXmT7uubAd149Mo4PRnQjVfo4Rm58SzeJKK0G69QBFAzlIa+4O0esN14PYQD3izDwgy74Ve4/REi341n8SFCo0LIsR0sFibYlX2BGz6fUp4AUgdrVI2ROtIrJeoWsBJVFpaoKvuioURVv51nDjJ7JVkTdMuartEooDeo6SG38OhGJ+9It1HRbQQVGAVpnkrjrdAExJsuyOTssG1VSqYqu/jIFY1ZgM0ZuMV3qv3r28ePoFHVQwZVRpW4nsF+UPnrO58Ojb/9ETyvygZuTO6jhwReiXnf361nYZgO4erqlx8GX4NP3u6VYq387MHbrT+nQhUmf6dP0ea/bKLvzPF1cvy7lb9bvjAfLSn7YlEIX7+zb5hvJW/Lr6Xv6Pd4WaI16YKf4Y3fJl40SSSiNN07Z0p6tOujkGgCQSkaQ3/rRZu//cott0jjHwnkSzk36XovB+RUq0lg9tfn3yqlj7uQY1QvdGHXLpR1DnehWAi8V+a0fBLSeMPOtPY7eT2OUiuyKx5VRzqYKlBHWnWk2Ktqv45QwRmNjrikLnJ0mdpXSepXInrtQsdSErN+x/YJtKRDoKR0LSGj1hIq+nuVhEztsSuJeTQlqV/oSEoyrZPE1rTWG3Ms7jlwAq3qsKEQalWrVpldtaoo9z4arbLqMmpoR9Kqi6k9kFrV2WOae9TKrquVeQK16hDzgGp1JFjRHeNQrY5IK0Mfo1p1KCqDatW+UjL0rrgi5tj0yqnJnO4eqld6Xa8GmgU6dQWmu9o36hVngDBOoFdd9lqRp1inN7nxKtJWbnQ8CuLWpc05VEHq9rapORB46sXLrH3gqT8EiH4KBdF5BVkOlpYFOAeG2DRApxCIrhVSj5IGIx59DCbr5m7vJhTtGjbKJBjxLfMmyVEFMB+eA9OuBaBc7eKu4M1mUDJg3ioa8DzgmP9yzFitI8HjlOkv4ltWdnupdi1AeBDx5lL7w7TOBy/yhAccXnQstD1CvJwyz0UsFvxDRmW86CCrbIu7QlzVZaZXU06YhBe4YOkhNuDAQn8SwTImsJw0xUQsF8pmmLSrAZKFuo477YoLlik9BAYcU/RRx0Ud6Gc+JPCDl6U3hbq3rppH454mVj3swjw0H6QeGKUbw7iniVV3hJuniHW3BcHuy2KXA9aVPKvk6ZXO6DlzbLTP2yboaE5H1u26aHeHmlrZHaKxccrdWSbaVet8/Mw2T02V/cyFFuCM2+aNu6D9zD1EA9zc2ha4lRAex7XX9IeHdD+zzZuDVTbX2N13YFcdHjSSXLzRclHRgy1XxVe7Oh/UyBMkcKhxR12x4CzMOHmH7TXi2KPLMagnqEwPzjHgcmNOlWPgVG04vNVHqycZuNXk7WGsPm6D1eeS2z7DZB7hOmMBsttnfGjpyUaTkK45BYOZelw09Qxu6nHPz9TjwjL1uGjqKboCTT2Higa8+TeaegY39fSHh3RTjwvL1OOiqadw9dMVDtp6BpYkcKwhmoq1IcZp7HHVNfYQ266HW9SLIg1l7aG1LJqtPfWyGY57AmsP0XThM9utVZAojvkt5eO7LHajSB/t+e4ShPku++y3uSs7+Zb1aDbizUY1oSCdQ68HMxoRDQtRDG41KvXyfMxGRANWikLDWhRlX2AxioOFA+B0HstRDG47OgAh0o1HRANWkELDihRlXzSUpEDz0bFFCSBwBPno47MfERXsR4UggjAgxRPfU1mQ9tQkJYSLMHJOYUGiJgpxQq4j2mm0tsNpc6IuWn7K4Xc6Ts6GM/x0KdCMs/bOIrFHnc7I8CMoTKy04Yd012blZ+2CssSwDT89hAPePFxQrRgRcmzDT3+EyDf8CIoZK234Id0ju9RHiMAajIafIUQJIHBU262Jl4qjG3DGt+fS0Qw43JWINlDRHj7fq7qTpsB+U1/yO9Vtmvrab+K3YRBE7Omh93j/KVj7yRn/Bw==
--------------------------------------------------------------------------------
/CRM/editUI/editProvider.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | editProvider
19 |
20 |
21 |
22 | 0
23 | 0
24 | 304
25 | 221
26 |
27 |
28 |
29 | Поставщик
30 |
31 |
32 |
33 |
34 | 80
35 | 170
36 | 131
37 | 41
38 |
39 |
40 |
41 | QPushButton#Apply:!pressed {
42 | font: 12pt "Comfortaa";
43 | font: bold;
44 | color: rgb(56, 84, 102);
45 | background-color: rgb(221, 235, 255);
46 | border: 5px solid #BBD6FF ;
47 | border-radius:20px;
48 | }
49 |
50 | QPushButton#Apple {
51 | font: 12pt "Comfortaa";
52 | font: bold;
53 | color: rgb(56, 84, 102);
54 | background-color: rgb(221, 235, 255);
55 | border: 5px solid #BBD6FF ;
56 | border-radius:20px;;
57 | }
58 |
59 | QPushButton#Apply:hover {
60 | font: 12pt "Comfortaa";
61 | font: bold;
62 | color: rgb(56, 84, 102);
63 | background-color: rgb(165, 199, 250);
64 | border: 5px solid #75ACFF;
65 | border-radius:20px;
66 | }
67 |
68 |
69 | QPushButton#Apply:pressed {
70 | font: 12pt "Comfortaa";
71 | font: bold;
72 | color: rgb(56, 84, 102);
73 | background-color: rgb(165, 199, 250);
74 | border: 5px solid #75ACFF;
75 | border-radius:20px;
76 | }
77 |
78 |
79 | Готово
80 |
81 |
82 |
83 |
84 |
85 | 100
86 | 60
87 | 91
88 | 31
89 |
90 |
91 |
92 | font: 12pt "Comfortaa";
93 | font: bold;
94 | color: rgb(56, 84, 102);
95 | border: 5px solid #BBD6FF ;
96 | border-top: transparent;
97 | border-left: transparent;
98 | border-right: transparent;
99 |
100 |
101 | Название
102 |
103 |
104 | Qt::AlignCenter
105 |
106 |
107 |
108 |
109 |
110 | 0
111 | 0
112 | 301
113 | 221
114 |
115 |
116 |
117 | background-color :rgb(255, 255, 255);
118 | border-radius: 20px;
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | 80
128 | 10
129 | 131
130 | 31
131 |
132 |
133 |
134 | font: 12pt "Comfortaa";
135 | font: bold;
136 | color: rgb(56, 84, 102);
137 | border: 5px solid #BBD6FF ;
138 | border-top: transparent;
139 | border-left: transparent;
140 | border-right: transparent;
141 |
142 |
143 | Поставщики
144 |
145 |
146 | Qt::AlignCenter
147 |
148 |
149 |
150 |
151 |
152 | 0
153 | 0
154 | 1141
155 | 311
156 |
157 |
158 |
159 | background-color:rgb(221, 235, 255);
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | 50
169 | 100
170 | 201
171 | 51
172 |
173 |
174 |
175 | font: 12pt "Comfortaa";
176 | font: bold;
177 | color: rgb(56, 84, 102);
178 | background-color: rgb(221, 235, 255);
179 | border: 5px solid #BBD6FF ;
180 | border-top-left-radius: 20px;
181 | border-top-right-radius:0px;
182 | border-bottom-left-radius:0px;
183 | border-bottom-right-radius:20px;
184 |
185 |
186 | 30
187 |
188 |
189 | Qt::AlignCenter
190 |
191 |
192 | Background
193 | BackgroundRounded
194 | Name
195 | tableName
196 | Apply
197 | NameEnter
198 |
199 |
200 | NameEnter
201 | Apply
202 |
203 |
204 |
205 |
206 |
--------------------------------------------------------------------------------
/CRM/db_methods.h:
--------------------------------------------------------------------------------
1 | // Database methods for CRM application
2 | // Copyright(C) 2022 Plnguins
3 |
4 | // This program is free software : you can redistribute it and / or modify
5 | // it under the terms of the GNU Affero General Public License as published
6 | // by the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 |
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 | // GNU Affero General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Affero General Public License
15 | // along with this program.If not, see < https: // www.gnu.org/licenses/>.
16 | /*
17 | * Функции работы с СУБД
18 | */
19 | #pragma once
20 |
21 | #include
22 | #include
23 |
24 | #include
25 | #include
26 | #include
27 |
28 | #include "database-types/advertisement.h"
29 | #include "database-types/client.h"
30 | #include "database-types/deal.h"
31 | #include "database-types/employee.h"
32 | #include "database-types/laptop.h"
33 | #include "database-types/provider.h"
34 | #include "database-types/stock.h"
35 | #include "db_pool.h"
36 |
37 | class db_methods {
38 | public:
39 | static std::string hashPassword(const std::string& password);
40 |
41 | static std::vector> getStock(
42 | soci::session&, const int&,
43 | const int&); // Функция получения данных о товарах на складе
44 |
45 | static std::vector getProvider(
46 | soci::session&, const int&,
47 | const int&); // Функция получения данных о поставщиках
48 |
49 | static std::vector> getDeal(
50 | soci::session&, const int&,
51 | const int&); // Функция получения данных о сделках
52 |
53 | static std::vector getEmployee(
54 | soci::session&, const int&,
55 | const int&); // Функция получения данных о сотрудниках
56 |
57 | static std::vector getAdvertisement(
58 | soci::session&, const int&,
59 | const int&); // Функция получения данных о рекламе
60 |
61 | static std::vector getClient(
62 | soci::session&, const int&,
63 | const int&); // Функция получения данных о клиентах
64 |
65 | static std::vector getLaptop(
66 | soci::session&, const int&,
67 | const int&); // Функция получение данных о ноутбуках
68 |
69 | static void deleteClient(
70 | soci::session&,
71 | const std::vector&); // Функция удаления клиентов по ID
72 |
73 | static client getClient(
74 | soci::session&,
75 | const int&); // Функция получения данных о клиенте по ID
76 |
77 | static void updateClient(
78 | soci::session&, const client&); // Функция обновления данных о клиенте
79 |
80 | static void newClient(soci::session&,
81 | const client&); // Функция добавления клиента
82 |
83 | static void deleteProvider(
84 | soci::session&,
85 | const std::vector&); // Функция удаления поставщиков по ID
86 |
87 | static provider getProvider(
88 | soci::session&,
89 | const int&); // Функция получения данных о поставщике по ID
90 |
91 | static void updateProvider(
92 | soci::session&,
93 | const provider&); // Функция обновления данных о поставщике
94 |
95 | static void newProvider(soci::session&,
96 | const provider&); // Функция добавления поставщика
97 |
98 | static void deleteEmployee(
99 | soci::session&,
100 | const std::vector&); // Функция удаления сотрудников по ID
101 |
102 | static employee getEmployee(
103 | soci::session&,
104 | const int&); // Функция получения данных о сотруднике по ID
105 |
106 | static void updateEmployee(
107 | soci::session&,
108 | const employee&); // Функция обновления данных о сотруднике
109 |
110 | static int newEmployee(soci::session&,
111 | const employee&); // Функция добавления сотрудника
112 |
113 | static void deleteStock(
114 | soci::session&,
115 | const std::vector&); // Функция удаления товаров на складе по ID
116 |
117 | static void newStock(soci::session&,
118 | const stock&); // Функция добавления на склад
119 |
120 | static void deleteAd(
121 | soci::session&,
122 | const std::vector&); // Функция удаления рекламы по ID
123 |
124 | static advertisement getAd(
125 | soci::session&,
126 | const int&); // Функция получения данны о рекламе по ID
127 |
128 | static void updateAd(
129 | soci::session&,
130 | const advertisement&); // Функция обновления данных о рекламы
131 |
132 | static void newAd(soci::session&,
133 | const advertisement&); // Функция добавления рекламы
134 |
135 | static void deleteDeal(
136 | soci::session&,
137 | const std::vector&); // Функция удаления сделок по ID
138 |
139 | static deal getDeal(soci::session&,
140 | const int&); // Функция получения сделки по ID
141 |
142 | static void updateDeal(soci::session&,
143 | const deal&); // Функция обновления сделки
144 |
145 | static void newDeal(soci::session&,
146 | const deal&); // Функция добавления сделки
147 |
148 | static void deleteLaptop(
149 | soci::session&,
150 | const std::vector&); // Функция удаления ноутбуков по ID
151 |
152 | static laptop getLaptop(soci::session&,
153 | const int&); // Функций получения ноутбука по ID
154 |
155 | static void updateLaptop(
156 | soci::session&, const laptop&); // Функция обновления данных о ноутбуке
157 |
158 | static void newLaptop(soci::session&,
159 | const laptop&); // Функция добавления ноутбука
160 |
161 | static std::vector getSeller(
162 | soci::session&); // Функция получения сотрудников продавцов
163 |
164 | static int row_count;
165 | };
166 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # CMake script for building project
2 | # Copyright (C) 2022 Plnguins
3 |
4 | # This program is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU Affero General Public License as published
6 | # by the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 |
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU Affero General Public License for more details.
13 |
14 | # You should have received a copy of the GNU Affero General Public License
15 | # along with this program. If not, see .
16 | IF(APPLE)
17 | cmake_minimum_required(VERSION 3.23) # Для сборки под macOS необходимо использовать версию CMake не ниже 3.23
18 | ELSE()
19 | cmake_minimum_required(VERSION 3.16)
20 | ENDIF()
21 |
22 | project("CRM" CXX) # Название проекта и язык
23 |
24 | # Указываем куда будут помещены собраные файлы
25 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib)
26 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib)
27 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)
28 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib)
29 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib)
30 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
31 |
32 | # Стандарт C++
33 | set(CMAKE_CXX_STANDARD 17)
34 |
35 | # Указываем, чтобы Boost не предупреждал о старой версии CMake, которая не знает последнюю версию Boost
36 | set(Boost_NO_WARN_NEW_VERSIONS 1)
37 |
38 | # Техническая переменная с типом сборке в нижнем регистре понадобится далее
39 | string(TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
40 |
41 | # Необходима OpenSSL для криптографии
42 | find_package(OpenSSL REQUIRED)
43 |
44 | # Необходима Boost для работы с СУБД
45 | find_package(Boost REQUIRED)
46 | message(STATUS "Boost version: ${Boost_VERSION}")
47 |
48 | # Необходим PostgreSQL
49 | find_package(PostgreSQL REQUIRED)
50 | include_directories(SYSTEM ${PostgreSQL_INCLUDE_DIRS})
51 |
52 | # Необходим Qt для работы с графическим интерфейсом
53 | find_package(Qt6 REQUIRED COMPONENTS Core Widgets Gui LinguistTools)
54 |
55 | # Включаем папки с Boost
56 | include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
57 |
58 | # Указываем путь к SOCI
59 | set(SOCI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/soci)
60 |
61 | # Опции для сборки SOCI
62 | option(SOCI_CXX11 "Build to the C++11 standard" ON)
63 | option(WITH_BOOST "Use Boost" ON)
64 | option(SOCI_TESTS "Don't build tests" OFF)
65 | option(SOCI_SHARED "Use shared lib" ON)
66 | option(SOCI_STATIC "Don't use static lib" OFF)
67 |
68 | # Какие СУБД нужны в SOCI
69 | option(WITH_POSTGRESQL "Build PostgreSQL backend" ON)
70 | option(WITH_ORACLE "" OFF)
71 | option(WITH_ODBC "" OFF)
72 | option(WITH_SQLITE3 "" OFF)
73 | option(WITH_FIREBIRD "" OFF)
74 | option(WITH_DB2 "" OFF)
75 | option(WITH_MYSQL "" OFF)
76 | option(SOCI_EMPTY "" OFF)
77 |
78 | # Добавляем папку с SOCI
79 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libs/soci ${SOCI_BINARY_DIR})
80 |
81 | # Использование ресурсов на Windows
82 | IF(WIN32)
83 | set(resources "${CMAKE_CURRENT_SOURCE_DIR}/resources/resources.rc")
84 | ENDIF()
85 |
86 | # Все исходные файлы приложения
87 | file(GLOB_RECURSE SRC "CRM/*.h" "CRM/*.cpp" "CRM/*.ui" "resources/*.qrc")
88 |
89 | # MacOS спецефичные файлы
90 | set(MACOSX_BUNDLE_ICON_FILE main.icns)
91 | set(MACOSX_BUNDLE_EXECUTABLE_NAME CRM)
92 | set(MACOSX_BUNDLE_BUNDLE_NAME CRM)
93 | set(app_icon_macos "${CMAKE_CURRENT_SOURCE_DIR}/resources/main.icns")
94 | set_source_files_properties(${app_icon_macos} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
95 |
96 | # Добавления цели сборки в зависимости от платформы
97 | IF(WIN32)
98 | add_executable(CRM WIN32 ${SRC} ${resources})
99 | ELSEIF(APPLE)
100 | add_executable(CRM MACOSX_BUNDLE ${app_icon_macos} ${SRC} ${resources})
101 | ELSE()
102 | add_executable(CRM ${SRC} ${resources})
103 | ENDIF()
104 |
105 | # Файлы перевода, их обновление, сборка и добавление в сборку
106 | qt_add_lupdate(CRM TS_FILES ${CMAKE_SOURCE_DIR}/resources/translation/crm_ru.ts ${CMAKE_SOURCE_DIR}/resources/translation/crm_en.ts SOURCES ${SRC} INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/CRM OPTIONS "-noobsolete")
107 | qt_add_lrelease(CRM TS_FILES ${CMAKE_SOURCE_DIR}/resources/translation/crm_ru.ts ${CMAKE_SOURCE_DIR}/resources/translation/crm_en.ts QM_FILES_OUTPUT_VARIABLE qm_files)
108 | qt_add_resources(CRM "translation" PREFIX "/i18n" BASE "${CMAKE_CURRENT_BINARY_DIR}" FILES "${qm_files}")
109 |
110 | # Автоматическое преобразование форм в код, добавление ресурсов в сборку
111 | set_target_properties(CRM PROPERTIES AUTOMOC TRUE AUTOUIC TRUE AUTORCC TRUE)
112 |
113 | # Линковка всех библиотек к цели сборки
114 | target_link_libraries(CRM ${Boost_LIBRARIES})
115 | target_include_directories(CRM PRIVATE ${SOCI_BINARY_DIR}/include)
116 | target_link_libraries(CRM PRIVATE Soci::core Soci::postgresql)
117 | target_link_libraries(CRM PRIVATE Qt6::Core Qt6::Widgets Qt::Gui)
118 | target_link_libraries(CRM PRIVATE OpenSSL::SSL)
119 |
120 | # Дополнительные опции для сборки под разными платформами
121 | set_target_properties(CRM PROPERTIES WIN32_EXECUTABLE ON MACOSX_BUNDLE ON)
122 |
123 | # Дополнительные переменные для Qt
124 | get_target_property(QtCore_LOCATION Qt6::Core LOCATION)
125 | get_filename_component(QT_DLL_DIR ${QtCore_LOCATION} PATH)
126 |
127 | IF(WIN32)
128 | # Копирование всех dll в папку сборки
129 | add_custom_command(TARGET CRM POST_BUILD
130 | COMMAND ${QT_DLL_DIR}/windeployqt.exe ${CMAKE_BINARY_DIR}/bin/CRM.exe --${BUILD_TYPE}
131 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
132 | COMMENT "Copying libraries")
133 |
134 | # Копирование всей сборки в папку для установщика
135 | add_custom_command(TARGET CRM POST_BUILD
136 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/bin ${CMAKE_SOURCE_DIR}/packages/com.pinguins.crm/data)
137 | ENDIF()
138 |
139 | IF(APPLE)
140 | # Копирование dylib в папку сборки и создание dmg образа
141 | add_custom_command(TARGET CRM POST_BUILD
142 | COMMAND ${QT6_INSTALL_PREFIX}/bin/macdeployqt CRM.app -dmg
143 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
144 | COMMENT "Creating dmg")
145 | ENDIF()
146 |
147 | # Копирование лицензии в папку для установщика
148 | add_custom_command(TARGET CRM POST_BUILD
149 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/LICENSE.txt ${CMAKE_SOURCE_DIR}/packages/com.pinguins.crm/meta/LICENSE.txt)
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Gitignore for this project, based on https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
2 | # Copyright (C) 2022 Plnguins
3 |
4 | # This program is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU Affero General Public License as published
6 | # by the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 |
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU Affero General Public License for more details.
13 |
14 | # You should have received a copy of the GNU Affero General Public License
15 | # along with this program. If not, see .
16 | packages/com.pinguins.crm/data
17 | packages/com.pinguins.crm/meta/LICENSE.txt
18 | CMakePresets.json
19 |
20 | # User-specific files
21 | *.rsuser
22 | *.suo
23 | *.user
24 | *.userosscache
25 | *.sln.docstates
26 |
27 | # User-specific files (MonoDevelop/Xamarin Studio)
28 | *.userprefs
29 |
30 | # Mono auto generated files
31 | mono_crash.*
32 |
33 | # Build results
34 | [Dd]ebug/
35 | [Dd]ebugPublic/
36 | [Rr]elease/
37 | [Rr]eleases/
38 | x64/
39 | x86/
40 | [Ww][Ii][Nn]32/
41 | [Aa][Rr][Mm]/
42 | [Aa][Rr][Mm]64/
43 | bld/
44 | [Bb]in/
45 | [Oo]bj/
46 | [Oo]ut/
47 | [Ll]og/
48 | [Ll]ogs/
49 |
50 | # Visual Studio 2015/2017 cache/options directory
51 | .vs/
52 | .vscode/
53 |
54 | # Visual Studio 2017 auto generated files
55 | Generated\ Files/
56 |
57 | # MSTest test Results
58 | [Tt]est[Rr]esult*/
59 | [Bb]uild[Ll]og.*
60 |
61 | # NUnit
62 | *.VisualState.xml
63 | TestResult.xml
64 | nunit-*.xml
65 |
66 | # Build Results of an ATL Project
67 | [Dd]ebugPS/
68 | [Rr]eleasePS/
69 | dlldata.c
70 |
71 | # Benchmark Results
72 | BenchmarkDotNet.Artifacts/
73 |
74 | StyleCopReport.xml
75 |
76 | # Files built by Visual Studio
77 | *_i.c
78 | *_p.c
79 | *_h.h
80 | *.ilk
81 | *.meta
82 | *.obj
83 | *.iobj
84 | *.pch
85 | *.pdb
86 | *.ipdb
87 | *.pgc
88 | *.pgd
89 | *.rsp
90 | *.sbr
91 | *.tlb
92 | *.tli
93 | *.tlh
94 | *.tmp
95 | *.tmp_proj
96 | *_wpftmp.csproj
97 | *.log
98 | *.vspscc
99 | *.vssscc
100 | .builds
101 | *.pidb
102 | *.svclog
103 | *.scc
104 |
105 | # Visual C++ cache files
106 | ipch/
107 | *.aps
108 | *.ncb
109 | *.opendb
110 | *.opensdf
111 | *.sdf
112 | *.cachefile
113 | *.VC.db
114 | *.VC.VC.opendb
115 |
116 | # Visual Studio profiler
117 | *.psess
118 | *.vsp
119 | *.vspx
120 | *.sap
121 |
122 | # Visual Studio Trace Files
123 | *.e2e
124 |
125 | # TFS 2012 Local Workspace
126 | $tf/
127 |
128 | # Guidance Automation Toolkit
129 | *.gpState
130 |
131 | # TeamCity is a build add-in
132 | _TeamCity*
133 |
134 | # DotCover is a Code Coverage Tool
135 | *.dotCover
136 |
137 | # AxoCover is a Code Coverage Tool
138 | .axoCover/*
139 | !.axoCover/settings.json
140 |
141 | # Coverlet is a free, cross platform Code Coverage Tool
142 | coverage*.json
143 | coverage*.xml
144 | coverage*.info
145 |
146 | # Visual Studio code coverage results
147 | *.coverage
148 | *.coveragexml
149 |
150 | # NCrunch
151 | _NCrunch_*
152 | .*crunch*.local.xml
153 | nCrunchTemp_*
154 |
155 | # MightyMoose
156 | *.mm.*
157 | AutoTest.Net/
158 |
159 | # Web workbench (sass)
160 | .sass-cache/
161 |
162 | # Installshield output folder
163 | [Ee]xpress/
164 |
165 | # DocProject is a documentation generator add-in
166 | DocProject/buildhelp/
167 | DocProject/Help/*.HxT
168 | DocProject/Help/*.HxC
169 | DocProject/Help/*.hhc
170 | DocProject/Help/*.hhk
171 | DocProject/Help/*.hhp
172 | DocProject/Help/Html2
173 | DocProject/Help/html
174 |
175 | # Click-Once directory
176 | publish/
177 |
178 | # Publish Web Output
179 | *.[Pp]ublish.xml
180 | *.azurePubxml
181 | # Note: Comment the next line if you want to checkin your web deploy settings,
182 | # but database connection strings (with potential passwords) will be unencrypted
183 | *.pubxml
184 | *.publishproj
185 |
186 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
187 | # checkin your Azure Web App publish settings, but sensitive information contained
188 | # in these scripts will be unencrypted
189 | PublishScripts/
190 |
191 | # Microsoft Azure Build Output
192 | csx/
193 | *.build.csdef
194 |
195 | # Microsoft Azure Emulator
196 | ecf/
197 | rcf/
198 |
199 | # Windows Store app package directories and files
200 | AppPackages/
201 | BundleArtifacts/
202 | Package.StoreAssociation.xml
203 | _pkginfo.txt
204 | *.appx
205 | *.appxbundle
206 | *.appxupload
207 |
208 | # Visual Studio cache files
209 | # files ending in .cache can be ignored
210 | *.[Cc]ache
211 | # but keep track of directories ending in .cache
212 | !?*.[Cc]ache/
213 |
214 | # Others
215 | ClientBin/
216 | ~$*
217 | *~
218 | *.dbmdl
219 | *.dbproj.schemaview
220 | *.jfm
221 | *.pfx
222 | *.publishsettings
223 | orleans.codegen.cs
224 |
225 | # RIA/Silverlight projects
226 | Generated_Code/
227 |
228 | # Backup & report files from converting an old project file
229 | # to a newer Visual Studio version. Backup files are not needed,
230 | # because we have git ;-)
231 | _UpgradeReport_Files/
232 | Backup*/
233 | UpgradeLog*.XML
234 | UpgradeLog*.htm
235 | ServiceFabricBackup/
236 | *.rptproj.bak
237 |
238 | # SQL Server files
239 | *.mdf
240 | *.ldf
241 | *.ndf
242 |
243 | # Business Intelligence projects
244 | *.rdl.data
245 | *.bim.layout
246 | *.bim_*.settings
247 | *.rptproj.rsuser
248 | *- [Bb]ackup.rdl
249 | *- [Bb]ackup ([0-9]).rdl
250 | *- [Bb]ackup ([0-9][0-9]).rdl
251 |
252 | # Microsoft Fakes
253 | FakesAssemblies/
254 |
255 | # GhostDoc plugin setting file
256 | *.GhostDoc.xml
257 |
258 | # Visual Studio 6 build log
259 | *.plg
260 |
261 | # Visual Studio 6 workspace options file
262 | *.opt
263 |
264 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
265 | *.vbw
266 |
267 | # Visual Studio LightSwitch build output
268 | **/*.HTMLClient/GeneratedArtifacts
269 | **/*.DesktopClient/GeneratedArtifacts
270 | **/*.DesktopClient/ModelManifest.xml
271 | **/*.Server/GeneratedArtifacts
272 | **/*.Server/ModelManifest.xml
273 | _Pvt_Extensions
274 |
275 | # Paket dependency manager
276 | .paket/paket.exe
277 | paket-files/
278 |
279 | # CodeRush personal settings
280 | .cr/personal
281 |
282 | # Python Tools for Visual Studio (PTVS)
283 | __pycache__/
284 | *.pyc
285 |
286 | # Cake - Uncomment if you are using it
287 | # tools/**
288 | # !tools/packages.config
289 |
290 | # Tabs Studio
291 | *.tss
292 |
293 | # Telerik's JustMock configuration file
294 | *.jmconfig
295 |
296 | # BizTalk build output
297 | *.btp.cs
298 | *.btm.cs
299 | *.odx.cs
300 | *.xsd.cs
301 |
302 | # OpenCover UI analysis results
303 | OpenCover/
304 |
305 | # Azure Stream Analytics local run output
306 | ASALocalRun/
307 |
308 | # MSBuild Binary and Structured Log
309 | *.binlog
310 |
311 | # NVidia Nsight GPU debugger configuration file
312 | *.nvuser
313 |
314 | # Local History for Visual Studio
315 | .localhistory/
316 |
317 | # BeatPulse healthcheck temp database
318 | healthchecksdb
319 |
320 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
321 | MigrationBackup/
322 |
323 | # Fody - auto-generated XML schema
324 | FodyWeavers.xsd
325 |
--------------------------------------------------------------------------------
/CRM/login/login.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | loginUi
19 |
20 |
21 |
22 | 0
23 | 0
24 | 300
25 | 233
26 |
27 |
28 |
29 | Вход
30 |
31 |
32 |
33 |
34 | 80
35 | 140
36 | 111
37 | 31
38 |
39 |
40 |
41 | QPushButton#LoginButton{
42 | font: 10pt "Comfortaa";
43 | font: bold;
44 | color: rgb(56, 84, 102);
45 | background-color: rgb(238, 246, 255);
46 | border: 2px solid #DDEBFF;
47 | border-radius:10px;
48 | }
49 |
50 | QPushButton#LoginButton:hover{
51 | font: 10pt "Comfortaa";
52 | font: bold;
53 | color: rgb(56, 84, 102);
54 | background-color: rgb(214, 233, 255);
55 | border: 2px solid #BBD6FF;
56 | border-radius:10px;
57 | }
58 |
59 |
60 |
61 |
62 | Войти
63 |
64 |
65 | true
66 |
67 |
68 | true
69 |
70 |
71 |
72 |
73 |
74 | 110
75 | 200
76 | 81
77 | 16
78 |
79 |
80 |
81 | font: 10pt "Comfortaa";
82 | font: light;
83 | color: rgb(56, 84, 102);
84 |
85 |
86 | Pinguins.Inc
87 |
88 |
89 |
90 |
91 |
92 | 0
93 | 10
94 | 301
95 | 31
96 |
97 |
98 |
99 | font: 14pt "Comfortaa";
100 | font: bold;
101 | color: rgb(56, 84, 102);
102 |
103 |
104 | Войдите в систему
105 |
106 |
107 | Qt::AlignCenter
108 |
109 |
110 |
111 |
112 |
113 | 80
114 | 90
115 | 161
116 | 31
117 |
118 |
119 |
120 | font: 10pt "Comfortaa";
121 | font: bold;
122 | color: rgb(56, 84, 102);
123 | border:3px solid #DDEBFF;
124 | border-radius: 10px;
125 |
126 |
127 | 30
128 |
129 |
130 | QLineEdit::Password
131 |
132 |
133 | Пароль
134 |
135 |
136 |
137 |
138 |
139 | 80
140 | 50
141 | 161
142 | 31
143 |
144 |
145 |
146 | font: 10pt "Comfortaa";
147 | font: bold;
148 | color: rgb(56, 84, 102);
149 | border:3px solid #DDEBFF;
150 | border-radius: 10px;
151 |
152 |
153 | 30
154 |
155 |
156 | Логин
157 |
158 |
159 |
160 |
161 |
162 | 10
163 | 50
164 | 51
165 | 31
166 |
167 |
168 |
169 | font: 10pt "Comfortaa";
170 | font: bold;
171 | color: rgb(56, 84, 102);
172 |
173 |
174 | Логин:
175 |
176 |
177 |
178 |
179 |
180 | 210
181 | 93
182 | 24
183 | 24
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 | :/images/openEye.png
192 | :/images/closeEye.png
193 |
194 |
195 |
196 |
197 | 20
198 | 20
199 |
200 |
201 |
202 | true
203 |
204 |
205 | true
206 |
207 |
208 | true
209 |
210 |
211 |
212 |
213 |
214 | 10
215 | 90
216 | 71
217 | 31
218 |
219 |
220 |
221 | font: 10pt "Comfortaa";
222 | font: bold;
223 | color: rgb(56, 84, 102);
224 |
225 |
226 | Пароль:
227 |
228 |
229 |
230 |
231 |
232 | 0
233 | 0
234 | 301
235 | 231
236 |
237 |
238 |
239 | border-radius:20px;
240 | background-color: rgb(255, 255, 255);
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 | -60
250 | -60
251 | 441
252 | 371
253 |
254 |
255 |
256 | background-color:rgb(221, 235, 255);
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 | 210
266 | 140
267 | 31
268 | 31
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 | :/images/settings.png
277 | :/images/settings.png:/images/settings.png
278 |
279 |
280 |
281 | 22
282 | 22
283 |
284 |
285 |
286 | true
287 |
288 |
289 | label_4
290 | label_6
291 | LoginButton
292 | Company
293 | Title
294 | Password
295 | Login
296 | LoginLabel
297 | ShowPassword
298 | PasswordLabel
299 | Settings
300 |
301 |
302 | Login
303 | Password
304 | ShowPassword
305 | LoginButton
306 |
307 |
308 |
309 |
310 |
311 |
312 |
--------------------------------------------------------------------------------
/CRM/editUI/editAd.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | editAd
19 |
20 |
21 |
22 | 0
23 | 0
24 | 471
25 | 221
26 |
27 |
28 |
29 | Реклама
30 |
31 |
32 |
33 |
34 | 0
35 | 0
36 | 471
37 | 221
38 |
39 |
40 |
41 | background-color :rgb(255, 255, 255);
42 | border-radius: 20px;
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 190
52 | 10
53 | 91
54 | 31
55 |
56 |
57 |
58 | font: 12pt "Comfortaa";
59 | font: bold;
60 | color: rgb(56, 84, 102);
61 | border: 5px solid #BBD6FF ;
62 | border-top: transparent;
63 | border-left: transparent;
64 | border-right: transparent;
65 |
66 |
67 | Реклама
68 |
69 |
70 | Qt::AlignCenter
71 |
72 |
73 |
74 |
75 |
76 | 270
77 | 60
78 | 161
79 | 31
80 |
81 |
82 |
83 | font: 12pt "Comfortaa";
84 | font: bold;
85 | color: rgb(56, 84, 102);
86 | border: 5px solid #BBD6FF ;
87 | border-top: transparent;
88 | border-left: transparent;
89 | border-right: transparent;
90 |
91 |
92 | Комментарии
93 |
94 |
95 | Qt::AlignCenter
96 |
97 |
98 |
99 |
100 |
101 | 140
102 | 100
103 | 111
104 | 51
105 |
106 |
107 |
108 | font: 12pt "Comfortaa";
109 | font: bold;
110 | color: rgb(56, 84, 102);
111 | background-color: rgb(221, 235, 255);
112 | border: 5px solid #BBD6FF ;
113 | border-radius:0px;
114 |
115 |
116 | 00000000
117 |
118 |
119 | 8
120 |
121 |
122 | Qt::AlignCenter
123 |
124 |
125 |
126 |
127 |
128 | 250
129 | 100
130 | 201
131 | 51
132 |
133 |
134 |
135 | font: 12pt "Comfortaa";
136 | font: bold;
137 | color: rgb(56, 84, 102);
138 | background-color: rgb(221, 235, 255);
139 | border: 5px solid #BBD6FF ;
140 | border-top-left-radius: 0px;
141 | border-top-right-radius:0px;
142 | border-bottom-left-radius:0px;
143 | border-bottom-right-radius:20px;
144 |
145 |
146 | 30
147 |
148 |
149 | Qt::AlignCenter
150 |
151 |
152 |
153 |
154 |
155 | 160
156 | 60
157 | 81
158 | 31
159 |
160 |
161 |
162 | font: 12pt "Comfortaa";
163 | font: bold;
164 | color: rgb(56, 84, 102);
165 | border: 5px solid #BBD6FF ;
166 | border-top: transparent;
167 | border-left: transparent;
168 | border-right: transparent;
169 |
170 |
171 | Бюджет
172 |
173 |
174 | Qt::AlignCenter
175 |
176 |
177 |
178 |
179 |
180 | -100
181 | -50
182 | 1141
183 | 311
184 |
185 |
186 |
187 | background-color:rgb(221, 235, 255);
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 | 20
197 | 60
198 | 111
199 | 31
200 |
201 |
202 |
203 | font: 12pt "Comfortaa";
204 | font: bold;
205 | color: rgb(56, 84, 102);
206 | border: 5px solid #BBD6FF ;
207 | border-top: transparent;
208 | border-left: transparent;
209 | border-right: transparent;
210 |
211 |
212 | Платформа
213 |
214 |
215 | Qt::AlignCenter
216 |
217 |
218 |
219 |
220 |
221 | 170
222 | 170
223 | 131
224 | 41
225 |
226 |
227 |
228 | QPushButton#Apply:!pressed {
229 | font: 12pt "Comfortaa";
230 | font: bold;
231 | color: rgb(56, 84, 102);
232 | background-color: rgb(221, 235, 255);
233 | border: 5px solid #BBD6FF ;
234 | border-radius:20px;
235 | }
236 |
237 | QPushButton#Apply {
238 | font: 12pt "Comfortaa";
239 | font: bold;
240 | color: rgb(56, 84, 102);
241 | background-color: rgb(221, 235, 255);
242 | border: 5px solid #BBD6FF ;
243 | border-radius:20px;;
244 | }
245 |
246 | QPushButton#Apply:hover {
247 | font: 12pt "Comfortaa";
248 | font: bold;
249 | color: rgb(56, 84, 102);
250 | background-color: rgb(165, 199, 250);
251 | border: 5px solid #75ACFF;
252 | border-radius:20px;
253 | }
254 |
255 |
256 | QPushButton#Apply:pressed {
257 | font: 12pt "Comfortaa";
258 | font: bold;
259 | color: rgb(56, 84, 102);
260 | background-color: rgb(165, 199, 250);
261 | border: 5px solid #75ACFF;
262 | border-radius:20px;
263 | }
264 |
265 |
266 | Готово
267 |
268 |
269 |
270 |
271 |
272 | 10
273 | 100
274 | 131
275 | 51
276 |
277 |
278 |
279 | font: 12pt "Comfortaa";
280 | font: bold;
281 | color: rgb(56, 84, 102);
282 | background-color: rgb(221, 235, 255);
283 | border: 5px solid #BBD6FF ;
284 | border-top-left-radius: 20px;
285 | border-top-right-radius:0px;
286 | border-bottom-left-radius:0px;
287 | border-bottom-right-radius:0px;
288 |
289 |
290 | 30
291 |
292 |
293 | Qt::AlignCenter
294 |
295 |
296 | Background
297 | BackgroundRounded
298 | tableName
299 | Apply
300 | Platform
301 | Budget
302 | Comments
303 | BudgetEnter
304 | CommentsEnter
305 | PlatformEnter
306 |
307 |
308 | PlatformEnter
309 | BudgetEnter
310 | CommentsEnter
311 | Apply
312 |
313 |
314 |
315 |
316 |
--------------------------------------------------------------------------------
/CRM/editUI/editStock.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | editStock
19 |
20 |
21 |
22 | 0
23 | 0
24 | 652
25 | 221
26 |
27 |
28 |
29 | Склад
30 |
31 |
32 |
33 |
34 | 250
35 | 170
36 | 131
37 | 41
38 |
39 |
40 |
41 | QPushButton#Apply:!pressed {
42 | font: 12pt "Comfortaa";
43 | font: bold;
44 | color: rgb(56, 84, 102);
45 | background-color: rgb(221, 235, 255);
46 | border: 5px solid #BBD6FF ;
47 | border-radius:20px;
48 | }
49 |
50 | QPushButton#Apple {
51 | font: 12pt "Comfortaa";
52 | font: bold;
53 | color: rgb(56, 84, 102);
54 | background-color: rgb(221, 235, 255);
55 | border: 5px solid #BBD6FF ;
56 | border-radius:20px;;
57 | }
58 |
59 | QPushButton#Apply:hover {
60 | font: 12pt "Comfortaa";
61 | font: bold;
62 | color: rgb(56, 84, 102);
63 | background-color: rgb(165, 199, 250);
64 | border: 5px solid #75ACFF;
65 | border-radius:20px;
66 | }
67 |
68 |
69 | QPushButton#Apply:pressed {
70 | font: 12pt "Comfortaa";
71 | font: bold;
72 | color: rgb(56, 84, 102);
73 | background-color: rgb(165, 199, 250);
74 | border: 5px solid #75ACFF;
75 | border-radius:20px;
76 | }
77 |
78 |
79 | Готово
80 |
81 |
82 |
83 |
84 |
85 | 0
86 | 0
87 | 1141
88 | 311
89 |
90 |
91 |
92 | background-color:rgb(221, 235, 255);
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | 280
102 | 10
103 | 71
104 | 31
105 |
106 |
107 |
108 | font: 12pt "Comfortaa";
109 | font: bold;
110 | color: rgb(56, 84, 102);
111 | border: 5px solid #BBD6FF ;
112 | border-top: transparent;
113 | border-left: transparent;
114 | border-right: transparent;
115 |
116 |
117 | Склад
118 |
119 |
120 | Qt::AlignCenter
121 |
122 |
123 |
124 |
125 |
126 | 50
127 | 60
128 | 81
129 | 31
130 |
131 |
132 |
133 | font: 12pt "Comfortaa";
134 | font: bold;
135 | color: rgb(56, 84, 102);
136 | border: 5px solid #BBD6FF ;
137 | border-top: transparent;
138 | border-left: transparent;
139 | border-right: transparent;
140 |
141 |
142 | Ноутбук
143 |
144 |
145 | Qt::AlignCenter
146 |
147 |
148 |
149 |
150 |
151 | 0
152 | 0
153 | 651
154 | 221
155 |
156 |
157 |
158 | background-color :rgb(255, 255, 255);
159 | border-radius: 20px;
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | 210
169 | 60
170 | 61
171 | 31
172 |
173 |
174 |
175 | font: 12pt "Comfortaa";
176 | font: bold;
177 | color: rgb(56, 84, 102);
178 | border: 5px solid #BBD6FF ;
179 | border-top: transparent;
180 | border-left: transparent;
181 | border-right: transparent;
182 |
183 |
184 | Цена
185 |
186 |
187 | Qt::AlignCenter
188 |
189 |
190 |
191 |
192 |
193 | 170
194 | 100
195 | 141
196 | 51
197 |
198 |
199 |
200 | font: 12pt "Comfortaa";
201 | font: bold;
202 | color: rgb(56, 84, 102);
203 | background-color: rgb(221, 235, 255);
204 | border: 5px solid #BBD6FF ;
205 | border-radius:0px;
206 |
207 |
208 | 000000000
209 |
210 |
211 | 9
212 |
213 |
214 | Qt::AlignCenter
215 |
216 |
217 |
218 |
219 |
220 | 320
221 | 60
222 | 111
223 | 31
224 |
225 |
226 |
227 | font: 12pt "Comfortaa";
228 | font: bold;
229 | color: rgb(56, 84, 102);
230 | border: 5px solid #BBD6FF ;
231 | border-top: transparent;
232 | border-left: transparent;
233 | border-right: transparent;
234 |
235 |
236 | Количество
237 |
238 |
239 | Qt::AlignCenter
240 |
241 |
242 |
243 |
244 |
245 | 310
246 | 100
247 | 141
248 | 51
249 |
250 |
251 |
252 | font: 12pt "Comfortaa";
253 | font: bold;
254 | color: rgb(56, 84, 102);
255 | background-color: rgb(221, 235, 255);
256 | border: 5px solid #BBD6FF ;
257 | border-radius:0px;
258 |
259 |
260 | 000000000
261 |
262 |
263 | 9
264 |
265 |
266 | Qt::AlignCenter
267 |
268 |
269 |
270 |
271 |
272 | 490
273 | 60
274 | 101
275 | 31
276 |
277 |
278 |
279 | font: 12pt "Comfortaa";
280 | font: bold;
281 | color: rgb(56, 84, 102);
282 | border: 5px solid #BBD6FF ;
283 | border-top: transparent;
284 | border-left: transparent;
285 | border-right: transparent;
286 |
287 |
288 | Поставщик
289 |
290 |
291 | Qt::AlignCenter
292 |
293 |
294 |
295 |
296 |
297 | 10
298 | 100
299 | 161
300 | 51
301 |
302 |
303 |
304 | QComboBox{
305 | font: 12pt "Comfortaa";
306 | font: bold;
307 | color: rgb(56, 84, 102);
308 | background-color: rgb(221, 235, 255);
309 | border: 5px solid #BBD6FF ;
310 | border-top-left-radius: 20px;
311 | border-top-right-radius:0px;
312 | border-bottom-left-radius:0px;
313 | border-bottom-right-radius:0px;
314 | }
315 |
316 | QComboBox::drop-down {
317 |
318 | border-left: 3px solid #BBD6FF ;
319 | border-top-left-radius: 3px; /* same radius as the QComboBox */
320 | border-bottom-left-radius: 3px;
321 | }
322 |
323 | QComboBox::down-arrow:!on {
324 | image: url(":/images/downArrow.png");
325 | }
326 |
327 | QComboBox::down-arrow:on {
328 | image: url(":/images/upArrow.png");
329 | }
330 |
331 |
332 |
333 | QComboBox QAbstractItemView {
334 | border: 5px solid #BBD6FF ;
335 | background-color: rgb(221, 235, 255);
336 | border-bottom-left-radius:5px;
337 | border-bottom-right-radius:5px;
338 | border-top-left-radius:0px;
339 | border-top-right-radius:0px;
340 | }
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 | 450
354 | 100
355 | 191
356 | 51
357 |
358 |
359 |
360 | QComboBox{
361 | font: 12pt "Comfortaa";
362 | font: bold;
363 | color: rgb(56, 84, 102);
364 | background-color: rgb(221, 235, 255);
365 | border: 5px solid #BBD6FF ;
366 | border-radius:0px;
367 | border-top-left-radius: 0px;
368 | border-top-right-radius:0px;
369 | border-bottom-left-radius:0px;
370 | border-bottom-right-radius:20px;
371 | }
372 |
373 | QComboBox::drop-down {
374 |
375 | border-left: 3px solid #BBD6FF ;
376 | border-top-left-radius: 3px; /* same radius as the QComboBox */
377 | border-bottom-left-radius: 3px;
378 | }
379 |
380 | QComboBox::down-arrow:!on {
381 | image: url(":/images/downArrow.png");
382 | }
383 |
384 | QComboBox::down-arrow:on {
385 | image: url(":/images/upArrow.png");
386 | }
387 |
388 |
389 |
390 | QComboBox QAbstractItemView {
391 | border: 5px solid #BBD6FF ;
392 | background-color: rgb(221, 235, 255);
393 | border-bottom-left-radius:5px;
394 | border-bottom-right-radius:5px;
395 | border-top-left-radius:0px;
396 | border-top-right-radius:0px;
397 | }
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 | Background
408 | BackgroundRounded
409 | Apply
410 | Laptop
411 | tableName
412 | Price
413 | PriceEnter
414 | Number
415 | NumberEnter
416 | Vendor
417 | LaptopChange
418 | VendorChange
419 |
420 |
421 | LaptopChange
422 | PriceEnter
423 | NumberEnter
424 | VendorChange
425 | Apply
426 |
427 |
428 |
429 |
430 |
--------------------------------------------------------------------------------
/CRM/db_settings/db_settings.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | db_settingsUi
19 |
20 |
21 |
22 | 0
23 | 0
24 | 332
25 | 313
26 |
27 |
28 |
29 | Параметры СУБД
30 |
31 |
32 |
33 |
34 | 110
35 | 290
36 | 81
37 | 16
38 |
39 |
40 |
41 | font: 10pt "Comfortaa";
42 | font: light;
43 | color: rgb(56, 84, 102);
44 |
45 |
46 | Pinguins.Inc
47 |
48 |
49 |
50 |
51 |
52 | 0
53 | 10
54 | 331
55 | 31
56 |
57 |
58 |
59 | font: 14pt "Comfortaa";
60 | font: bold;
61 | color: rgb(56, 84, 102);
62 |
63 |
64 | Параметры СУБД
65 |
66 |
67 | Qt::AlignCenter
68 |
69 |
70 |
71 |
72 |
73 | 10
74 | 50
75 | 91
76 | 31
77 |
78 |
79 |
80 | font: 10pt "Comfortaa";
81 | font: bold;
82 | color: rgb(56, 84, 102);
83 |
84 |
85 | IP адрес:
86 |
87 |
88 |
89 |
90 |
91 | 0
92 | 0
93 | 331
94 | 311
95 |
96 |
97 |
98 | border-radius:20px;
99 | background-color: rgb(255, 255, 255);
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | 150
109 | 170
110 | 161
111 | 31
112 |
113 |
114 |
115 | font: 10pt "Comfortaa";
116 | font: bold;
117 | color: rgb(56, 84, 102);
118 | border:3px solid #DDEBFF;
119 | border-radius: 10px;
120 |
121 |
122 |
123 |
124 |
125 | 30
126 |
127 |
128 | QLineEdit::Password
129 |
130 |
131 | Пароль
132 |
133 |
134 |
135 |
136 |
137 | 0
138 | 0
139 | 441
140 | 371
141 |
142 |
143 |
144 | background-color:rgb(221, 235, 255);
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 | 150
154 | 50
155 | 161
156 | 31
157 |
158 |
159 |
160 | font: 10pt "Comfortaa";
161 | font: bold;
162 | color: rgb(56, 84, 102);
163 | border:3px solid #DDEBFF;
164 | border-radius: 10px;
165 |
166 |
167 |
168 |
169 |
170 | 30
171 |
172 |
173 | IP
174 |
175 |
176 |
177 |
178 |
179 | 100
180 | 250
181 | 101
182 | 31
183 |
184 |
185 |
186 | QPushButton#ApplyButton{
187 | font: 10pt "Comfortaa";
188 | font: bold;
189 | color: rgb(56, 84, 102);
190 | background-color: rgb(238, 246, 255);
191 | border: 2px solid #DDEBFF;
192 | border-radius:10px;
193 | }
194 |
195 | QPushButton#ApplyButton:hover{
196 | font: 10pt "Comfortaa";
197 | font: bold;
198 | color: rgb(56, 84, 102);
199 | background-color: rgb(214, 233, 255);
200 | border: 2px solid #BBD6FF;
201 | border-radius:10px;
202 | }
203 |
204 |
205 |
206 |
207 | Применить
208 |
209 |
210 | true
211 |
212 |
213 | true
214 |
215 |
216 |
217 |
218 |
219 | 150
220 | 90
221 | 161
222 | 31
223 |
224 |
225 |
226 | font: 10pt "Comfortaa";
227 | font: bold;
228 | color: rgb(56, 84, 102);
229 | border:3px solid #DDEBFF;
230 | border-radius: 10px;
231 |
232 |
233 |
234 |
235 |
236 | 30
237 |
238 |
239 | Порт
240 |
241 |
242 |
243 |
244 |
245 | 10
246 | 90
247 | 101
248 | 31
249 |
250 |
251 |
252 | font: 10pt "Comfortaa";
253 | font: bold;
254 | color: rgb(56, 84, 102);
255 |
256 |
257 | Порт:
258 |
259 |
260 |
261 |
262 |
263 | 150
264 | 130
265 | 161
266 | 31
267 |
268 |
269 |
270 | font: 10pt "Comfortaa";
271 | font: bold;
272 | color: rgb(56, 84, 102);
273 | border:3px solid #DDEBFF;
274 | border-radius: 10px;
275 |
276 |
277 |
278 |
279 |
280 | 30
281 |
282 |
283 | Логин
284 |
285 |
286 |
287 |
288 |
289 | 10
290 | 170
291 | 141
292 | 31
293 |
294 |
295 |
296 | font: 10pt "Comfortaa";
297 | font: bold;
298 | color: rgb(56, 84, 102);
299 |
300 |
301 | Пароль СУБД:
302 |
303 |
304 |
305 |
306 |
307 | 10
308 | 130
309 | 111
310 | 31
311 |
312 |
313 |
314 | font: 10pt "Comfortaa";
315 | font: bold;
316 | color: rgb(56, 84, 102);
317 |
318 |
319 | Логин СУБД:
320 |
321 |
322 |
323 |
324 |
325 | 10
326 | 210
327 | 111
328 | 31
329 |
330 |
331 |
332 | font: 10pt "Comfortaa";
333 | font: bold;
334 | color: rgb(56, 84, 102);
335 |
336 |
337 | Название БД:
338 |
339 |
340 |
341 |
342 |
343 | 150
344 | 210
345 | 161
346 | 31
347 |
348 |
349 |
350 | font: 10pt "Comfortaa";
351 | font: bold;
352 | color: rgb(56, 84, 102);
353 | border:3px solid #DDEBFF;
354 | border-radius: 10px;
355 |
356 |
357 |
358 |
359 |
360 | 30
361 |
362 |
363 | Название БД
364 |
365 |
366 |
367 |
368 |
369 | 280
370 | 173
371 | 24
372 | 24
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 | :/images/openEye.png
381 | :/images/closeEye.png
382 |
383 |
384 |
385 |
386 | 20
387 | 20
388 |
389 |
390 |
391 | true
392 |
393 |
394 | true
395 |
396 |
397 | true
398 |
399 |
400 | RoundedBackground
401 | BlueBackground
402 | DataBasePasswordEnter
403 | ApplyButton
404 | DataBaseNameEnter
405 | DataBasePortEnter
406 | DataBaseIPEnter
407 | DataBasePassword
408 | DataBaseLogin
409 | DataBaseLoginEnter
410 | DataBaseIP
411 | DataBaseName
412 | DataBasePort
413 | Company
414 | Title
415 | ShowPassword
416 |
417 |
418 | DataBaseIPEnter
419 | DataBasePortEnter
420 | DataBaseLoginEnter
421 | DataBasePasswordEnter
422 | ShowPassword
423 | DataBaseNameEnter
424 | ApplyButton
425 |
426 |
427 |
428 |
429 |
--------------------------------------------------------------------------------
/CRM/editUI/editEmployee.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | editEmployee
19 |
20 |
21 |
22 | 0
23 | 0
24 | 753
25 | 221
26 |
27 |
28 |
29 | Сотрудник
30 |
31 |
32 |
33 |
34 | 150
35 | 60
36 | 51
37 | 31
38 |
39 |
40 |
41 | font: 12pt "Comfortaa";
42 | font: bold;
43 | color: rgb(56, 84, 102);
44 | border: 5px solid #BBD6FF ;
45 | border-top: transparent;
46 | border-left: transparent;
47 | border-right: transparent;
48 |
49 |
50 | Имя
51 |
52 |
53 | Qt::AlignCenter
54 |
55 |
56 |
57 |
58 |
59 | 530
60 | 60
61 | 61
62 | 31
63 |
64 |
65 |
66 | font: 12pt "Comfortaa";
67 | font: bold;
68 | color: rgb(56, 84, 102);
69 | border: 5px solid #BBD6FF ;
70 | border-top: transparent;
71 | border-left: transparent;
72 | border-right: transparent;
73 |
74 |
75 | Логин
76 |
77 |
78 | Qt::AlignCenter
79 |
80 |
81 |
82 |
83 |
84 | 640
85 | 60
86 | 81
87 | 31
88 |
89 |
90 |
91 | font: 12pt "Comfortaa";
92 | font: bold;
93 | color: rgb(56, 84, 102);
94 | border: 5px solid #BBD6FF ;
95 | border-top: transparent;
96 | border-left: transparent;
97 | border-right: transparent;
98 |
99 |
100 | Пароль
101 |
102 |
103 | Qt::AlignCenter
104 |
105 |
106 |
107 |
108 |
109 | 20
110 | 60
111 | 91
112 | 31
113 |
114 |
115 |
116 | font: 12pt "Comfortaa";
117 | font: bold;
118 | color: rgb(56, 84, 102);
119 | border: 5px solid #BBD6FF ;
120 | border-top: transparent;
121 | border-left: transparent;
122 | border-right: transparent;
123 |
124 |
125 | Фамилия
126 |
127 |
128 | Qt::AlignCenter
129 |
130 |
131 |
132 |
133 |
134 | 620
135 | 100
136 | 121
137 | 51
138 |
139 |
140 |
141 | font: 12pt "Comfortaa";
142 | font: bold;
143 | color: rgb(56, 84, 102);
144 | background-color: rgb(221, 235, 255);
145 | border: 5px solid #BBD6FF ;
146 | border-top-left-radius: 0px;
147 | border-top-right-radius:0px;
148 | border-bottom-left-radius:0px;
149 | border-bottom-right-radius:20px;
150 |
151 |
152 | 30
153 |
154 |
155 | Qt::AlignCenter
156 |
157 |
158 |
159 |
160 |
161 | 500
162 | 100
163 | 121
164 | 51
165 |
166 |
167 |
168 | font: 12pt "Comfortaa";
169 | font: bold;
170 | color: rgb(56, 84, 102);
171 | background-color: rgb(221, 235, 255);
172 | border: 5px solid #BBD6FF ;
173 | border-radius:0px;
174 |
175 |
176 | 30
177 |
178 |
179 | Qt::AlignCenter
180 |
181 |
182 |
183 |
184 |
185 | 120
186 | 100
187 | 111
188 | 51
189 |
190 |
191 |
192 | font: 12pt "Comfortaa";
193 | font: bold;
194 | color: rgb(56, 84, 102);
195 | background-color: rgb(221, 235, 255);
196 | border: 5px solid #BBD6FF ;
197 | border-radius:0px;
198 |
199 |
200 | 30
201 |
202 |
203 | Qt::AlignCenter
204 |
205 |
206 |
207 |
208 |
209 | 230
210 | 60
211 | 111
212 | 31
213 |
214 |
215 |
216 | font: 12pt "Comfortaa";
217 | font: bold;
218 | color: rgb(56, 84, 102);
219 | border: 5px solid #BBD6FF ;
220 | border-top: transparent;
221 | border-left: transparent;
222 | border-right: transparent;
223 |
224 |
225 | Отчество
226 |
227 |
228 | Qt::AlignCenter
229 |
230 |
231 |
232 |
233 |
234 | 0
235 | 0
236 | 751
237 | 221
238 |
239 |
240 |
241 | background-color :rgb(255, 255, 255);
242 | border-radius: 20px;
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 | 240
252 | 170
253 | 131
254 | 41
255 |
256 |
257 |
258 | QPushButton#Apply:!pressed {
259 | font: 12pt "Comfortaa";
260 | font: bold;
261 | color: rgb(56, 84, 102);
262 | background-color: rgb(221, 235, 255);
263 | border: 5px solid #BBD6FF ;
264 | border-radius:20px;
265 | }
266 |
267 | QPushButton#Apply {
268 | font: 12pt "Comfortaa";
269 | font: bold;
270 | color: rgb(56, 84, 102);
271 | background-color: rgb(221, 235, 255);
272 | border: 5px solid #BBD6FF ;
273 | border-radius:20px;;
274 | }
275 |
276 | QPushButton#Apply:hover {
277 | font: 12pt "Comfortaa";
278 | font: bold;
279 | color: rgb(56, 84, 102);
280 | background-color: rgb(165, 199, 250);
281 | border: 5px solid #75ACFF;
282 | border-radius:20px;
283 | }
284 |
285 |
286 | QPushButton#Apply:pressed {
287 | font: 12pt "Comfortaa";
288 | font: bold;
289 | color: rgb(56, 84, 102);
290 | background-color: rgb(165, 199, 250);
291 | border: 5px solid #75ACFF;
292 | border-radius:20px;
293 | }
294 |
295 |
296 | Готово
297 |
298 |
299 |
300 |
301 |
302 | 0
303 | 0
304 | 1141
305 | 311
306 |
307 |
308 |
309 | background-color:rgb(221, 235, 255);
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 | 250
319 | 10
320 | 111
321 | 31
322 |
323 |
324 |
325 | font: 12pt "Comfortaa";
326 | font: bold;
327 | color: rgb(56, 84, 102);
328 | border: 5px solid #BBD6FF ;
329 | border-top: transparent;
330 | border-left: transparent;
331 | border-right: transparent;
332 |
333 |
334 | Сотрудник
335 |
336 |
337 | Qt::AlignCenter
338 |
339 |
340 |
341 |
342 |
343 | 10
344 | 100
345 | 111
346 | 51
347 |
348 |
349 |
350 | font: 12pt "Comfortaa";
351 | font: bold;
352 | color: rgb(56, 84, 102);
353 | background-color: rgb(221, 235, 255);
354 | border: 5px solid #BBD6FF ;
355 | border-top-left-radius: 20px;
356 | border-top-right-radius:0px;
357 | border-bottom-left-radius:0px;
358 | border-bottom-right-radius:0px;
359 |
360 |
361 | 30
362 |
363 |
364 | Qt::AlignCenter
365 |
366 |
367 |
368 |
369 |
370 | 230
371 | 100
372 | 111
373 | 51
374 |
375 |
376 |
377 | font: 12pt "Comfortaa";
378 | font: bold;
379 | color: rgb(56, 84, 102);
380 | background-color: rgb(221, 235, 255);
381 | border: 5px solid #BBD6FF ;
382 | border-radius:0px;
383 |
384 |
385 | 30
386 |
387 |
388 | Qt::AlignCenter
389 |
390 |
391 |
392 |
393 |
394 | 340
395 | 100
396 | 161
397 | 51
398 |
399 |
400 |
401 | QComboBox{
402 | font: 12pt "Comfortaa";
403 | font: bold;
404 | color: rgb(56, 84, 102);
405 | background-color: rgb(221, 235, 255);
406 | border: 5px solid #BBD6FF ;
407 | border-radius:0px;
408 | }
409 |
410 | QComboBox::drop-down {
411 |
412 | border-left: 3px solid #BBD6FF ;
413 | border-top-left-radius: 3px; /* same radius as the QComboBox */
414 | border-bottom-left-radius: 3px;
415 | }
416 |
417 | QComboBox::down-arrow:!on {
418 | image: url(":/images/downArrow.png");
419 | }
420 |
421 | QComboBox::down-arrow:on {
422 | image: url(":/images/upArrow.png");
423 | }
424 |
425 |
426 |
427 | QComboBox QAbstractItemView {
428 | border: 5px solid #BBD6FF ;
429 | background-color: rgb(221, 235, 255);
430 | border-bottom-left-radius:5px;
431 | border-bottom-right-radius:5px;
432 | border-top-left-radius:0px;
433 | border-top-right-radius:0px;
434 | }
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 | -
444 |
445 | Руководитель
446 |
447 |
448 | -
449 |
450 | Продавец
451 |
452 |
453 | -
454 |
455 | Маркетолог
456 |
457 |
458 | -
459 |
460 | Менеджер
461 |
462 |
463 |
464 |
465 |
466 |
467 | 370
468 | 60
469 | 91
470 | 31
471 |
472 |
473 |
474 | font: 12pt "Comfortaa";
475 | font: bold;
476 | color: rgb(56, 84, 102);
477 | border: 5px solid #BBD6FF ;
478 | border-top: transparent;
479 | border-left: transparent;
480 | border-right: transparent;
481 |
482 |
483 | Роль
484 |
485 |
486 | Qt::AlignCenter
487 |
488 |
489 | Background
490 | BackgroundEnter
491 | Password
492 | Surname
493 | TableName
494 | Name
495 | Patronymic
496 | Login
497 | SurnameEnter
498 | NameEnter
499 | PatronymicEnter
500 | LoginEnter
501 | PasswordEnter
502 | Apply
503 | RoleChange
504 | Role
505 |
506 |
507 | SurnameEnter
508 | NameEnter
509 | PatronymicEnter
510 | LoginEnter
511 | PasswordEnter
512 | Apply
513 |
514 |
515 |
516 |
517 |
--------------------------------------------------------------------------------
/CRM/editUI/editDeal.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | editDeal
19 |
20 |
21 |
22 | 0
23 | 0
24 | 750
25 | 221
26 |
27 |
28 |
29 | Сделка
30 |
31 |
32 |
33 |
34 | 0
35 | 0
36 | 751
37 | 221
38 |
39 |
40 |
41 | background-color :rgb(255, 255, 255);
42 | border-radius: 20px;
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 200
52 | 60
53 | 61
54 | 31
55 |
56 |
57 |
58 | font: 12pt "Comfortaa";
59 | font: bold;
60 | color: rgb(56, 84, 102);
61 | border: 5px solid #BBD6FF ;
62 | border-top: transparent;
63 | border-left: transparent;
64 | border-right: transparent;
65 |
66 |
67 | Цена
68 |
69 |
70 | Qt::AlignCenter
71 |
72 |
73 |
74 |
75 |
76 | 310
77 | 60
78 | 121
79 | 31
80 |
81 |
82 |
83 | font: 12pt "Comfortaa";
84 | font: bold;
85 | color: rgb(56, 84, 102);
86 | border: 5px solid #BBD6FF ;
87 | border-top: transparent;
88 | border-left: transparent;
89 | border-right: transparent;
90 |
91 |
92 | Покупатель
93 |
94 |
95 | Qt::AlignCenter
96 |
97 |
98 |
99 |
100 |
101 | 0
102 | 0
103 | 1551
104 | 311
105 |
106 |
107 |
108 | background-color:rgb(221, 235, 255);
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | 490
118 | 60
119 | 71
120 | 31
121 |
122 |
123 |
124 | font: 12pt "Comfortaa";
125 | font: bold;
126 | color: rgb(56, 84, 102);
127 | border: 5px solid #BBD6FF ;
128 | border-top: transparent;
129 | border-left: transparent;
130 | border-right: transparent;
131 |
132 |
133 | Статус
134 |
135 |
136 | Qt::AlignCenter
137 |
138 |
139 |
140 |
141 |
142 | 170
143 | 100
144 | 121
145 | 51
146 |
147 |
148 |
149 | font: 12pt "Comfortaa";
150 | font: bold;
151 | color: rgb(56, 84, 102);
152 | background-color: rgb(221, 235, 255);
153 | border: 5px solid #BBD6FF ;
154 | border-radius:0px;
155 |
156 |
157 | 000000000
158 |
159 |
160 | 9
161 |
162 |
163 | Qt::AlignCenter
164 |
165 |
166 |
167 |
168 |
169 | 320
170 | 10
171 | 91
172 | 31
173 |
174 |
175 |
176 | font: 12pt "Comfortaa";
177 | font: bold;
178 | color: rgb(56, 84, 102);
179 | border: 5px solid #BBD6FF ;
180 | border-top: transparent;
181 | border-left: transparent;
182 | border-right: transparent;
183 |
184 |
185 | Сделка
186 |
187 |
188 | Qt::AlignCenter
189 |
190 |
191 |
192 |
193 |
194 | 50
195 | 60
196 | 81
197 | 31
198 |
199 |
200 |
201 | font: 12pt "Comfortaa";
202 | font: bold;
203 | color: rgb(56, 84, 102);
204 | border: 5px solid #BBD6FF ;
205 | border-top: transparent;
206 | border-left: transparent;
207 | border-right: transparent;
208 |
209 |
210 | Ноутбук
211 |
212 |
213 | Qt::AlignCenter
214 |
215 |
216 |
217 |
218 |
219 | 300
220 | 170
221 | 131
222 | 41
223 |
224 |
225 |
226 | QPushButton#Apply:!pressed {
227 | font: 12pt "Comfortaa";
228 | font: bold;
229 | color: rgb(56, 84, 102);
230 | background-color: rgb(221, 235, 255);
231 | border: 5px solid #BBD6FF ;
232 | border-radius:20px;
233 | }
234 |
235 | QPushButton#Apple {
236 | font: 12pt "Comfortaa";
237 | font: bold;
238 | color: rgb(56, 84, 102);
239 | background-color: rgb(221, 235, 255);
240 | border: 5px solid #BBD6FF ;
241 | border-radius:20px;;
242 | }
243 |
244 | QPushButton#Apply:hover {
245 | font: 12pt "Comfortaa";
246 | font: bold;
247 | color: rgb(56, 84, 102);
248 | background-color: rgb(165, 199, 250);
249 | border: 5px solid #75ACFF;
250 | border-radius:20px;
251 | }
252 |
253 |
254 | QPushButton#Apply:pressed {
255 | font: 12pt "Comfortaa";
256 | font: bold;
257 | color: rgb(56, 84, 102);
258 | background-color: rgb(165, 199, 250);
259 | border: 5px solid #75ACFF;
260 | border-radius:20px;
261 | }
262 |
263 |
264 | Готово
265 |
266 |
267 |
268 |
269 |
270 | 610
271 | 60
272 | 91
273 | 31
274 |
275 |
276 |
277 | font: 12pt "Comfortaa";
278 | font: bold;
279 | color: rgb(56, 84, 102);
280 | border: 5px solid #BBD6FF ;
281 | border-top: transparent;
282 | border-left: transparent;
283 | border-right: transparent;
284 |
285 |
286 | Продавец
287 |
288 |
289 | Qt::AlignCenter
290 |
291 |
292 |
293 |
294 |
295 | 290
296 | 100
297 | 161
298 | 51
299 |
300 |
301 |
302 | QComboBox{
303 | font: 12pt "Comfortaa";
304 | font: bold;
305 | color: rgb(56, 84, 102);
306 | background-color: rgb(221, 235, 255);
307 | border: 5px solid #BBD6FF ;
308 | border-radius:0px;
309 | }
310 |
311 | QComboBox::drop-down {
312 |
313 | border-left: 3px solid #BBD6FF ;
314 | border-top-left-radius: 3px; /* same radius as the QComboBox */
315 | border-bottom-left-radius: 3px;
316 | }
317 |
318 | QComboBox::down-arrow:!on {
319 | image: url(":/images/downArrow.png");
320 | }
321 |
322 | QComboBox::down-arrow:on {
323 | image: url(":/images/upArrow.png");
324 | }
325 |
326 |
327 |
328 | QComboBox QAbstractItemView {
329 | border: 5px solid #BBD6FF ;
330 | background-color: rgb(221, 235, 255);
331 | border-bottom-left-radius:5px;
332 | border-bottom-right-radius:5px;
333 | border-top-left-radius:0px;
334 | border-top-right-radius:0px;
335 | }
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 | 590
349 | 100
350 | 151
351 | 51
352 |
353 |
354 |
355 | QComboBox{
356 | font: 12pt "Comfortaa";
357 | font: bold;
358 | color: rgb(56, 84, 102);
359 | background-color: rgb(221, 235, 255);
360 | border: 5px solid #BBD6FF ;
361 | border-radius:0px;
362 | border-top-left-radius: 0px;
363 | border-top-right-radius:0px;
364 | border-bottom-left-radius:0px;
365 | border-bottom-right-radius:20px;
366 | }
367 |
368 | QComboBox::drop-down {
369 |
370 | border-left: 3px solid #BBD6FF ;
371 | border-top-left-radius: 3px; /* same radius as the QComboBox */
372 | border-bottom-left-radius: 3px;
373 | }
374 |
375 | QComboBox::down-arrow:!on {
376 | image: url(":/images/downArrow.png");
377 | }
378 |
379 | QComboBox::down-arrow:on {
380 | image: url(":/images/upArrow.png");
381 | }
382 |
383 |
384 |
385 | QComboBox QAbstractItemView {
386 | border: 5px solid #BBD6FF ;
387 | background-color: rgb(221, 235, 255);
388 | border-bottom-left-radius:5px;
389 | border-bottom-right-radius:5px;
390 | border-top-left-radius:0px;
391 | border-top-right-radius:0px;
392 | }
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 | 450
401 | 100
402 | 141
403 | 51
404 |
405 |
406 |
407 | QComboBox{
408 | font: 12pt "Comfortaa";
409 | font: bold;
410 | color: rgb(56, 84, 102);
411 | background-color: rgb(221, 235, 255);
412 | border: 5px solid #BBD6FF ;
413 | border-radius:0px;
414 | }
415 |
416 | QComboBox::drop-down {
417 |
418 | border-left: 3px solid #BBD6FF ;
419 | border-top-left-radius: 3px; /* same radius as the QComboBox */
420 | border-bottom-left-radius: 3px;
421 | }
422 |
423 | QComboBox::down-arrow:!on {
424 | image: url(":/images/downArrow.png");
425 | }
426 |
427 | QComboBox::down-arrow:on {
428 | image: url(":/images/upArrow.png");
429 | }
430 |
431 |
432 |
433 | QComboBox QAbstractItemView {
434 | border: 5px solid #BBD6FF ;
435 | background-color: rgb(221, 235, 255);
436 | border-bottom-left-radius:5px;
437 | border-bottom-right-radius:5px;
438 | border-top-left-radius:0px;
439 | border-top-right-radius:0px;
440 | }
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 | -
450 |
451 | Создан
452 |
453 |
454 | -
455 |
456 | Доставлен
457 |
458 |
459 |
460 |
461 |
462 |
463 | 10
464 | 100
465 | 161
466 | 51
467 |
468 |
469 |
470 | QComboBox{
471 | font: 12pt "Comfortaa";
472 | font: bold;
473 | color: rgb(56, 84, 102);
474 | background-color: rgb(221, 235, 255);
475 | border: 5px solid #BBD6FF ;
476 | border-top-left-radius: 20px;
477 | border-top-right-radius:0px;
478 | border-bottom-left-radius:0px;
479 | border-bottom-right-radius:0px;
480 | }
481 |
482 | QComboBox::drop-down {
483 |
484 | border-left: 3px solid #BBD6FF ;
485 | border-top-left-radius: 3px; /* same radius as the QComboBox */
486 | border-bottom-left-radius: 3px;
487 | }
488 |
489 | QComboBox::down-arrow:!on {
490 | image: url(":/images/downArrow.png");
491 | }
492 |
493 | QComboBox::down-arrow:on {
494 | image: url(":/images/upArrow.png");
495 | }
496 |
497 |
498 |
499 | QComboBox QAbstractItemView {
500 | border: 5px solid #BBD6FF ;
501 | background-color: rgb(221, 235, 255);
502 | border-bottom-left-radius:5px;
503 | border-bottom-right-radius:5px;
504 | border-top-left-radius:0px;
505 | border-top-right-radius:0px;
506 | }
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 | Background
517 | BackgroundRounded
518 | Apply
519 | Status
520 | Laptop
521 | Customer
522 | Price
523 | PriceEnter
524 | tableName
525 | Seller
526 | CustomerChange
527 | SellerChange
528 | StatusChange
529 | LaptopChange
530 |
531 |
532 | LaptopChange
533 | PriceEnter
534 | CustomerChange
535 | StatusChange
536 | SellerChange
537 | Apply
538 |
539 |
540 |
541 |
542 |
--------------------------------------------------------------------------------
/CRM/editUI/editClient.ui:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | editClient
19 |
20 |
21 |
22 | 0
23 | 0
24 | 1272
25 | 221
26 |
27 |
28 |
29 | Клиент
30 |
31 |
32 |
33 |
34 | 530
35 | 100
36 | 151
37 | 51
38 |
39 |
40 |
41 | font: 12pt "Comfortaa";
42 | font: bold;
43 | color: rgb(56, 84, 102);
44 | background-color: rgb(221, 235, 255);
45 | border: 5px solid #BBD6FF ;
46 | border-radius:0px;
47 |
48 |
49 | 30
50 |
51 |
52 | Qt::AlignCenter
53 |
54 |
55 |
56 |
57 |
58 | 170
59 | 100
60 | 181
61 | 51
62 |
63 |
64 |
65 | font: 12pt "Comfortaa";
66 | font: bold;
67 | color: rgb(56, 84, 102);
68 | background-color: rgb(221, 235, 255);
69 | border: 5px solid #BBD6FF ;
70 | border-radius:0px;
71 |
72 |
73 | 30
74 |
75 |
76 | Qt::AlignCenter
77 |
78 |
79 |
80 |
81 |
82 | 350
83 | 100
84 | 181
85 | 51
86 |
87 |
88 |
89 | font: 12pt "Comfortaa";
90 | font: bold;
91 | color: rgb(56, 84, 102);
92 | background-color: rgb(221, 235, 255);
93 | border: 5px solid #BBD6FF ;
94 | border-radius:0px;
95 |
96 |
97 | 30
98 |
99 |
100 | Qt::AlignCenter
101 |
102 |
103 |
104 |
105 |
106 | 0
107 | 0
108 | 1271
109 | 221
110 |
111 |
112 |
113 | background-color :rgb(255, 255, 255);
114 | border-radius: 20px;
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 | 390
124 | 60
125 | 111
126 | 31
127 |
128 |
129 |
130 | font: 12pt "Comfortaa";
131 | font: bold;
132 | color: rgb(56, 84, 102);
133 | border: 5px solid #BBD6FF ;
134 | border-top: transparent;
135 | border-left: transparent;
136 | border-right: transparent;
137 |
138 |
139 | Отчество
140 |
141 |
142 | Qt::AlignCenter
143 |
144 |
145 |
146 |
147 |
148 | 810
149 | 100
150 | 261
151 | 51
152 |
153 |
154 |
155 | font: 12pt "Comfortaa";
156 | font: bold;
157 | color: rgb(56, 84, 102);
158 | background-color: rgb(221, 235, 255);
159 | border: 5px solid #BBD6FF ;
160 | border-radius:0px;
161 |
162 |
163 | 30
164 |
165 |
166 | Qt::AlignCenter
167 |
168 |
169 |
170 |
171 |
172 | 1070
173 | 100
174 | 191
175 | 51
176 |
177 |
178 |
179 | font: 12pt "Comfortaa";
180 | font: bold;
181 | color: rgb(56, 84, 102);
182 | background-color: rgb(221, 235, 255);
183 | border: 5px solid #BBD6FF ;
184 | border-top-left-radius: 0px;
185 | border-top-right-radius:0px;
186 | border-bottom-left-radius:0px;
187 | border-bottom-right-radius:20px;
188 |
189 |
190 | 30
191 |
192 |
193 | Qt::AlignCenter
194 |
195 |
196 |
197 |
198 |
199 | 720
200 | 60
201 | 51
202 | 31
203 |
204 |
205 |
206 | font: 12pt "Comfortaa";
207 | font: bold;
208 | color: rgb(56, 84, 102);
209 | border: 5px solid #BBD6FF ;
210 | border-top: transparent;
211 | border-left: transparent;
212 | border-right: transparent;
213 |
214 |
215 | Пол
216 |
217 |
218 | Qt::AlignCenter
219 |
220 |
221 |
222 |
223 |
224 | 10
225 | 100
226 | 161
227 | 51
228 |
229 |
230 |
231 | font: 12pt "Comfortaa";
232 | font: bold;
233 | color: rgb(56, 84, 102);
234 | background-color: rgb(221, 235, 255);
235 | border: 5px solid #BBD6FF ;
236 | border-top-left-radius: 20px;
237 | border-top-right-radius:0px;
238 | border-bottom-left-radius:0px;
239 | border-bottom-right-radius:0px;
240 |
241 |
242 |
243 |
244 |
245 |
246 | 30
247 |
248 |
249 | Qt::AlignCenter
250 |
251 |
252 |
253 |
254 |
255 | 50
256 | 60
257 | 81
258 | 31
259 |
260 |
261 |
262 | font: 12pt "Comfortaa";
263 | font: bold;
264 | color: rgb(56, 84, 102);
265 | border: 5px solid #BBD6FF ;
266 | border-top: transparent;
267 | border-left: transparent;
268 | border-right: transparent;
269 |
270 |
271 | Фамилия
272 |
273 |
274 | Qt::AlignCenter
275 |
276 |
277 |
278 |
279 |
280 | 500
281 | 170
282 | 131
283 | 41
284 |
285 |
286 |
287 | QPushButton#Apply:!pressed {
288 | font: 12pt "Comfortaa";
289 | font: bold;
290 | color: rgb(56, 84, 102);
291 | background-color: rgb(221, 235, 255);
292 | border: 5px solid #BBD6FF ;
293 | border-radius:20px;
294 | }
295 |
296 | QPushButton#Apple {
297 | font: 12pt "Comfortaa";
298 | font: bold;
299 | color: rgb(56, 84, 102);
300 | background-color: rgb(221, 235, 255);
301 | border: 5px solid #BBD6FF ;
302 | border-radius:20px;;
303 | }
304 |
305 | QPushButton#Apply:hover {
306 | font: 12pt "Comfortaa";
307 | font: bold;
308 | color: rgb(56, 84, 102);
309 | background-color: rgb(165, 199, 250);
310 | border: 5px solid #75ACFF;
311 | border-radius:20px;
312 | }
313 |
314 |
315 | QPushButton#Apply:pressed {
316 | font: 12pt "Comfortaa";
317 | font: bold;
318 | color: rgb(56, 84, 102);
319 | background-color: rgb(165, 199, 250);
320 | border: 5px solid #75ACFF;
321 | border-radius:20px;
322 | }
323 |
324 |
325 | Готово
326 |
327 |
328 |
329 |
330 |
331 | 570
332 | 60
333 | 61
334 | 31
335 |
336 |
337 |
338 | font: 12pt "Comfortaa";
339 | font: bold;
340 | color: rgb(56, 84, 102);
341 | border: 5px solid #BBD6FF ;
342 | border-top: transparent;
343 | border-left: transparent;
344 | border-right: transparent;
345 |
346 |
347 | Город
348 |
349 |
350 | Qt::AlignCenter
351 |
352 |
353 |
354 |
355 |
356 | 520
357 | 10
358 | 91
359 | 31
360 |
361 |
362 |
363 | font: 12pt "Comfortaa";
364 | font: bold;
365 | color: rgb(56, 84, 102);
366 | border: 5px solid #BBD6FF ;
367 | border-top: transparent;
368 | border-left: transparent;
369 | border-right: transparent;
370 |
371 |
372 | Клиент
373 |
374 |
375 | Qt::AlignCenter
376 |
377 |
378 |
379 |
380 |
381 | 230
382 | 60
383 | 51
384 | 31
385 |
386 |
387 |
388 | font: 12pt "Comfortaa";
389 | font: bold;
390 | color: rgb(56, 84, 102);
391 | border: 5px solid #BBD6FF ;
392 | border-top: transparent;
393 | border-left: transparent;
394 | border-right: transparent;
395 |
396 |
397 | Имя
398 |
399 |
400 | Qt::AlignCenter
401 |
402 |
403 |
404 |
405 |
406 | 930
407 | 60
408 | 51
409 | 31
410 |
411 |
412 |
413 | font: 12pt "Comfortaa";
414 | font: bold;
415 | color: rgb(56, 84, 102);
416 | border: 5px solid #BBD6FF ;
417 | border-top: transparent;
418 | border-left: transparent;
419 | border-right: transparent;
420 |
421 |
422 | email
423 |
424 |
425 | Qt::AlignCenter
426 |
427 |
428 |
429 |
430 |
431 | 0
432 | 0
433 | 1551
434 | 311
435 |
436 |
437 |
438 | background-color:rgb(221, 235, 255);
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 | 1130
448 | 60
449 | 81
450 | 31
451 |
452 |
453 |
454 | font: 12pt "Comfortaa";
455 | font: bold;
456 | color: rgb(56, 84, 102);
457 | border: 5px solid #BBD6FF ;
458 | border-top: transparent;
459 | border-left: transparent;
460 | border-right: transparent;
461 |
462 |
463 | Телефон
464 |
465 |
466 | Qt::AlignCenter
467 |
468 |
469 |
470 |
471 |
472 | 680
473 | 100
474 | 131
475 | 51
476 |
477 |
478 |
479 | font: 12pt "Comfortaa";
480 | font: bold;
481 | color: rgb(56, 84, 102);
482 | background-color: rgb(221, 235, 255);
483 | border: 5px solid #BBD6FF ;
484 | border-radius:0px;
485 |
486 |
487 | 30
488 |
489 |
490 | Qt::AlignCenter
491 |
492 |
493 | Background
494 | BackgroundRounded
495 | CityEnter
496 | Patronymic
497 | Surname
498 | Name
499 | PhoneNumber
500 | tableName
501 | Sex
502 | Email
503 | City
504 | PhoneNumberEnter
505 | EmailEnter
506 | PatronymicEnter
507 | NameEnter
508 | Apply
509 | SurnameEnter
510 | SexEnter
511 |
512 |
513 | SurnameEnter
514 | NameEnter
515 | PatronymicEnter
516 | CityEnter
517 | SexEnter
518 | EmailEnter
519 | PhoneNumberEnter
520 | Apply
521 |
522 |
523 |
524 |
525 |
--------------------------------------------------------------------------------