├── .gitignore ├── Chat.pro ├── Client ├── Button.qml ├── Client.pro ├── Resource │ ├── Avatars │ │ ├── 1.jpg │ │ ├── 10.jpg │ │ ├── 11.jpg │ │ ├── 12.jpg │ │ ├── 13.jpg │ │ ├── 14.jpg │ │ ├── 15.jpg │ │ ├── 16.jpg │ │ ├── 17.jpg │ │ ├── 18.jpg │ │ ├── 19.jpg │ │ ├── 2.jpg │ │ ├── 20.jpg │ │ ├── 21.jpg │ │ ├── 22.jpg │ │ ├── 23.jpg │ │ ├── 24.jpg │ │ ├── 25.jpg │ │ ├── 26.jpg │ │ ├── 27.jpg │ │ ├── 28.jpg │ │ ├── 29.jpg │ │ ├── 3.jpg │ │ ├── 30.jpg │ │ ├── 31.jpg │ │ ├── 32.jpg │ │ ├── 33.jpg │ │ ├── 34.jpg │ │ ├── 35.jpg │ │ ├── 36.jpg │ │ ├── 37.jpg │ │ ├── 38.jpg │ │ ├── 39.jpg │ │ ├── 4.jpg │ │ ├── 40.jpg │ │ ├── 41.jpg │ │ ├── 42.jpg │ │ ├── 43.jpg │ │ ├── 44.jpg │ │ ├── 45.jpg │ │ ├── 46.jpg │ │ ├── 47.jpg │ │ ├── 48.jpg │ │ ├── 49.jpg │ │ ├── 5.jpg │ │ ├── 50.jpg │ │ ├── 51.jpg │ │ ├── 6.jpg │ │ ├── 7.jpg │ │ ├── 8.jpg │ │ └── 9.jpg │ ├── Icon │ │ ├── ic_LOGO_64.png │ │ ├── ic_about.png │ │ ├── ic_back.png │ │ ├── ic_back_2.png │ │ ├── ic_chat_file.png │ │ ├── ic_chat_set.png │ │ ├── ic_close_brown.png │ │ ├── ic_close_white.png │ │ ├── ic_create.png │ │ ├── ic_download.png │ │ ├── ic_emoji.png │ │ ├── ic_general_set.png │ │ ├── ic_group.png │ │ ├── ic_group_avatar.png │ │ ├── ic_login.png │ │ ├── ic_network_set.png │ │ ├── ic_password.png │ │ ├── ic_profile_set.png │ │ ├── ic_register.png │ │ ├── ic_search.png │ │ ├── ic_send_file.png │ │ ├── ic_send_mess.png │ │ ├── ic_setting.png │ │ ├── ic_setting_2.png │ │ ├── ic_turn_brown.png │ │ ├── ic_turn_white.png │ │ └── ic_username.png │ ├── RoundLetters(ENG) │ │ ├── a.jpg │ │ ├── b.jpg │ │ ├── c.jpg │ │ ├── d.jpg │ │ ├── e.jpg │ │ ├── f.jpg │ │ ├── g.jpg │ │ ├── h.jpg │ │ ├── i.jpg │ │ ├── j.jpg │ │ ├── k.jpg │ │ ├── l.jpg │ │ ├── m.jpg │ │ ├── n.jpg │ │ ├── o.jpg │ │ ├── p.jpg │ │ ├── q.jpg │ │ ├── r.jpg │ │ ├── s.jpg │ │ ├── t.jpg │ │ ├── u.jpg │ │ ├── v.jpg │ │ ├── w.jpg │ │ ├── x.jpg │ │ ├── y.jpg │ │ └── z.jpg │ ├── RoundLetters(RUS) │ │ ├── a.jpg │ │ ├── b.jpg │ │ ├── c.jpg │ │ ├── d.jpg │ │ ├── e.jpg │ │ ├── ee.jpg │ │ ├── f.jpg │ │ ├── g.jpg │ │ ├── h.jpg │ │ ├── i.jpg │ │ ├── k.jpg │ │ ├── l.jpg │ │ ├── m.jpg │ │ ├── n.jpg │ │ ├── o.jpg │ │ ├── p.jpg │ │ ├── q.jpg │ │ ├── r.jpg │ │ ├── s.jpg │ │ ├── t.jpg │ │ ├── u.jpg │ │ ├── v.jpg │ │ ├── x.jpg │ │ ├── y.jpg │ │ ├── ya.jpg │ │ ├── z.jpg │ │ └── zh.jpg │ ├── Sound │ │ ├── from.wav │ │ └── to.wav │ ├── XML_Language │ │ ├── DE_Language.xml │ │ ├── EN_Language.xml │ │ ├── FR_Language.xml │ │ └── RU_Language.xml │ ├── background.jpg │ ├── botton.jpg │ └── header.jpg ├── aboutdialog.cpp ├── aboutdialog.h ├── aboutdialog.ui ├── authorization.cpp ├── authorization.h ├── authorization.ui ├── chatlistdelegate.cpp ├── chatlistdelegate.h ├── choicecreate.cpp ├── choicecreate.h ├── choicecreate.ui ├── client.cpp ├── client.h ├── client.ui ├── client_define.h ├── confirmwindow.cpp ├── confirmwindow.h ├── confirmwindow.ui ├── creategroup.cpp ├── creategroup.h ├── creategroup.ui ├── emojiframe.cpp ├── emojiframe.h ├── emojiframe.ui ├── emojimanager.cpp ├── emojimanager.h ├── findcontacts.cpp ├── findcontacts.h ├── findcontacts.ui ├── hashmd5.cpp ├── hashmd5.h ├── listwidgetemoji.cpp ├── listwidgetemoji.h ├── main.cpp ├── notification.cpp ├── notification.h ├── registration.cpp ├── registration.h ├── registration.ui ├── resource.qrc ├── rsacrypt.cpp ├── rsacrypt.h ├── selectcontacts.cpp ├── selectcontacts.h ├── selectcontacts.ui ├── setting.ui ├── trayicon.cpp ├── trayicon.h ├── userlistdelegate.cpp ├── userlistdelegate.h ├── usersgroupinfo.cpp ├── usersgroupinfo.h ├── usersgroupinfo.ui ├── xml_language.cpp └── xml_language.h ├── README.md └── Server ├── Server.pro ├── main.cpp ├── server.cpp ├── server.h ├── server.ui ├── sqlitedb.cpp ├── sqlitedb.h ├── user.cpp └── user.h /.gitignore: -------------------------------------------------------------------------------- 1 | /Chat.pro.user -------------------------------------------------------------------------------- /Chat.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | 3 | SUBDIRS += \ 4 | Client \ 5 | Server 6 | 7 | RESOURCES += \ 8 | Client/image.qrc \ 9 | Client/image.qrc \ 10 | Client/image.qrc \ 11 | Client/image.qrc \ 12 | Client/image.qrc 13 | -------------------------------------------------------------------------------- /Client/Button.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | Rectangle { 4 | width: 100 5 | height: 62 6 | } 7 | 8 | -------------------------------------------------------------------------------- /Client/Client.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-10-03T17:52:00 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui network quick 8 | QT += multimedia 9 | 10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 11 | 12 | TARGET = Client 13 | TEMPLATE = app 14 | CONFIG += c++11 15 | 16 | SOURCES +=\ 17 | client.cpp \ 18 | emojiframe.cpp \ 19 | findcontacts.cpp \ 20 | trayicon.cpp \ 21 | emojimanager.cpp \ 22 | listwidgetemoji.cpp \ 23 | chatlistdelegate.cpp \ 24 | aboutdialog.cpp \ 25 | notification.cpp \ 26 | main.cpp \ 27 | rsacrypt.cpp \ 28 | hashmd5.cpp \ 29 | confirmwindow.cpp \ 30 | creategroup.cpp \ 31 | userlistdelegate.cpp \ 32 | choicecreate.cpp \ 33 | selectcontacts.cpp \ 34 | usersgroupinfo.cpp \ 35 | authorization.cpp \ 36 | registration.cpp \ 37 | xml_language.cpp 38 | 39 | HEADERS += client.h \ 40 | emojiframe.h \ 41 | findcontacts.h \ 42 | trayicon.h \ 43 | emojimanager.h \ 44 | listwidgetemoji.h \ 45 | chatlistdelegate.h \ 46 | aboutdialog.h \ 47 | notification.h \ 48 | rsacrypt.h \ 49 | hashmd5.h \ 50 | confirmwindow.h \ 51 | creategroup.h \ 52 | userlistdelegate.h \ 53 | choicecreate.h \ 54 | selectcontacts.h \ 55 | usersgroupinfo.h \ 56 | authorization.h \ 57 | registration.h \ 58 | xml_language.h \ 59 | client_define.h 60 | 61 | FORMS += client.ui \ 62 | emojiframe.ui \ 63 | findcontacts.ui \ 64 | aboutdialog.ui \ 65 | confirmwindow.ui \ 66 | creategroup.ui \ 67 | choicecreate.ui \ 68 | selectcontacts.ui \ 69 | usersgroupinfo.ui \ 70 | authorization.ui \ 71 | registration.ui 72 | 73 | RESOURCES += \ 74 | resource.qrc 75 | 76 | 77 | -------------------------------------------------------------------------------- /Client/Resource/Avatars/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/1.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/10.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/11.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/12.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/13.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/14.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/15.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/16.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/17.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/18.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/19.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/2.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/20.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/21.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/22.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/23.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/24.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/25.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/26.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/27.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/28.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/29.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/3.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/30.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/31.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/32.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/33.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/33.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/34.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/35.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/36.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/37.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/38.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/39.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/39.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/4.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/40.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/40.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/41.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/41.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/42.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/43.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/43.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/44.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/44.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/45.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/45.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/46.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/46.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/47.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/47.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/48.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/48.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/49.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/5.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/50.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/51.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/6.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/7.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/8.jpg -------------------------------------------------------------------------------- /Client/Resource/Avatars/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Avatars/9.jpg -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_LOGO_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_LOGO_64.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_about.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_back.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_back_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_back_2.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_chat_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_chat_file.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_chat_set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_chat_set.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_close_brown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_close_brown.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_close_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_close_white.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_create.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_download.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_emoji.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_general_set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_general_set.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_group.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_group_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_group_avatar.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_login.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_network_set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_network_set.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_password.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_profile_set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_profile_set.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_register.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_search.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_send_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_send_file.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_send_mess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_send_mess.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_setting.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_setting_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_setting_2.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_turn_brown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_turn_brown.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_turn_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_turn_white.png -------------------------------------------------------------------------------- /Client/Resource/Icon/ic_username.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Icon/ic_username.png -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/a.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/b.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/c.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/d.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/e.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/f.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/g.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/h.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/h.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/i.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/j.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/j.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/k.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/k.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/l.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/l.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/m.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/m.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/n.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/o.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/o.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/p.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/q.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/q.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/r.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/r.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/s.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/t.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/u.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/u.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/v.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/v.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/w.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/w.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/x.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/y.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/y.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(ENG)/z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(ENG)/z.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/a.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/b.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/c.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/d.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/e.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/ee.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/ee.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/f.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/g.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/h.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/h.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/i.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/k.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/k.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/l.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/l.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/m.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/m.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/n.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/o.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/o.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/p.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/q.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/q.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/r.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/r.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/s.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/t.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/u.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/u.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/v.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/v.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/x.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/y.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/y.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/ya.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/ya.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/z.jpg -------------------------------------------------------------------------------- /Client/Resource/RoundLetters(RUS)/zh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/RoundLetters(RUS)/zh.jpg -------------------------------------------------------------------------------- /Client/Resource/Sound/from.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Sound/from.wav -------------------------------------------------------------------------------- /Client/Resource/Sound/to.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/Sound/to.wav -------------------------------------------------------------------------------- /Client/Resource/XML_Language/DE_Language.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | username_enter 6 | Login 7 | 8 | 9 | pass_enter 10 | Passwort 11 | 12 | 13 | error_label 14 | Benutzername oder Passwort falsch 15 | 16 | 17 | reg_button 18 | Anmeldung 19 | 20 | 21 | log_in 22 | Eingang 23 | 24 | 25 | errorconnect_label 26 | Fehler bei der Verbindung 27 | 28 | 29 | 30 | 31 | 32 | register_2 33 | ANMELDUNG 34 | 35 | 36 | username 37 | Ihr Name: 38 | 39 | 40 | sex 41 | Gender: 42 | 43 | 44 | sex_person 45 | Unbekannte, Ein Mann, Frau 46 | 47 | 48 | age 49 | Alter: 50 | 51 | 52 | city 53 | Stadt: 54 | 55 | 56 | password 57 | Passwort: 58 | 59 | 60 | confirm 61 | Bestätigung: 62 | 63 | 64 | Error_label 65 | Fehler .. Name bereits vorhanden ist. 66 | 67 | 68 | accept_button 69 | AKZEPTIEREN 70 | 71 | 72 | errors1 73 | Fehler.. Geben Sie Ihren Benutzernamen und Ihr Passwort ein. // Fehler.. Name bereits vorhanden ist. // Fehler .. Passwörter stimmen nicht überein. // Fehler.. Passwort bestätigen. 74 | 75 | 76 | 77 | 78 | 79 | cancel_Button 80 | ZURÜCK 81 | 82 | 83 | ok_Button 84 | AKZEPTIEREN 85 | 86 | 87 | conf_message_del_hist 88 | Sind Sie sicher, dass Sie die Geschichte zu löschen? 89 | 90 | 91 | conf_message_del_user 92 | Sind Sie sicher, dass Sie diesen Benutzer löschen? 93 | 94 | 95 | 96 | 97 | 98 | g_name 99 | Gruppennamen 100 | 101 | 102 | g_description 103 | Beschreibung 104 | 105 | 106 | close_groupW 107 | ZURÜCK 108 | 109 | 110 | create_group 111 | FERNER 112 | 113 | 114 | 115 | 116 | 117 | add_user 118 | Benutzer hinzufügen: 119 | 120 | 121 | username_lineedit 122 | Benutzername 123 | 124 | 125 | invite_cont_button 126 | Hinzufügen 127 | 128 | 129 | errors 130 | Sie können sich nicht fügen.. // Benutzer nicht gefunden.. // Benutzer bereits hinzugefügt.. 131 | 132 | 133 | 134 | 135 | 136 | count_member 137 | Beteiligten: 138 | 139 | 140 | crGroup_button 141 | CREATE 142 | 143 | 144 | cancel_button 145 | ZURÜCK 146 | 147 | 148 | 149 | 150 | 151 | newContact 152 | Benutzer hinzufügen 153 | 154 | 155 | newGroup 156 | Gruppe erstellen 157 | 158 | 159 | close_choice 160 | ZURÜCK 161 | 162 | 163 | next_choice 164 | FERNER 165 | 166 | 167 | contact_descr 168 | Fügen Sie einen neuen Benutzer zu Ihrer Freundesliste 169 | 170 | 171 | group_descr 172 | Erstellen Raum für gemeinsame Dialog 173 | 174 | 175 | 176 | 177 | 178 | start_sys 179 | Legen Sie beim Start 180 | 181 | 182 | language 183 | Sprache: 184 | 185 | 186 | down_path 187 | Der Lastweg: 188 | 189 | 190 | Download_path_PB 191 | Ändern 192 | 193 | 194 | RB_sendEnter 195 | Senden von "Enter" 196 | 197 | 198 | RB_send_CEnter 199 | Senden von "Ctrl + Enter" 200 | 201 | 202 | ChBox_Notif 203 | Bekanntmachung 204 | 205 | 206 | ChBox_PSound 207 | Klang 208 | 209 | 210 | background 211 | Hintergrund: 212 | 213 | 214 | PB_SelColor 215 | Wähle aus Palette: 216 | 217 | 218 | PB_LoadFileBackground 219 | Datei hochladen: 220 | 221 | 222 | username_label 223 | Benutzername: 224 | 225 | 226 | radioButton 227 | Default 228 | 229 | 230 | radioButton_2 231 | Download 232 | 233 | 234 | groupBox 235 | Avatar: 236 | 237 | 238 | userList_3 239 | Profil, Stiftung, Chat Optionen, Netzwerk 240 | 241 | 242 | search_line_edit 243 | Suche 244 | 245 | 246 | editText 247 | Geben Sie die Mitteilung... 248 | 249 | 250 | start_textBrowser 251 | Bitte wählen Sie einen Dialog Dialog zu starten oder neue Freunde hinzuzufügen! 252 | 253 | 254 | 255 | 256 | 257 | was_yesterday 258 | Kam gestern in 259 | 260 | 261 | was_today 262 | Kam heute in 263 | 264 | 265 | was_online 266 | im Netz 267 | 268 | 269 | ago 270 | ago 271 | 272 | 273 | she_was 274 | Sie war 275 | 276 | 277 | he_was 278 | Er war 279 | 280 | 281 | days 282 | tage 283 | 284 | 285 | day 286 | tag 287 | 288 | 289 | of_the_day 290 | tag 291 | 292 | 293 | 294 | 295 | 296 | ContextDelUser 297 | Entfernen von Benutzer 298 | 299 | 300 | ContextClearSelection 301 | Auswahl aufzuheben 302 | 303 | 304 | ContextClearHistory 305 | löschen Geschichte 306 | 307 | 308 | fileWindow 309 | Wählen Sie Datei senden 310 | 311 | 312 | SelectImages 313 | Auswählen der Bild 314 | 315 | 316 | NewGroup_msg 317 | Sie haben eine neue Gruppe Dialog geschaffen 318 | 319 | 320 | notice_msg 321 | Neuer Beitrag 322 | 323 | 324 | File 325 | Datei 326 | 327 | 328 | Ad_User 329 | Sie haben Benutzer 330 | 331 | 332 | Invate_msg 333 | Hey, lassen Sie mich hinzufügen, die Sie zu ihrer Kontaktliste? 334 | 335 | 336 | 337 | 338 | 339 | Disconnected_1 340 | Verlust der Verbindung an den Server. 341 | 342 | 343 | ServerNF 344 | Server nicht gefunden. \nBitte geben Sie Ihre korrekte Adresse und Port des Servers. 345 | 346 | 347 | Disconnected_2 348 | Die Verbindung wurde durch den Client beendet. 349 | 350 | 351 | Occurred_err 352 | Folgender Fehler ist aufgetreten: 353 | 354 | 355 | 356 | 357 | 358 | 359 | -------------------------------------------------------------------------------- /Client/Resource/XML_Language/EN_Language.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | username_enter 6 | Username 7 | 8 | 9 | pass_enter 10 | Password 11 | 12 | 13 | error_label 14 | Incorrect login/password 15 | 16 | 17 | reg_button 18 | Registration 19 | 20 | 21 | log_in 22 | LOG IN 23 | 24 | 25 | errorconnect_label 26 | Error connecting... 27 | 28 | 29 | 30 | 31 | 32 | register_2 33 | REGISTRATION 34 | 35 | 36 | username 37 | User Name: 38 | 39 | 40 | sex 41 | Sex: 42 | 43 | 44 | sex_person 45 | Unknown,Man,Woman 46 | 47 | 48 | age 49 | Age: 50 | 51 | 52 | city 53 | City: 54 | 55 | 56 | password 57 | Password: 58 | 59 | 60 | confirm 61 | Confirm pas: 62 | 63 | 64 | Error_label 65 | Error.. Name already exists. 66 | 67 | 68 | accept_button 69 | ACCEPT 70 | 71 | 72 | errors1 73 | Error.. Enter username and password. //Error.. Name already exists. //Error .. Passwords are not equal. //Error .. Confirm password. 74 | 75 | 76 | 77 | 78 | 79 | 80 | cancel_Button_conf 81 | CANCEL 82 | 83 | 84 | ok_Button 85 | ACCEPT 86 | 87 | 88 | conf_message_del_hist 89 | Are you sure you want to clear history? 90 | 91 | 92 | conf_message_del_user 93 | Are you sure you want to delete this user? 94 | 95 | 96 | 97 | 98 | 99 | g_name 100 | Group name 101 | 102 | 103 | g_description 104 | Group description 105 | 106 | 107 | close_groupW 108 | CANCEL 109 | 110 | 111 | create_group 112 | NEXT 113 | 114 | 115 | 116 | 117 | 118 | add_user 119 | Add contact: 120 | 121 | 122 | username_lineedit 123 | User Name 124 | 125 | 126 | invite_cont_button 127 | Invite 128 | 129 | 130 | errors 131 | You can not add yourself.. //User is not found.. //User is already added.. 132 | 133 | 134 | 135 | 136 | 137 | count_member 138 | Add members: 139 | 140 | 141 | crGroup_button 142 | CREATE 143 | 144 | 145 | cancel_button 146 | CANCEL 147 | 148 | 149 | 150 | 151 | 152 | newContact 153 | New contact 154 | 155 | 156 | newGroup 157 | Create group 158 | 159 | 160 | close_choice 161 | CANCEL 162 | 163 | 164 | next_choice 165 | NEXT 166 | 167 | 168 | contact_descr 169 | Add a new user to your friend list 170 | 171 | 172 | group_descr 173 | Create a group room for collective dialogue 174 | 175 | 176 | 177 | 178 | 179 | start_sys 180 | Launch when system starts 181 | 182 | 183 | language 184 | Language: 185 | 186 | 187 | down_path 188 | Download path: 189 | 190 | 191 | Download_path_PB 192 | Change 193 | 194 | 195 | RB_sendEnter 196 | Send by "Enter" 197 | 198 | 199 | RB_send_CEnter 200 | Send by "Ctrl + Enter" 201 | 202 | 203 | ChBox_Notif 204 | Notification 205 | 206 | 207 | ChBox_PSound 208 | Play Sound 209 | 210 | 211 | background 212 | Chat background: 213 | 214 | 215 | PB_SelColor 216 | Select color: 217 | 218 | 219 | PB_LoadFileBackground 220 | Load from file: 221 | 222 | 223 | username_label 224 | Username: 225 | 226 | 227 | radioButton 228 | Default 229 | 230 | 231 | radioButton_2 232 | Choose 233 | 234 | 235 | groupBox 236 | Avatar: 237 | 238 | 239 | userList_3 240 | Profile, General, Chat options, Network / Security 241 | 242 | 243 | search_line_edit 244 | Search 245 | 246 | 247 | editText 248 | Write a message.. 249 | 250 | 251 | start_textBrowser 252 | Please select a chat to start messaging or add new friends to communicate! 253 | 254 | 255 | 256 | 257 | 258 | was_yesterday 259 | Last seen yesterday at 260 | 261 | 262 | was_today 263 | Last seen today at 264 | 265 | 266 | was_online 267 | online 268 | 269 | 270 | ago 271 | ago 272 | 273 | 274 | she_was 275 | She was 276 | 277 | 278 | he_was 279 | He was 280 | 281 | 282 | days 283 | days 284 | 285 | 286 | day 287 | day 288 | 289 | 290 | of_the_day 291 | days for 292 | 293 | 294 | 295 | 296 | 297 | ContextDelUser 298 | Delete user 299 | 300 | 301 | ContextClearSelection 302 | Clear selection 303 | 304 | 305 | ContextClearHistory 306 | Clear history 307 | 308 | 309 | fileWindow 310 | Select file to send 311 | 312 | 313 | SelectImages 314 | Selecting the image 315 | 316 | 317 | NewGroup_msg 318 | You have created a new group dialogue 319 | 320 | 321 | notice_msg 322 | New message 323 | 324 | 325 | File 326 | File 327 | 328 | 329 | Ad_User 330 | You added user 331 | 332 | 333 | Invate_msg 334 | Hey, let me add you to the list of contacts? 335 | 336 | 337 | 338 | 339 | 340 | Disconnected_1 341 | Disconnected from Server. 342 | 343 | 344 | ServerNF 345 | The host was not found.\nPlease check the hostname and port settings. 346 | 347 | 348 | Disconnected_2 349 | The connection was aborted by the client. 350 | 351 | 352 | Occurred_err 353 | The following error occurred: 354 | 355 | 356 | 357 | -------------------------------------------------------------------------------- /Client/Resource/XML_Language/FR_Language.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | username_enter 6 | Login 7 | 8 | 9 | pass_enter 10 | Mot de passe 11 | 12 | 13 | error_label 14 | Nom d'utilisateur ou mot de passe incorrect 15 | 16 | 17 | reg_button 18 | Enregistrement 19 | 20 | 21 | log_in 22 | Entrée 23 | 24 | 25 | errorconnect_label 26 | Erreur de connexion 27 | 28 | 29 | 30 | 31 | 32 | register_2 33 | ENREGISTREMENT 34 | 35 | 36 | username 37 | Votre nom: 38 | 39 | 40 | sex 41 | Sexe: 42 | 43 | 44 | sex_person 45 | Unknown, Homme, Femme 46 | 47 | 48 | age 49 | Âge: 50 | 51 | 52 | city 53 | Ville: 54 | 55 | 56 | password 57 | Mot de passe: 58 | 59 | 60 | confirm 61 | Confirmation: 62 | 63 | 64 | Error_label 65 | Erreur .. Nom existe déjà. 66 | 67 | 68 | accept_button 69 | ACCEPTER 70 | 71 | 72 | errors1 73 | Erreur.. Entrez votre nom d'utilisateur et mot de passe. // Erreur.. nom existe déjà. // Erreur.. Les mots de passe ne correspondent pas. // Erreur .. Confirmer mot de passe. 74 | 75 | 76 | 77 | 78 | 79 | 80 | cancel_Button_conf 81 | ANNULER 82 | 83 | 84 | ok_Button 85 | ACCEPTER 86 | 87 | 88 | conf_message_del_hist 89 | Êtes-vous sûr de vouloir effacer l'historique? 90 | 91 | 92 | conf_message_del_user 93 | Êtes-vous sûr de vouloir supprimer cet utilisateur? 94 | 95 | 96 | 97 | 98 | 99 | g_name 100 | Nom de groupe 101 | 102 | 103 | g_description 104 | Description 105 | 106 | 107 | close_groupW 108 | ANNULER 109 | 110 | 111 | create_group 112 | PUIS 113 | 114 | 115 | 116 | 117 | 118 | add_user 119 | Ajouter un utilisateur: 120 | 121 | 122 | username_lineedit 123 | Nom d'utilisateur 124 | 125 | 126 | invite_cont_button 127 | Ajouter 128 | 129 | 130 | errors 131 | Vous ne pouvez pas ajouter vous-même.. // Utilisateur introuvable.. // Utilisateur déjà ajouté.. 132 | 133 | 134 | 135 | 136 | 137 | members 138 | Participants: 139 | 140 | 141 | crGroup_button 142 | CREATE 143 | 144 | 145 | cancel_button 146 | ANNULER 147 | 148 | 149 | 150 | 151 | 152 | newContact 153 | Ajouter un utilisateur 154 | 155 | 156 | newGroup 157 | Créer un groupe 158 | 159 | 160 | close_choice 161 | ANNULER 162 | 163 | 164 | next_choice 165 | PUIS 166 | 167 | 168 | contact_descr 169 | Ajouter un nouvel utilisateur à votre liste d'amis 170 | 171 | 172 | group_descr 173 | Créer un espace de dialogue collective 174 | 175 | 176 | 177 | 178 | start_sys 179 | Chargement au lancement 180 | 181 | 182 | language 183 | Langue de: 184 | 185 | 186 | down_path 187 | Le chemin d'amorçage: 188 | 189 | 190 | Download_path_PB 191 | Modifier 192 | 193 | 194 | RB_sendEnter 195 | Envoyer à "Entrée" 196 | 197 | 198 | RB_send_CEnter 199 | Envoyer à "Ctrl + Entrée" 200 | 201 | 202 | ChBox_Notif 203 | Notification 204 | 205 | 206 | ChBox_PSound 207 | Le son 208 | 209 | 210 | background 211 | Sélection de l'fond: 212 | 213 | 214 | PB_SelColor 215 | Choisir de palette: 216 | 217 | 218 | PB_LoadFileBackground 219 | Télécharger un fichier: 220 | 221 | 222 | username_label 223 | Nom d'utilisateur: 224 | 225 | 226 | radioButton 227 | Par défaut 228 | 229 | 230 | radioButton_2 231 | Download 232 | 233 | 234 | groupBox 235 | Image: 236 | 237 | 238 | userList_3 239 | Profil, Principal, Options du Chat, Networking 240 | 241 | 242 | search_line_edit 243 | Recherche en 244 | 245 | 246 | editText 247 | Inscris ton message.. 248 | 249 | 250 | start_textBrowser 251 | S'il vous plaît sélectionner un dialogue pour démarrer le dialogue ou ajouter de nouveaux amis! 252 | 253 | 254 | 255 | 256 | 257 | was_yesterday 258 | Est venu hier en 259 | 260 | 261 | was_today 262 | Est venu aujourd'hui en 263 | 264 | 265 | was_online 266 | sur le réseau 267 | 268 | 269 | ago 270 | il ya 271 | 272 | 273 | she_was 274 | Elle était 275 | 276 | 277 | he_was 278 | Il était 279 | 280 | 281 | days 282 | journées 283 | 284 | 285 | day 286 | jour 287 | 288 | 289 | of_the_day 290 | jour 291 | 292 | 293 | 294 | 295 | 296 | ContextDelUser 297 | Supprimer l'utilisateur 298 | 299 | 300 | ContextClearSelection 301 | Désélectionner 302 | 303 | 304 | ContextClearHistory 305 | Effacer l'historique 306 | 307 | 308 | fileWindow 309 | Selektearje triem te stjoeren 310 | 311 | 312 | SelectImages 313 | Selektearje image 314 | 315 | 316 | NewGroup_msg 317 | Jo hawwe dien in nije groep dialooch 318 | 319 | 320 | notice_msg 321 | New post 322 | 323 | 324 | File 325 | Triem 326 | 327 | 328 | Ad_User 329 | Jo tafoege brûker 330 | 331 | 332 | Invate_msg 333 | Hey, lit my foegje jo nei har kontakt list? 334 | 335 | 336 | 337 | 338 | 339 | Disconnected_1 340 | Ferlies fan ferbining mei de tsjinner. 341 | 342 | 343 | ServerNF 344 | Tsjinner net fûn. \nTink bieden jo korrekte adres en poarte fan 'e tsjinner. 345 | 346 | 347 | Disconnected_2 348 | De ferbining waard beëinige wurde troch de kliînt. 349 | 350 | 351 | Occurred_err 352 | De folgjende fout die him foar: 353 | 354 | 355 | -------------------------------------------------------------------------------- /Client/Resource/XML_Language/RU_Language.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | username_enter 6 | Логин 7 | 8 | 9 | pass_enter 10 | Пароль 11 | 12 | 13 | error_label 14 | Неправильный логин или пароль 15 | 16 | 17 | reg_button 18 | Регистрация 19 | 20 | 21 | log_in 22 | Вход 23 | 24 | 25 | errorconnect_label 26 | Ошибка соединения 27 | 28 | 29 | 30 | 31 | 32 | register_2 33 | РЕГИСТРАЦИЯ 34 | 35 | 36 | username 37 | Ваше имя: 38 | 39 | 40 | sex 41 | Пол: 42 | 43 | 44 | sex_person 45 | Неизвестно,Мужчина,Женщина 46 | 47 | 48 | age 49 | Возраст: 50 | 51 | 52 | city 53 | Город: 54 | 55 | 56 | password 57 | Пароль: 58 | 59 | 60 | confirm 61 | Подтверждение: 62 | 63 | 64 | Error_label 65 | Ошибка.. Имя уже существует. 66 | 67 | 68 | accept_button 69 | Зарегистрироваться 70 | 71 | 72 | errors1 73 | Ошибка.. Введите имя пользователя и пароль. // Ошибка.. Имя уже существует. // Ошибка.. Пароли не совпадают. // Ошибка.. Подтвердите пароль. 74 | 75 | 76 | 77 | 78 | 79 | 80 | cancel_Button_conf 81 | ОТМЕНА 82 | 83 | 84 | ok_Button 85 | ПОДТВЕРДИТЬ 86 | 87 | 88 | conf_message_del_hist 89 | Вы уверены, что хотите очистить историю? 90 | 91 | 92 | conf_message_del_user 93 | Вы уверены, что хотите удалить этого пользователя? 94 | 95 | 96 | 97 | 98 | 99 | g_name 100 | Название группы 101 | 102 | 103 | g_description 104 | Описание 105 | 106 | 107 | close_groupW 108 | ОТМЕНА 109 | 110 | 111 | create_group 112 | ДАЛЕЕ 113 | 114 | 115 | 116 | 117 | 118 | add_user 119 | Добавить пользователя: 120 | 121 | 122 | username_lineedit 123 | Имя пользователя 124 | 125 | 126 | invite_cont_button 127 | Добавить 128 | 129 | 130 | errors 131 | Вы не можете добавить себя.. //Пользователь не найден.. //Пользователь уже добавлен.. 132 | 133 | 134 | 135 | 136 | 137 | count_member 138 | Участники: 139 | 140 | 141 | crGroup_button 142 | СОЗДАТЬ 143 | 144 | 145 | cancel_button 146 | ОТМЕНА 147 | 148 | 149 | 150 | 151 | 152 | newContact 153 | Добавить пользователя 154 | 155 | 156 | newGroup 157 | Создать группу 158 | 159 | 160 | close_choice 161 | ОТМЕНА 162 | 163 | 164 | next_choice 165 | ДАЛЕЕ 166 | 167 | 168 | contact_descr 169 | Добавить нового пользователя в список друзей 170 | 171 | 172 | group_descr 173 | Создать комнату для коллективного общения 174 | 175 | 176 | 177 | 178 | 179 | start_sys 180 | Загрузка при старте системы 181 | 182 | 183 | language 184 | Язык: 185 | 186 | 187 | down_path 188 | Загрузочный путь: 189 | 190 | 191 | Download_path_PB 192 | Изменить 193 | 194 | 195 | RB_sendEnter 196 | Отправка по "Enter" 197 | 198 | 199 | RB_send_CEnter 200 | Отправка по "Ctrl + Enter" 201 | 202 | 203 | ChBox_Notif 204 | Уведомления 205 | 206 | 207 | ChBox_PSound 208 | Звук 209 | 210 | 211 | background 212 | Выбор фона: 213 | 214 | 215 | PB_SelColor 216 | Выбрать из палитры: 217 | 218 | 219 | PB_LoadFileBackground 220 | Загрузить из файла: 221 | 222 | 223 | username_label 224 | Имя пользователя: 225 | 226 | 227 | radioButton 228 | По умолчанию 229 | 230 | 231 | radioButton_2 232 | Загрузить 233 | 234 | 235 | groupBox 236 | Аватар: 237 | 238 | 239 | userList_3 240 | Профиль, Основное, Опции чата, Сеть 241 | 242 | 243 | search_line_edit 244 | Поиск 245 | 246 | 247 | editText 248 | Введите сообщение.. 249 | 250 | 251 | start_textBrowser 252 | Пожалуйста, выберите диалог, чтобы начать общение или добавьте новых друзей! 253 | 254 | 255 | 256 | 257 | 258 | was_yesterday 259 | Заходил вчера в 260 | 261 | 262 | was_today 263 | Заходил сегодня в 264 | 265 | 266 | was_online 267 | в сети 268 | 269 | 270 | was_online 271 | в сети 272 | 273 | 274 | ago 275 | назад 276 | 277 | 278 | she_was 279 | Была 280 | 281 | 282 | he_was 283 | Был 284 | 285 | 286 | days 287 | дней 288 | 289 | 290 | day 291 | день 292 | 293 | 294 | of_the_day 295 | дня 296 | 297 | 298 | 299 | 300 | 301 | ContextDelUser 302 | Удалить пользователя 303 | 304 | 305 | ContextClearSelection 306 | Отменить выделение 307 | 308 | 309 | ContextClearHistory 310 | Очистить историю 311 | 312 | 313 | fileWindow 314 | Выбор файла для отправки 315 | 316 | 317 | SelectImages 318 | Выбор изображения 319 | 320 | 321 | NewGroup_msg 322 | Вы создали новый групповой диалог 323 | 324 | 325 | notice_msg 326 | Новое сообщение 327 | 328 | 329 | File 330 | Файл 331 | 332 | 333 | Ad_User 334 | Вы добавили пользователя 335 | 336 | 337 | Invate_msg 338 | Привет, позвольте мне добавить вас в список контактов? 339 | 340 | 341 | 342 | 343 | 344 | Disconnected_1 345 | Потеря соединения с сервером. 346 | 347 | 348 | ServerNF 349 | Сервер не найден. \nПожалуйста, укажите правильный адрес и порт сервера. 350 | 351 | 352 | Disconnected_2 353 | Соединение было разорвано клиентом. 354 | 355 | 356 | Occurred_err 357 | Произошла следующая ошибка: 358 | 359 | 360 | 361 | 362 | 363 | 364 | -------------------------------------------------------------------------------- /Client/Resource/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/background.jpg -------------------------------------------------------------------------------- /Client/Resource/botton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/botton.jpg -------------------------------------------------------------------------------- /Client/Resource/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-mkrv/Chat/d974ddd4a546c5385cbcb58a3b5c68df0408b8df/Client/Resource/header.jpg -------------------------------------------------------------------------------- /Client/aboutdialog.cpp: -------------------------------------------------------------------------------- 1 | #include "aboutdialog.h" 2 | #include "ui_aboutdialog.h" 3 | #include 4 | 5 | /******************************************************/ 6 | /* */ 7 | /* Information window about program. */ 8 | /* */ 9 | /******************************************************/ 10 | 11 | AboutDialog::AboutDialog(QWidget *parent) : 12 | QFrame(parent), 13 | ui(new Ui::AboutDialog) 14 | { 15 | ui->setupUi(this); 16 | this->setWindowFlags(Qt::Popup | Qt::Window); 17 | setWindowOpacity(0); 18 | show(); 19 | 20 | QPropertyAnimation* animation = new QPropertyAnimation(this, "windowOpacity"); 21 | 22 | animation->setDuration(1000); 23 | animation->setStartValue(0); 24 | animation->setEndValue(1); 25 | animation->start(); 26 | 27 | } 28 | 29 | AboutDialog::~AboutDialog() 30 | { 31 | delete ui; 32 | } 33 | -------------------------------------------------------------------------------- /Client/aboutdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef ABOUTDIALOG_H 2 | #define ABOUTDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class AboutDialog; 8 | } 9 | 10 | class AboutDialog : public QFrame 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit AboutDialog(QWidget *parent = 0); 16 | ~AboutDialog(); 17 | Ui::AboutDialog *ui; 18 | private: 19 | 20 | }; 21 | 22 | #endif // ABOUTDIALOG_H 23 | -------------------------------------------------------------------------------- /Client/aboutdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | AboutDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 380 10 | 480 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | background-color: rgb(255, 255, 255); 18 | 19 | 20 | 21 | 22 | -7 23 | -5 24 | 391 25 | 221 26 | 27 | 28 | 29 | background-color: rgb(99, 137, 168); 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 39 | 230 40 | 301 41 | 211 42 | 43 | 44 | 45 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 46 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 47 | p, li { white-space: pre-wrap; } 48 | </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;"> 49 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; color:#6389a8;">Бла - Бла - Бла</span></p> 50 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; color:#6389a8;">Проектик</span></p> 51 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; color:#6389a8;">Макаров Антон</span></p> 52 | <p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 53 | <p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; color:#6389a8;"><br /></p> 54 | <p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; color:#6389a8;"><br /></p> 55 | <p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; color:#6389a8;"><br /></p> 56 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; color:#6389a8;">2016</span></p></body></html> 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /Client/authorization.cpp: -------------------------------------------------------------------------------- 1 | #include "authorization.h" 2 | #include "ui_authorization.h" 3 | 4 | Authorization::Authorization(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::Authorization) 7 | { 8 | ui->setupUi(this); 9 | 10 | #ifdef __APPLE__ 11 | ui->username_enter->setAttribute(Qt::WA_MacShowFocusRect, false); 12 | ui->pass_enter->setAttribute(Qt::WA_MacShowFocusRect, false); 13 | #endif 14 | 15 | socket = new QTcpSocket; 16 | registration = new Registration(parent); 17 | passhash = new HashMD5; 18 | 19 | socket->abort(); 20 | socket->connectToHost("127.0.0.1", 55155); 21 | 22 | connect(ui->log_in, SIGNAL(clicked()), this, SLOT(onButtonSendUser())); 23 | connect(socket, SIGNAL(readyRead()), this, SLOT(GetMessage())); 24 | connect(socket, SIGNAL(disconnected()), this, SLOT(close())); 25 | connect(registration, SIGNAL(sendData(QString)), this, SLOT(RecieveData(QString))); 26 | 27 | ui->error_label->hide(); 28 | ui->errorconnect_label->hide(); 29 | ui->pass_enter->setEchoMode(QLineEdit::Password); 30 | 31 | this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::CustomizeWindowHint); 32 | this->show(); 33 | } 34 | 35 | void Authorization::mouseMoveEvent(QMouseEvent *event) 36 | { 37 | if (event->buttons() && Qt::LeftButton) { 38 | move(event->globalPos() - m_dragPosition); 39 | event->accept(); 40 | } 41 | } 42 | 43 | void Authorization::mousePressEvent(QMouseEvent *event) 44 | { 45 | if (event->button() == Qt::LeftButton) { 46 | m_dragPosition = event->globalPos() - frameGeometry().topLeft(); 47 | event->accept(); 48 | } 49 | } 50 | 51 | void Authorization::onButtonSendUser() 52 | { 53 | emit sendFindContact(ui->pass_enter->text().simplified()); 54 | } 55 | 56 | void Authorization::on_log_in_clicked() 57 | { 58 | QString request = "AUTH"; 59 | 60 | if (socket->state() != QAbstractSocket::ConnectedState) 61 | ui->errorconnect_label->show(); 62 | else 63 | ui->errorconnect_label->hide(); 64 | 65 | QString login = ui->username_enter->text().simplified(); 66 | QString password = passhash->HashSumPass(ui->pass_enter->text().simplified()); 67 | 68 | if (!login.isEmpty() && !ui->pass_enter->text().simplified().isEmpty()) 69 | { 70 | request.append(QString("%1 /s %2").arg(login).arg(password)); 71 | socket->write(request.toUtf8()); 72 | } 73 | } 74 | 75 | void Authorization::GetMessage() 76 | { 77 | QString received_message, pub_key; 78 | 79 | received_message = socket->read(4); 80 | pub_key = socket->readAll(); 81 | 82 | qDebug() << received_message << pub_key; 83 | 84 | if (received_message == "ERRA") 85 | ui->error_label->show(); 86 | 87 | else if (received_message == "OKEY" 88 | && !ui->username_enter->text().simplified().isEmpty() 89 | && !ui->pass_enter->text().simplified().isEmpty() 90 | ) 91 | { 92 | emit sendData(ui->username_enter->text().simplified(), ui->pass_enter->text().simplified(), pub_key); 93 | socket->close(); 94 | socket->disconnectFromHost(); 95 | } 96 | } 97 | 98 | void Authorization::keyReleaseEvent(QKeyEvent *event) 99 | { 100 | switch (event->key()) { 101 | case Qt::Key_Return: 102 | on_log_in_clicked(); 103 | break; 104 | } 105 | } 106 | 107 | void Authorization::on_reg_button_clicked() 108 | { 109 | if (socket->state() != QAbstractSocket::ConnectedState) 110 | ui->errorconnect_label->show(); 111 | else 112 | { 113 | ui->errorconnect_label->hide(); 114 | registration->show(); 115 | this->hide(); 116 | } 117 | } 118 | 119 | void Authorization::SetLanguage(QMap & lan_dict) 120 | { 121 | ui->username_enter->setPlaceholderText(lan_dict.value(ui->username_enter->objectName())); 122 | ui->pass_enter->setPlaceholderText(lan_dict.value(ui->pass_enter->objectName())); 123 | ui->error_label->setText(lan_dict.value(ui->error_label->objectName())); 124 | ui->reg_button->setText(lan_dict.value(ui->reg_button->objectName())); 125 | ui->log_in->setText(lan_dict.value(ui->log_in->objectName())); 126 | ui->errorconnect_label->setText(lan_dict.value(ui->errorconnect_label->objectName())); 127 | registration->SetLanguage(lan_dict); 128 | } 129 | 130 | void Authorization::RecieveData(QString rStr) 131 | { 132 | if (rStr == "Show") 133 | this->show(); 134 | } 135 | 136 | void Authorization::on_close_window_clicked() 137 | { 138 | this->close(); 139 | } 140 | 141 | void Authorization::on_turn_window_clicked() 142 | { 143 | this->showMinimized(); 144 | } 145 | 146 | Authorization::~Authorization() 147 | { 148 | delete ui; 149 | } 150 | 151 | -------------------------------------------------------------------------------- /Client/authorization.h: -------------------------------------------------------------------------------- 1 | #ifndef AUTHORIZATION_H 2 | #define AUTHORIZATION_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "registration.h" 10 | 11 | namespace Ui { 12 | class Authorization; 13 | } 14 | 15 | class Authorization : public QWidget 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit Authorization(QWidget *parent = 0); 21 | virtual void keyPressEvent(QKeyEvent* event) { key = event->key(); } 22 | virtual void keyReleaseEvent(QKeyEvent* event); 23 | 24 | ~Authorization(); 25 | bool ok; 26 | Ui::Authorization *ui; 27 | Registration *registration; 28 | 29 | private: 30 | QPoint m_dragPosition; 31 | HashMD5 *passhash; 32 | int key; 33 | 34 | protected: 35 | QTcpSocket *socket; 36 | void mouseMoveEvent(QMouseEvent *event); 37 | void mousePressEvent(QMouseEvent *event); 38 | 39 | signals: 40 | void sendData(QString str, QString pas, QString pubKey); 41 | void sendFindContact(QString str); 42 | 43 | private slots: 44 | void onButtonSendUser(); 45 | void RecieveData(QString rStr); 46 | void GetMessage(); 47 | void on_reg_button_clicked(); 48 | void on_close_window_clicked(); 49 | void on_turn_window_clicked(); 50 | void on_log_in_clicked(); 51 | 52 | public slots: 53 | void SetLanguage(QMap &); 54 | }; 55 | 56 | #endif // AUTHORIZATION_H 57 | -------------------------------------------------------------------------------- /Client/chatlistdelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "chatlistdelegate.h" 2 | #include 3 | 4 | /******************************************************/ 5 | /* */ 6 | /* ChatListDelegate replaces the standard display a */ 7 | /* list of chat and allows combining text and images */ 8 | /* */ 9 | /******************************************************/ 10 | 11 | ChatListDelegate::ChatListDelegate(QObject *parent, QString _color) 12 | { 13 | color = _color; 14 | } 15 | 16 | ////////////////////////////////////////////////////////// 17 | ////////////////////////////////////////////////////////// 18 | /// painter - responsible for drawing. 19 | /// option - display area 20 | /// index - takes the input parameters: 21 | // Sender's name - title 22 | // Message text - description 23 | // Definition (who and to whom) - T/F 24 | // Time - time 25 | // Image - mediaIcon (at the transmit / receive file) 26 | 27 | void ChatListDelegate::paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const{ 28 | QRect r = option.rect; 29 | 30 | // Get title, description and icon 31 | QIcon mediaIcon = QIcon(qvariant_cast(index.data(Qt::DecorationRole))); 32 | QString title = index.data(Qt::DisplayRole).toString(); 33 | QString description = index.data(Qt::UserRole + 1).toString(); 34 | QString time = index.data(Qt::ToolTipRole).toString(); 35 | int SizeMesBox = 0; 36 | 37 | static QString checkitem = 0; 38 | static QString tmp_checkitem = 0; 39 | QString newtime = 0; 40 | 41 | tmp_checkitem = time; 42 | 43 | // If a message is selected (pressed), changing the color(background) and size of the border area 44 | if (option.state & QStyle::State_Selected) 45 | { 46 | QLinearGradient gradientSelected(r.left(),r.top()+3,r.width(),r.height() - 6); 47 | gradientSelected.setColorAt(0.0, QColor::fromRgb(195,213,255)); 48 | gradientSelected.setColorAt(1.0, QColor::fromRgb(177,215,246)); 49 | painter->setBrush(gradientSelected); 50 | painter->drawRoundedRect(r.left(), r.top()+3, r.width(), r.height() - 6, 5, 5); 51 | 52 | if (tmp_checkitem != checkitem) 53 | if (time.size() > 14) 54 | { checkitem = time; 55 | newtime = checkitem.left(14) + " Start Download"; 56 | } 57 | 58 | } else { 59 | 60 | //Background 61 | painter->setRenderHint(QPainter::Antialiasing); 62 | 63 | // Setting the right message, indents 64 | 65 | //painter->setPen("#dbdcff" ); 66 | if (title.size() >= 25 && title.size() <= 35) 67 | SizeMesBox = title.size()+320; 68 | else if (title.size() < 25 && title.size() > 15) 69 | SizeMesBox = title.size() + 235; 70 | else if (title.size() <=15) 71 | SizeMesBox = title.size() + 180; 72 | else if (title.size() > 45) 73 | SizeMesBox = r.width() - 15; 74 | else if (title.size() > 35) 75 | SizeMesBox = title.size() + 400; 76 | 77 | painter->setPen(Qt::white); 78 | 79 | // Setting the message box. 80 | if (description == "FROM") 81 | { 82 | // #eeefff - Pale blue (From message) 83 | // #effdde - Pale green (To message) 84 | painter->setBrush(QColor("#d5d7ff")); 85 | painter->drawRoundedRect(r.left()+2, r.top()+3, SizeMesBox, r.height() - 6, 5, 5); 86 | } 87 | else if (description == "FROMF") 88 | { 89 | //painter->setBrush(QColor("#eeefff")); 90 | painter->drawRoundedRect(r.left()+2, r.top()+3, SizeMesBox+55, r.height() - 6, 5, 5); 91 | } 92 | 93 | else if (description == "TO") 94 | { 95 | painter->setBrush(QColor("#e3fcc6")); 96 | painter->drawRoundedRect(r.right()-SizeMesBox, r.top()+3, SizeMesBox-2, r.height() - 6, 5, 5); 97 | } 98 | else if (description == "TOF") 99 | { 100 | //painter->setBrush(QColor("#effdde")); 101 | painter->drawRoundedRect(r.right()-SizeMesBox-55, r.top()+3, SizeMesBox+53, r.height() - 6, 5, 5); 102 | } 103 | 104 | } 105 | 106 | 107 | painter->setPen( Qt::black ); 108 | if (description == "FROM" || description == "FROMF") 109 | { 110 | // The offset for the installation image 111 | int imageSpace = 10; 112 | if (!mediaIcon.isNull()) { 113 | r = option.rect.adjusted(2, 10, -1, -10); 114 | mediaIcon.paint(painter, r, Qt::AlignVCenter|Qt::AlignLeft); 115 | imageSpace = 85; 116 | } 117 | 118 | //TITLE 119 | r = option.rect.adjusted(imageSpace, 10, -10, -27); 120 | painter->setFont( QFont( "Lucida Grande", 16, QFont::Normal ) ); 121 | painter->drawText(r.left(), r.top(), r.width(), r.height(), Qt::AlignTop|Qt::AlignLeft, title, &r); 122 | 123 | // TIME 124 | r = option.rect.adjusted(imageSpace, 10, -10, -27); 125 | painter->setFont( QFont( "Lucida Grande", 11, QFont::Normal ) ); 126 | painter->drawText(r.left(), r.top()+10, r.width(), r.height(), Qt::AlignBottom|Qt::AlignLeft, time , &r); 127 | } 128 | else if (description == "TO" || description == "TOF") 129 | { 130 | int imageSpace = 20; 131 | if (!mediaIcon.isNull()) { 132 | r = option.rect.adjusted(10, 10, -10, -10); 133 | mediaIcon.paint(painter, r, Qt::AlignTop|Qt::AlignRight); 134 | imageSpace = 85; 135 | } 136 | 137 | if (description == "TOF") 138 | { 139 | //TITLE 140 | r = option.rect.adjusted(imageSpace, 10, -20, -27); 141 | painter->setFont( QFont( "Lucida Grande", 16, QFont::Normal ) ); 142 | painter->drawText(r.left()-75, r.top(), r.width(), r.height(), Qt::AlignTop|Qt::AlignRight, title, &r); 143 | // TIME 144 | r = option.rect.adjusted(imageSpace, 10, -20, -27); 145 | painter->setFont( QFont( "Lucida Grande", 11, QFont::Normal ) ); 146 | painter->drawText(r.left()-75, r.top()+10, r.width(), r.height(), Qt::AlignBottom|Qt::AlignRight, time , &r); 147 | } 148 | else 149 | { 150 | //TITLE 151 | r = option.rect.adjusted(imageSpace, 10, -20, -27); 152 | painter->setFont( QFont( "Lucida Grande", 16, QFont::Normal ) ); 153 | painter->drawText(r.left(), r.top(), r.width(), r.height(), Qt::AlignTop|Qt::AlignRight, title, &r); 154 | // TIME 155 | r = option.rect.adjusted(imageSpace, 10, -20, -27); 156 | painter->setFont( QFont( "Lucida Grande", 11, QFont::Normal ) ); 157 | painter->drawText(r.left()-3, r.top()+10, r.width(), r.height(), Qt::AlignBottom|Qt::AlignRight, time , &r); 158 | } 159 | } 160 | this->sizeHint(option, index); 161 | } 162 | 163 | ////////////////////////////////////////////////////////// 164 | ////////////////////////////////////////////////////////// 165 | /// Set the message block size 166 | QSize ChatListDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const{ 167 | return QSize(200, 70); // very dumb value 168 | } 169 | 170 | 171 | -------------------------------------------------------------------------------- /Client/chatlistdelegate.h: -------------------------------------------------------------------------------- 1 | #ifndef CHATLISTDELEGATE_H 2 | #define CHATLISTDELEGATE_H 3 | 4 | #include 5 | #include 6 | 7 | class ChatListDelegate : public QAbstractItemDelegate 8 | { 9 | public: 10 | ChatListDelegate(QObject *parent = 0, QString _color = 0); 11 | void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const; 12 | QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const; 13 | 14 | private: 15 | QString color; 16 | 17 | }; 18 | 19 | #endif // CHATLISTDELEGATE_H 20 | -------------------------------------------------------------------------------- /Client/choicecreate.cpp: -------------------------------------------------------------------------------- 1 | #include "choicecreate.h" 2 | #include "ui_choicecreate.h" 3 | 4 | /******************************************************/ 5 | /* */ 6 | /* Selection window between adding */ 7 | /* a contact or group creation */ 8 | /* */ 9 | /******************************************************/ 10 | 11 | ChoiceCreate::ChoiceCreate(QWidget *parent) : 12 | QFrame(parent), 13 | ui(new Ui::ChoiceCreate) 14 | { 15 | ui->setupUi(this); 16 | 17 | this->setWindowFlags(Qt::Popup | Qt::Window); 18 | setWindowOpacity(0); 19 | 20 | show(); 21 | 22 | // Setting animation when opening window 23 | QPropertyAnimation* animation = new QPropertyAnimation(this, "windowOpacity"); 24 | animation->setDuration(500); 25 | animation->setStartValue(0); 26 | animation->setEndValue(1); 27 | animation->start(); 28 | } 29 | 30 | ChoiceCreate::~ChoiceCreate() 31 | { 32 | delete ui; 33 | } 34 | 35 | ////////////////////////////////////////////////////////// 36 | ////////////////////////////////////////////////////////// 37 | /// Choice of a variant 38 | void ChoiceCreate::on_next_choice_clicked() 39 | { 40 | if (ui->newContact->isChecked()) 41 | { 42 | emit choice(QString("newContact")); 43 | this->close(); 44 | } 45 | 46 | if (ui->newGroup->isChecked()) 47 | { 48 | emit choice(QString("newGroup")); 49 | this->close(); 50 | } 51 | } 52 | 53 | ////////////////////////////////////////////////////////// 54 | ////////////////////////////////////////////////////////// 55 | /// Close window 56 | void ChoiceCreate::on_close_choice_clicked() 57 | { 58 | emit choice(QString("close")); 59 | this->close(); 60 | } 61 | 62 | ////////////////////////////////////////////////////////// 63 | ////////////////////////////////////////////////////////// 64 | /// Language setting. 65 | void ChoiceCreate::SetLanguage(QMap &lan_dict) 66 | { 67 | ui->newContact->setText(lan_dict.value(ui->newContact->objectName())); 68 | ui->newGroup->setText(lan_dict.value(ui->newGroup->objectName())); 69 | ui->close_choice->setText(lan_dict.value(ui->close_choice->objectName())); 70 | ui->next_choice->setText(lan_dict.value(ui->next_choice->objectName())); 71 | ui->contact_descr->setText(lan_dict.value(ui->contact_descr->objectName())); 72 | ui->group_descr->setText(lan_dict.value(ui->group_descr->objectName())); 73 | } 74 | -------------------------------------------------------------------------------- /Client/choicecreate.h: -------------------------------------------------------------------------------- 1 | #ifndef CHOICECREATE_H 2 | #define CHOICECREATE_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | namespace Ui { 9 | class ChoiceCreate; 10 | } 11 | 12 | class ChoiceCreate : public QFrame 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit ChoiceCreate(QWidget *parent = 0); 18 | ~ChoiceCreate(); 19 | 20 | private slots: 21 | void on_next_choice_clicked(); 22 | void on_close_choice_clicked(); 23 | 24 | signals: 25 | void choice(QString); 26 | 27 | public slots: 28 | void SetLanguage(QMap &); 29 | 30 | private: 31 | Ui::ChoiceCreate *ui; 32 | }; 33 | 34 | #endif // CHOICECREATE_H 35 | -------------------------------------------------------------------------------- /Client/choicecreate.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ChoiceCreate 4 | 5 | 6 | 7 | 0 8 | 0 9 | 343 10 | 228 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | background-color: rgb(255, 255, 255); 18 | 19 | 20 | 21 | 22 | 40 23 | 20 24 | 271 25 | 121 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 10 34 | 35 | 36 | 37 | New contact 38 | 39 | 40 | 41 | 42 | 43 | 44 | color: rgb(131, 131, 131); 45 | 46 | 47 | Add a new user to your friend list 48 | 49 | 50 | 51 | 52 | 53 | 54 | Qt::Vertical 55 | 56 | 57 | 58 | 20 59 | 40 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 10 69 | 70 | 71 | 72 | New group 73 | 74 | 75 | 76 | 77 | 78 | 79 | color: rgb(131, 131, 131); 80 | 81 | 82 | Create a group room for collective dialogue 83 | 84 | 85 | 86 | 87 | 88 | 89 | Qt::Vertical 90 | 91 | 92 | 93 | 20 94 | 40 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 40 105 | 150 106 | 271 107 | 51 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 10 116 | 117 | 118 | 119 | QPushButton{color: rgb(126, 126, 126); background: white;} 120 | QPushButton:hover{background: #f6f4ff; border:none;} 121 | 122 | 123 | CANCEL 124 | 125 | 126 | true 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 10 135 | 136 | 137 | 138 | 139 | QPushButton{color: rgb(65, 109, 211); background: white;} 140 | QPushButton:hover{background: #f6f4ff; border:none;} 141 | 142 | 143 | NEXT 144 | 145 | 146 | true 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /Client/client.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIENT_H 2 | #define CLIENT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "emojiframe.h" 34 | #include "findcontacts.h" 35 | #include "trayicon.h" 36 | #include "authorization.h" 37 | #include "listwidgetemoji.h" 38 | #include "userlistdelegate.h" 39 | #include "chatlistdelegate.h" 40 | #include "aboutdialog.h" 41 | #include "notification.h" 42 | #include "rsacrypt.h" 43 | #include "confirmwindow.h" 44 | #include "creategroup.h" 45 | #include "choicecreate.h" 46 | #include "selectcontacts.h" 47 | #include "usersgroupinfo.h" 48 | #include "xml_language.h" 49 | 50 | 51 | typedef QList > > > ChatListVector; 52 | typedef QList > PairStringList; 53 | 54 | namespace Ui { 55 | class Client; 56 | } 57 | 58 | class Client : public QMainWindow 59 | { 60 | Q_OBJECT 61 | 62 | public: 63 | explicit Client(QWidget *parent = 0); 64 | virtual void keyPressEvent(QKeyEvent* event) { key = event->key(); } 65 | virtual void keyReleaseEvent(QKeyEvent* event); 66 | ~Client(); 67 | 68 | protected: 69 | void closeEvent(QCloseEvent *event); 70 | void mouseMoveEvent(QMouseEvent *event); 71 | void mousePressEvent(QMouseEvent *event); 72 | 73 | private slots: 74 | void on_sendMessage_clicked(); 75 | void on_userSetting_clicked(); 76 | void on_close_setting_button_clicked(); 77 | void on_pushButton_clicked(); 78 | void on_newContact_Button_clicked(); 79 | void on_actionShowHideWindow_triggered(); 80 | void on_actionExit_triggered(); 81 | void on_PB_SelColor_clicked(); 82 | void on_PB_LoadFileBackground_clicked(); 83 | void on_radioButton_2_clicked(); 84 | void on_radioButton_clicked(); 85 | void on_Download_path_PB_clicked(); 86 | void on_pushButton_2_clicked(); 87 | void on_userList_clicked(const QModelIndex &index); 88 | void on_pushButton_3_clicked(); 89 | void on_pushButton_5_clicked(); 90 | void on_search_line_edit_textChanged(const QString &arg1); 91 | void on_search_list_clicked(const QModelIndex &index); 92 | void on_glass_button_clicked(); 93 | void on_info_user_button_clicked(); 94 | void on_select_language_box_currentIndexChanged(int index); 95 | 96 | void ChoiceWindow(QString); 97 | void AddGroupToList(QStringList, QString); 98 | void ShowContextMenuForWidget(const QPoint &pos); 99 | void ShowContextMenuForChat(const QPoint &pos); 100 | void ClearHistory(); 101 | void ClearCurHistory(QString); 102 | void ClearCurUser(QString); 103 | void ClearSelect(); 104 | void DeleteUser(); 105 | void SetGlass(); 106 | void ParseResponseUserList(QString, ChatListVector &); 107 | void ParseResponseChatList(QString ); 108 | void AddUserToList(QString, QString, PairStringList, int); 109 | void AddChatToList(QString ); 110 | void InsertEmoticon(QString symbol); 111 | void FindUserInServer(QString str); 112 | void WhisperOnClickUsers(QListWidgetItem* user); 113 | void IconActivated(QSystemTrayIcon::ActivationReason reason); 114 | void ShowHideWindow(); 115 | void GetMessage(); 116 | void ShowError(QAbstractSocket::SocketError errorSocket); 117 | void SendPersonalData(); 118 | void OnDisconnect(); 119 | void WhisperOnClick(QListWidgetItem* user); 120 | void ShowEmoji(); 121 | void ShowUserFound(); 122 | void ShowCreateGroup(); 123 | void GetCreateGroupSig(QString, QString, QString, QString); 124 | void SetDefaultLanguage(); 125 | void SetLanguage(); 126 | void RemoveSelections(); 127 | QString SuffixDay(int day); 128 | QString Pronoun(QString username); 129 | 130 | public slots: 131 | 132 | // Sending personal data at authorization and receiving keys. 133 | void RecieveData(QString str, QString pas, QString); 134 | 135 | signals: 136 | void find_user_Serv(QString str); 137 | void setProcentage(int); 138 | 139 | private: 140 | Ui::Client *ui; 141 | 142 | int FriendCount; 143 | int key; 144 | quint32 blockSize; 145 | quint32 nextBlockSize; 146 | bool personDates; 147 | 148 | QMenu *trayIconMenu; 149 | QStackedLayout *layout; 150 | QTcpSocket *tcpSocket; 151 | 152 | QMap pubFriendKey; 153 | QVector vec; 154 | QVector chatvec; 155 | QMap lan_dict; 156 | QHash FriendOnlineStatus; 157 | QHash SexOfUsers; 158 | 159 | QStringList groupData; 160 | QString name; 161 | QString download_path; 162 | QString colorchat; 163 | QString myPrivateKey; 164 | QString myPublicKey; 165 | QPoint m_dragPosition; 166 | 167 | QStackedWidget *stackchat; 168 | QFile *sendFile; 169 | 170 | TrayIcon *trayIcon; 171 | EmojiManager *emojiMan; 172 | EmojiFrame *frameEmoji; 173 | findcontacts *findcont; 174 | AboutDialog *aboutdialog; 175 | Authorization *authorization; 176 | ConfirmWindow *conf_message; 177 | CreateGroup *create_group; 178 | ChoiceCreate *choice_window; 179 | SelectContacts *selectContacts; 180 | UsersGroupInfo *users_info; 181 | Notification *notice; 182 | RSACrypt *rsaCrypt; 183 | XML_Language *set_language; 184 | }; 185 | 186 | #endif // CLIENT_H 187 | -------------------------------------------------------------------------------- /Client/client_define.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIENT_DEFINE_H 2 | #define CLIENT_DEFINE_H 3 | 4 | // Client class UI 5 | #define U_userList ui->userList 6 | #define U_stackedWidget_2 ui->stackedWidget_2 7 | #define U_userList ui->userList 8 | #define U_search_list ui->search_list 9 | #define U_widget_2 ui->widget_2 10 | #define U_glass_button ui->glass_button 11 | #define U_userSetting_button ui->userSetting_button 12 | #define U_close_setting_button_2 ui->close_setting_button_2 13 | #define U_userList_3 ui->userList_3 14 | #define U_actionExit ui->actionExit 15 | #define U_RB_sendEnter ui->RB_sendEnter 16 | #define U_RB_send_CEnter ui->RB_send_CEnter 17 | #define U_usernameEdit ui->usernameEdit 18 | #define U_editText ui->editText 19 | #define U_start_textBrowser ui->start_textBrowser 20 | #define U_label_6 ui->label_6 21 | #define U_ChBox_Notif ui->ChBox_Notif 22 | #define U_ChBox_PSound ui->ChBox_PSound 23 | #define U_stackedWidget ui->stackedWidget 24 | #define U_actionShowHideWindow ui->actionShowHideWindow 25 | #define U_imageLabel ui->imageLabel 26 | #define U_chat_back_lab ui->chat_back_lab 27 | #define U_avatar_label ui->avatar_label 28 | #define U_language ui->language 29 | #define U_down_path ui->down_path 30 | #define U_background ui->background 31 | #define U_PB_SelColor ui->PB_SelColor 32 | #define U_PB_LoadFileBackground ui->PB_LoadFileBackground 33 | #define U_username_label ui->username_label 34 | #define U_radioButton ui->radioButton 35 | #define U_radioButton_2 ui->radioButton_2 36 | #define U_groupBox ui->groupBox 37 | #define U_search_line_edit ui->search_line_edit 38 | #define U_start_sys ui->start_sys 39 | #define U_textEdit1 ui->textEdit1 40 | #define U_head_name ui->head_name 41 | #define U_online_status ui->online_status 42 | #define U_setTitle ui->settingTitle 43 | 44 | // Other 45 | #define DEFAULT_LANGUAGE QString("EN_Language") 46 | 47 | #define HOME_PATH_KEY QDir::homePath() + "/WhisperServer/Whisper Close Key/" 48 | #define EN_AVATARS_PATH ":/EnLetters/Resource/RoundLetters(ENG)/" 49 | #define RU_AVATARS_PATH ":/RuLetters/Resource/RoundLetters(RUS)/" 50 | #define ICON_FILE_PATH ":/Icons/Resource/Icon/ic_chat_file.png" 51 | 52 | #define SOUND_FROM ":/new/prefix1/Resource/from.wav" 53 | #define SOUND_TO ":/new/prefix1/Resource/to.wav" 54 | 55 | #endif // CLIENT_DEFINE_H 56 | -------------------------------------------------------------------------------- /Client/confirmwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "confirmwindow.h" 2 | #include "ui_confirmwindow.h" 3 | #include 4 | 5 | /******************************************************/ 6 | /* */ 7 | /* The confirmation screen to delete */ 8 | /* a user from the list, */ 9 | /* or delete messages from the chat. */ 10 | /* */ 11 | /******************************************************/ 12 | 13 | ConfirmWindow::ConfirmWindow(QWidget *parent, QString _message) : 14 | QFrame(parent), 15 | ui(new Ui::ConfirmWindow) 16 | { 17 | ui->setupUi(this); 18 | message = _message; 19 | ui->confirm_message->setText(message); 20 | 21 | this->setWindowFlags(Qt::Popup | Qt::Window); 22 | setWindowOpacity(0); 23 | show(); 24 | 25 | QPropertyAnimation* animation = new QPropertyAnimation(this, "windowOpacity"); 26 | animation->setDuration(1000); 27 | animation->setStartValue(0); 28 | animation->setEndValue(1); 29 | animation->start(); 30 | } 31 | 32 | 33 | ////////////////////////////////////////////////////////// 34 | ////////////////////////////////////////////////////////// 35 | /// Confirm selection 36 | void ConfirmWindow::on_ok_Button_clicked() 37 | { 38 | emit response(QString("OK")); 39 | } 40 | 41 | ////////////////////////////////////////////////////////// 42 | ////////////////////////////////////////////////////////// 43 | /// Cancel selection 44 | void ConfirmWindow::on_cancel_Button_clicked() 45 | { 46 | emit response(QString("Cancel")); 47 | } 48 | 49 | ////////////////////////////////////////////////////////// 50 | ////////////////////////////////////////////////////////// 51 | /// Language setting. 52 | void ConfirmWindow::SetLanguage(QMap & lan_dict) 53 | { 54 | ui->cancel_Button->setText(lan_dict.value("cancel_Button_conf")); 55 | ui->ok_Button->setText(lan_dict.value(ui->ok_Button->objectName())); 56 | } 57 | 58 | ConfirmWindow::~ConfirmWindow() 59 | { 60 | delete ui; 61 | } 62 | -------------------------------------------------------------------------------- /Client/confirmwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIRMWINDOW_H 2 | #define CONFIRMWINDOW_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class ConfirmWindow; 9 | } 10 | 11 | class ConfirmWindow : public QFrame 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit ConfirmWindow(QWidget *parent = 0, QString _message = 0); 17 | ~ConfirmWindow(); 18 | 19 | private: 20 | Ui::ConfirmWindow *ui; 21 | QString message; 22 | 23 | signals: 24 | void response(QString); 25 | 26 | private slots: 27 | void on_ok_Button_clicked(); 28 | void on_cancel_Button_clicked(); 29 | 30 | public slots: 31 | void SetLanguage(QMap &); 32 | }; 33 | 34 | #endif // CONFIRMWINDOW_H 35 | -------------------------------------------------------------------------------- /Client/confirmwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ConfirmWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 350 10 | 170 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | background-color: rgb(255, 255, 255); 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 11 27 | 28 | 29 | 30 | 31 | 32 | 33 | Qt::AlignCenter 34 | 35 | 36 | 37 | 38 | 39 | 40 | Qt::Horizontal 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 10 51 | 52 | 53 | 54 | 55 | QPushButton{ background: white;} 56 | QPushButton:hover{background: #f6f4ff; border:none;} 57 | 58 | 59 | CANCEL 60 | 61 | 62 | true 63 | 64 | 65 | 66 | 67 | 68 | 69 | Qt::Vertical 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 10 78 | 79 | 80 | 81 | 82 | QPushButton{color: rgb(255,0,0); background: white;} 83 | QPushButton:hover{background: #f6f4ff; border:none;} 84 | 85 | 86 | OK 87 | 88 | 89 | true 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Client/creategroup.cpp: -------------------------------------------------------------------------------- 1 | #include "creategroup.h" 2 | #include "ui_creategroup.h" 3 | 4 | /******************************************************/ 5 | /* */ 6 | /* Window create a group */ 7 | /* (1 stage - without adding users). */ 8 | /* The group name, avatar and description. */ 9 | /* */ 10 | /******************************************************/ 11 | 12 | 13 | CreateGroup::CreateGroup(QWidget *parent) : 14 | QFrame(parent), 15 | ui(new Ui::CreateGroup) 16 | { 17 | ui->setupUi(this); 18 | 19 | //To hide the edges of the form and standard buttons. 20 | this->setWindowFlags(Qt::Popup | Qt::Window); 21 | setWindowOpacity(0); 22 | show(); 23 | 24 | //Setting animation when opening window 25 | QPropertyAnimation* animation = new QPropertyAnimation(this, "windowOpacity"); 26 | animation->setDuration(500); 27 | animation->setStartValue(0); 28 | animation->setEndValue(1); 29 | animation->start(); 30 | 31 | } 32 | 33 | ////////////////////////////////////////////////////////// 34 | ////////////////////////////////////////////////////////// 35 | ///If added to the group name and description, then proceed to add users (sekestkontakt class), the signal is sent. 36 | void CreateGroup::on_create_group_clicked() 37 | { 38 | if (!ui->g_name->text().isEmpty() && !ui->g_description->text().isEmpty()) 39 | { 40 | emit GroupSignal(QString("Create"), ui->g_name->text(), ui->g_description->text(), "path"); 41 | this->close(); 42 | } 43 | } 44 | 45 | ////////////////////////////////////////////////////////// 46 | ////////////////////////////////////////////////////////// 47 | /// Cancel group creation. Close window 48 | void CreateGroup::on_close_groupW_clicked() 49 | { 50 | emit GroupSignal(QString("Close"), 0, 0, 0); 51 | this->close(); 52 | } 53 | 54 | ////////////////////////////////////////////////////////// 55 | ////////////////////////////////////////////////////////// 56 | /// Adding an avatar for the group. 57 | void CreateGroup::on_group_avatar_clicked() 58 | { 59 | QString files = QFileDialog::getOpenFileName(this, tr("Select Images"), "" , tr("Images (*.jpg *jpeg *.png)")); 60 | 61 | if (QString::compare(files, QString()) !=0 ) 62 | { 63 | QPixmap pixmap(files); 64 | bool vol = true; 65 | 66 | // Sometimes it badly works and the window disappears, to fix a bug. 67 | if (vol) 68 | { 69 | QIcon ButtonIcon(pixmap); 70 | ui->group_avatar->setIcon(ButtonIcon); 71 | //ui->group_avatar->setIconSize(pixmap.rect().size()); 72 | //ui->group_avatar->setIcon(); 73 | //ui->group_avatar->s chat_back_lab->setPixmap(QPixmap::fromImage(image)); 74 | // ui->imageLabel->setPixmap(QPixmap::fromImage(image)); 75 | } 76 | else 77 | { 78 | //Error 79 | } 80 | } 81 | } 82 | 83 | ////////////////////////////////////////////////////////// 84 | ////////////////////////////////////////////////////////// 85 | /// Language setting. 86 | void CreateGroup::SetLanguage(QMap & lan_dict) 87 | { 88 | ui->g_name->setPlaceholderText(lan_dict.value(ui->g_name->objectName())); 89 | ui->g_description->setPlaceholderText(lan_dict.value(ui->g_description->objectName())); 90 | ui->close_groupW->setText(lan_dict.value(ui->close_groupW->objectName())); 91 | ui->create_group->setText(lan_dict.value(ui->create_group->objectName())); 92 | } 93 | 94 | CreateGroup::~CreateGroup() 95 | { 96 | //delete ui; 97 | } 98 | -------------------------------------------------------------------------------- /Client/creategroup.h: -------------------------------------------------------------------------------- 1 | #ifndef CREATEGROUP_H 2 | #define CREATEGROUP_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace Ui { 10 | class CreateGroup; 11 | } 12 | 13 | class CreateGroup : public QFrame 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit CreateGroup(QWidget *parent = 0); 19 | ~CreateGroup(); 20 | 21 | private slots: 22 | void on_create_group_clicked(); 23 | void on_close_groupW_clicked(); 24 | void on_group_avatar_clicked(); 25 | 26 | signals: 27 | void GroupSignal(QString, QString, QString, QString); 28 | 29 | public slots: 30 | void SetLanguage(QMap &); 31 | 32 | private: 33 | Ui::CreateGroup *ui; 34 | }; 35 | 36 | #endif // CREATEGROUP_H 37 | -------------------------------------------------------------------------------- /Client/creategroup.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | CreateGroup 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 230 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | background-color: rgb(255, 255, 255); 18 | 19 | 20 | 21 | 22 | 20 23 | 20 24 | 351 25 | 112 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 110 34 | 110 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | :/Icons/Resource/Icon/ic_group_avatar.png:/Icons/Resource/Icon/ic_group_avatar.png 46 | 47 | 48 | 49 | 62 50 | 62 51 | 52 | 53 | 54 | true 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 10 65 | 66 | 67 | 68 | border-width: 1px; 69 | border-bottom-color: rgb(85, 85, 255); 70 | border-style: outset; 71 | border-top-color: rgb(255, 255, 255); 72 | border-right-color: rgb(255, 255, 255); 73 | border-left-color: rgb(255, 255, 255); 74 | 75 | 76 | Group name 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 10 85 | 86 | 87 | 88 | border-width: 1px; 89 | border-bottom-color: rgb(85, 85, 255); 90 | border-style: outset; 91 | border-top-color: rgb(255, 255, 255); 92 | border-right-color: rgb(255, 255, 255); 93 | border-left-color: rgb(255, 255, 255); 94 | 95 | 96 | true 97 | 98 | 99 | Group description 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 20 111 | 160 112 | 351 113 | 34 114 | 115 | 116 | 117 | 118 | 119 | 120 | Qt::Horizontal 121 | 122 | 123 | QSizePolicy::Fixed 124 | 125 | 126 | 127 | 100 128 | 20 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 10 140 | 141 | 142 | 143 | QPushButton{color: rgb(126, 126, 126); background: white;} 144 | QPushButton:hover{background: #f6f4ff; border:none;} 145 | 146 | 147 | CANCEL 148 | 149 | 150 | true 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 10 159 | 160 | 161 | 162 | 163 | QPushButton{color: rgb(65, 109, 211); background: white;} 164 | QPushButton:hover{background: #f6f4ff; border:none;} 165 | 166 | 167 | NEXT 168 | 169 | 170 | true 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /Client/emojiframe.cpp: -------------------------------------------------------------------------------- 1 | #include "emojiframe.h" 2 | #include "ui_emojiframe.h" 3 | 4 | EmojiFrame::EmojiFrame(QWidget *parent, QString emojiPath) : 5 | QFrame(parent), 6 | ui(new Ui::EmojiFrame) 7 | { 8 | ui->setupUi(this); 9 | this->setWindowFlags(Qt::Popup | Qt::Window); 10 | 11 | m_emojiPath = emojiPath; 12 | 13 | emojiMan = new EmojiManager(); 14 | 15 | loadComboCategories(); 16 | connect(ui->comboEmojiCategory, SIGNAL(currentIndexChanged(QString)), this, SLOT(loadEmojiCategory(QString))); 17 | connect(ui->listWidgetEmoji, SIGNAL(sendEmoji(QString)), this, SLOT(emojiDoubleClickReceived(QString))); 18 | 19 | ui->listWidgetEmoji->setEmojiManager(emojiMan); 20 | ui->listWidgetEmoji->loadEmojiListView("All"); 21 | } 22 | 23 | EmojiFrame::~EmojiFrame() 24 | { 25 | delete ui; 26 | } 27 | 28 | void EmojiFrame::loadComboCategories() 29 | { 30 | QList eCatList = emojiMan->getEmojiCategoryList(); 31 | 32 | for (int i = 0; i < eCatList.count(); i++) { 33 | QString name = eCatList.at(i).categoryName; 34 | QString iconNumber = eCatList.at(i).iconNumber; 35 | 36 | QIcon ico; 37 | QString iconFileName = QString("%1/x-%2.png") 38 | .arg(m_emojiPath) 39 | .arg(iconNumber); 40 | QPixmap p(iconFileName); 41 | ico.addPixmap(p); 42 | 43 | ui->comboEmojiCategory->addItem(p, name); 44 | } 45 | } 46 | 47 | void EmojiFrame::loadEmojiCategory(QString category) 48 | { 49 | ui->listWidgetEmoji->clear(); 50 | ui->listWidgetEmoji->loadEmojiListView(category); 51 | } 52 | 53 | void EmojiFrame::emojiDoubleClickReceived(QString symbol) 54 | { 55 | emit sendEmoji(symbol); 56 | } 57 | -------------------------------------------------------------------------------- /Client/emojiframe.h: -------------------------------------------------------------------------------- 1 | #ifndef EMOJIFRAME_H 2 | #define EMOJIFRAME_H 3 | 4 | #include 5 | #include "listwidgetemoji.h" 6 | #include "emojimanager.h" 7 | 8 | 9 | namespace Ui { 10 | class EmojiFrame; 11 | } 12 | 13 | class EmojiFrame : public QFrame 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit EmojiFrame(QWidget *parent = 0, QString emojiPath = ""); 19 | ~EmojiFrame(); 20 | 21 | private: 22 | Ui::EmojiFrame *ui; 23 | EmojiManager *emojiMan; 24 | QString m_emojiPath; 25 | void loadComboCategories(); 26 | 27 | private slots: 28 | void loadEmojiCategory(QString category); 29 | void emojiDoubleClickReceived(QString symbol); 30 | 31 | signals: 32 | void sendEmoji(QString); 33 | }; 34 | 35 | #endif // EMOJIFRAME_H 36 | -------------------------------------------------------------------------------- /Client/emojiframe.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | EmojiFrame 4 | 5 | 6 | 7 | 0 8 | 0 9 | 425 10 | 288 11 | 12 | 13 | 14 | Frame 15 | 16 | 17 | QFrame::StyledPanel 18 | 19 | 20 | QFrame::Raised 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 32 | 33 | 34 | Category 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | Qt::Horizontal 47 | 48 | 49 | 50 | 51 | 52 | 53 | QListView::Adjust 54 | 55 | 56 | QListView::SinglePass 57 | 58 | 59 | 60 | 20 61 | 20 62 | 63 | 64 | 65 | QListView::IconMode 66 | 67 | 68 | true 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | ListWidgetEmoji 77 | QListWidget 78 |
listwidgetemoji.h
79 |
80 |
81 | 82 | 83 |
84 | -------------------------------------------------------------------------------- /Client/emojimanager.cpp: -------------------------------------------------------------------------------- 1 | #include "emojimanager.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | EmojiManager::EmojiManager(QObject *parent) : QObject(parent) 10 | { 11 | QString binDir = QCoreApplication::applicationDirPath(); 12 | QString dataDir = binDir; 13 | dataDir = QDir::cleanPath(dataDir + "/"); 14 | QDir dataLocation(dataDir + "/data"); 15 | 16 | QString fileName = dataLocation.absolutePath() + "/emojilist.txt"; 17 | 18 | QStringList listTmp = readText(fileName); 19 | 20 | // Insert firts category of emoji (ALL) 21 | EmojiCategory emojiCat; 22 | emojiCat.categoryName = "All"; 23 | emojiCat.iconNumber = "093"; 24 | 25 | categoryList << emojiCat; 26 | 27 | parseEmoticonList(listTmp); 28 | 29 | } 30 | 31 | QStringList EmojiManager::readText(QString fileName) 32 | { 33 | QStringList content; 34 | 35 | QFile file(fileName); 36 | if (file.open(QFile::ReadOnly | QFile::Text)) { 37 | QTextStream in(&file); 38 | QString line; 39 | do { 40 | line = in.readLine(); 41 | content << line; 42 | } while (!line.isNull()); 43 | } 44 | 45 | return content; 46 | } 47 | 48 | void EmojiManager::parseEmoticonList(QStringList content) 49 | { 50 | QString currentCategory; // currentCategory remembers the current category for every emoji! 51 | 52 | for (int i = 0; i < content.count(); i++) { 53 | QString line = content.at(i); 54 | 55 | if (line.isEmpty()) 56 | break; 57 | 58 | if (line[0] == ';') { 59 | QStringList splitLine = line.split(" = "); 60 | 61 | currentCategory = splitLine.at(0); 62 | currentCategory = currentCategory.remove(";"); 63 | 64 | EmojiCategory emojiCat; 65 | emojiCat.categoryName = currentCategory; 66 | emojiCat.iconNumber = splitLine.at(1); 67 | 68 | categoryList << emojiCat; 69 | } 70 | else { 71 | QStringList splitLine = line.split(" = "); 72 | 73 | Emoji emoji; 74 | 75 | emoji.symbol = splitLine.at(0); 76 | emoji.description = splitLine.at(1); 77 | emoji.pixmapIconNumber = splitLine.at(2); 78 | emoji.category = currentCategory; 79 | 80 | symbolNumberMap.insert(emoji.symbol, emoji.pixmapIconNumber); 81 | numberSymbolMap.insert(emoji.pixmapIconNumber, emoji.symbol); 82 | 83 | emojiList << emoji; 84 | 85 | /*qDebug() << "Symbol " << splitLine.at(0); 86 | qDebug() << "Name " << splitLine.at(1); 87 | qDebug() << "Number " << splitLine.at(2); 88 | qDebug() << "Category " << currentCategory; 89 | qDebug() << "------\n";*/ 90 | } 91 | } 92 | } 93 | 94 | QList EmojiManager::getEmojiList() 95 | { 96 | return emojiList; 97 | } 98 | 99 | QList EmojiManager::getEmojiCategoryList() 100 | { 101 | return categoryList; 102 | } 103 | 104 | QString EmojiManager::getEmojiNumberFromSymbol(QString symbol) 105 | { 106 | return symbolNumberMap[symbol]; 107 | } 108 | 109 | QString EmojiManager::getEmojiSymbolFromNumber(QString number) 110 | { 111 | return numberSymbolMap[number]; 112 | } 113 | -------------------------------------------------------------------------------- /Client/emojimanager.h: -------------------------------------------------------------------------------- 1 | #ifndef EMOJIMANAGER_H 2 | #define EMOJIMANAGER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class Emoji 9 | { 10 | public: 11 | QString symbol; 12 | QString description; 13 | QString pixmapIconNumber; 14 | QString category; 15 | }; 16 | 17 | class EmojiCategory 18 | { 19 | public: 20 | QString categoryName; 21 | QString iconNumber; 22 | }; 23 | 24 | class EmojiManager : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit EmojiManager(QObject *parent = 0); 29 | 30 | QList getEmojiList(); 31 | QList getEmojiCategoryList(); 32 | QString getEmojiNumberFromSymbol(QString symbol); 33 | QString getEmojiSymbolFromNumber(QString number); 34 | 35 | private: 36 | QStringList readText(QString fileName); 37 | void parseEmoticonList(QStringList content); 38 | QList emojiList; 39 | QList categoryList; 40 | QMap symbolNumberMap; 41 | QMap numberSymbolMap; 42 | 43 | signals: 44 | 45 | public slots: 46 | }; 47 | 48 | #endif // EMOJIMANAGER_H 49 | -------------------------------------------------------------------------------- /Client/findcontacts.cpp: -------------------------------------------------------------------------------- 1 | #include "findcontacts.h" 2 | #include "ui_findcontacts.h" 3 | #include 4 | #include 5 | #include 6 | 7 | /******************************************************/ 8 | /* */ 9 | /* User search window on the server. */ 10 | /* */ 11 | /******************************************************/ 12 | 13 | findcontacts::findcontacts(QWidget *parent) : 14 | QFrame(parent), 15 | ui(new Ui::findcontacts) 16 | { 17 | ui->setupUi(this); 18 | ui->error_lay->hide(); 19 | 20 | //To hide the edges of the form and standard buttons. 21 | this->setWindowFlags(Qt::Popup | Qt::Window); 22 | setWindowOpacity(0); 23 | 24 | show(); 25 | connect(ui->invite_cont_button, SIGNAL(clicked()), this, SLOT(on_invite_cont_button_clicked())); 26 | 27 | //Setting animation when opening window 28 | QPropertyAnimation* animation = new QPropertyAnimation(this, "windowOpacity"); 29 | animation->setDuration(500); 30 | animation->setStartValue(0); 31 | animation->setEndValue(1); 32 | animation->start(); 33 | 34 | } 35 | 36 | ////////////////////////////////////////////////////////// 37 | ////////////////////////////////////////////////////////// 38 | ///Enter a user name and send it (through signal) to the server via the main class. 39 | void findcontacts::on_invite_cont_button_clicked() 40 | { 41 | username = ui->username_lineedit->text(); 42 | emit findUsers(username); 43 | } 44 | 45 | ////////////////////////////////////////////////////////// 46 | ////////////////////////////////////////////////////////// 47 | ///Message from the server of the request error. 48 | //1. You can add yourself e (find yourself). 49 | //2. The user is not found. 50 | //3. The user has been added (in the list) 51 | void findcontacts::SetErrorLayout(int _show) 52 | { 53 | switch (_show) { 54 | case 0: 55 | ui->error_lay->setText(errors.at(0)); //You can not add yourself.. 56 | ui->error_lay->show(); 57 | break; 58 | case 1: 59 | ui->error_lay->setText(errors.at(1)); //User is not found.. 60 | ui->error_lay->show(); 61 | break; 62 | case 2: 63 | ui->error_lay->setText(errors.at(2)); //User is already added.. 64 | ui->error_lay->show(); 65 | break; 66 | } 67 | } 68 | 69 | ////////////////////////////////////////////////////////// 70 | ////////////////////////////////////////////////////////// 71 | /// Language setting. 72 | void findcontacts::SetLanguage(QMap & lan_dict) 73 | { 74 | ui->add_user->setText(lan_dict.value(ui->add_user->objectName())); 75 | ui->username_lineedit->setPlaceholderText(lan_dict.value(ui->username_lineedit->objectName())); 76 | ui->invite_cont_button->setText(lan_dict.value(ui->invite_cont_button->objectName())); 77 | 78 | errors = lan_dict.value("errors").split("//"); 79 | 80 | } 81 | 82 | findcontacts::~findcontacts() 83 | { 84 | delete ui; 85 | } 86 | -------------------------------------------------------------------------------- /Client/findcontacts.h: -------------------------------------------------------------------------------- 1 | #ifndef FINDCONTACTS_H 2 | #define FINDCONTACTS_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Ui { 9 | class findcontacts; 10 | } 11 | 12 | class findcontacts : public QFrame 13 | { 14 | Q_OBJECT 15 | 16 | private: 17 | QStringList errors; 18 | 19 | public: 20 | explicit findcontacts(QWidget *parent = 0); 21 | 22 | Ui::findcontacts *ui; 23 | QString username; 24 | void SetErrorLayout(int _show); 25 | 26 | ~findcontacts(); 27 | 28 | signals: 29 | void findUsers(QString str); 30 | 31 | private slots: 32 | void on_invite_cont_button_clicked(); 33 | 34 | public slots: 35 | void SetLanguage(QMap &); 36 | }; 37 | 38 | #endif // FINDCONTACTS_H 39 | -------------------------------------------------------------------------------- /Client/findcontacts.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | findcontacts 4 | 5 | 6 | Qt::ApplicationModal 7 | 8 | 9 | 10 | 0 11 | 0 12 | 310 13 | 350 14 | 15 | 16 | 17 | Form 18 | 19 | 20 | background-color: rgb(255, 255, 255); 21 | 22 | 23 | 24 | 25 | 120 26 | 20 27 | 71 28 | 91 29 | 30 | 31 | 32 | 33 | 34 | 35 | :/Icons/Resource/Icon/ic_profile_set.png 36 | 37 | 38 | 39 | 40 | 41 | 70 42 | 130 43 | 171 44 | 20 45 | 46 | 47 | 48 | 49 | 10 50 | 51 | 52 | 53 | Add contact: 54 | 55 | 56 | Qt::AlignCenter 57 | 58 | 59 | 60 | 61 | 62 | 76 63 | 210 64 | 161 65 | 20 66 | 67 | 68 | 69 | 70 | 8 71 | 72 | 73 | 74 | color: rgb(214, 71, 0); 75 | 76 | 77 | User is not found.. 78 | 79 | 80 | Qt::AlignCenter 81 | 82 | 83 | 84 | 85 | 86 | 70 87 | 180 88 | 171 89 | 20 90 | 91 | 92 | 93 | border-width: 1px; 94 | border-bottom-color: rgb(0, 0, 0); 95 | border-style: outset; 96 | border-top-color: rgb(255, 255, 255); 97 | border-right-color: rgb(255, 255, 255); 98 | border-left-color: rgb(255, 255, 255); 99 | 100 | 101 | Qt::AlignCenter 102 | 103 | 104 | User Name 105 | 106 | 107 | 108 | 109 | 110 | 100 111 | 260 112 | 121 113 | 41 114 | 115 | 116 | 117 | 118 | 10 119 | 120 | 121 | 122 | false 123 | 124 | 125 | Qt::LeftToRight 126 | 127 | 128 | QPushButton{color: black; background: white;} 129 | QPushButton:hover{background: #f6f4ff; border:none;} 130 | 131 | 132 | Invite 133 | 134 | 135 | 136 | :/Icons/Resource/Icon/ic_register.png:/Icons/Resource/Icon/ic_register.png 137 | 138 | 139 | 140 | 32 141 | 32 142 | 143 | 144 | 145 | true 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /Client/hashmd5.cpp: -------------------------------------------------------------------------------- 1 | #include "hashmd5.h" 2 | #include 3 | #include 4 | 5 | HashMD5::HashMD5() 6 | { 7 | QTime time = QTime::currentTime(); 8 | qsrand((uint)time.msec()); 9 | } 10 | 11 | QString HashMD5::HashSumPass(QString _pass) 12 | { 13 | QCryptographicHash CalculateMD5(QCryptographicHash::Md5); 14 | QByteArray in; 15 | in.append(_pass); 16 | CalculateMD5.addData(in); 17 | 18 | QByteArray res = CalculateMD5.result().toHex(); 19 | QString str = QString::fromUtf8(res.constData()); 20 | 21 | return str; 22 | } 23 | 24 | QString HashMD5::SaltGeneration() 25 | { 26 | QString pass; 27 | 28 | for (int i = 0; i < 8; i++) 29 | { 30 | int key = rand() % 3; 31 | char word_pass = 0; 32 | 33 | switch (key) 34 | { 35 | case 0: 36 | word_pass = qrand() % 9 + 48; 37 | break; 38 | case 1: 39 | word_pass = qrand() % 26 + 65; 40 | break; 41 | case 2: 42 | word_pass = qrand() % 26 + 97; 43 | break; 44 | } 45 | pass.append(word_pass); 46 | } 47 | 48 | return pass; 49 | } 50 | 51 | void HashMD5::Hash(QString message) 52 | { 53 | const uint32_t S[64] = { 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 54 | 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 55 | 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 56 | 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21 }; 57 | 58 | const uint32_t K[64] = { 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 59 | 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, 60 | 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, 61 | 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 62 | 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, 63 | 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8, 64 | 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 65 | 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, 66 | 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, 67 | 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 68 | 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05, 69 | 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, 70 | 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 71 | 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, 72 | 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 73 | 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 }; 74 | 75 | QVector byteMsg; 76 | std::string mes = message.toStdString(); 77 | for (size_t i = 0; i < message.length(); i++) 78 | byteMsg.push_back(mes[i]); 79 | 80 | 81 | byteMsg.push_back((unsigned char)0x80); 82 | 83 | while ((byteMsg.size() * 8) % 512 != 448) 84 | byteMsg.push_back((unsigned char)0x00); 85 | 86 | 87 | uint64_t originalLength = (message.length() * 8) % ((uint64_t)pow(2.0, 64)); 88 | 89 | for (int i = 0; i < 8; i++) 90 | byteMsg.push_back(originalLength >> i * 8); 91 | 92 | uint32_t a0 = 0x67452301; 93 | uint32_t b0 = 0xefcdab89; 94 | uint32_t c0 = 0x98badcfe; 95 | uint32_t d0 = 0x10325476; 96 | 97 | for (size_t i = 0; i < byteMsg.size(); i += 64) 98 | { 99 | 100 | QVector M; 101 | for (int j = 0; j < 64; j += 4) 102 | { 103 | uint32_t word = byteMsg[i + j] ^ 104 | byteMsg[i + j + 1] << 8 ^ 105 | byteMsg[i + j + 2] << 16 ^ 106 | byteMsg[i + j + 3] << 24; 107 | M.push_back(word); 108 | } 109 | 110 | uint32_t A = a0; 111 | uint32_t B = b0; 112 | uint32_t C = c0; 113 | uint32_t D = d0; 114 | 115 | for (int j = 0; j < 64; j++) 116 | { 117 | uint32_t F, g; 118 | if (0 <= j && j <= 15) 119 | { 120 | F = (B & C) | ((~B) & D); 121 | g = j; 122 | } 123 | else if (16 <= j && j <= 31) 124 | { 125 | F = (D & B) | ((~D) & C); 126 | g = (5 * j + 1) % 16; 127 | } 128 | else if (32 <= j && j <= 47) 129 | { 130 | F = B ^ C ^ D; 131 | g = (3 * j + 5) % 16; 132 | } 133 | else if (48 <= j && j <= 63) 134 | { 135 | F = C ^ (B | (~D)); 136 | g = (7 * j) % 16; 137 | } 138 | uint32_t tempD = D; 139 | D = C; 140 | C = B; 141 | B = B + RotateLeft32(A + F + K[j] + M[g], S[j]); 142 | A = tempD; 143 | } 144 | 145 | a0 += A; 146 | b0 += B; 147 | c0 += C; 148 | d0 += D; 149 | } 150 | 151 | uint8_t *p = (uint8_t *)&a0; 152 | QString resultHash; 153 | QString valueInHex = QString("%1%2%3%4").arg(p[0] , 0, 16).arg(p[1] , 0, 16).arg(p[2] , 0, 16).arg(p[3] , 0, 16); 154 | resultHash.append(valueInHex); 155 | p = (uint8_t *)&b0; 156 | valueInHex = QString("%1%2%3%4").arg(p[0] , 0, 16).arg(p[1] , 0, 16).arg(p[2] , 0, 16).arg(p[3] , 0, 16); 157 | resultHash.append(valueInHex); 158 | p = (uint8_t *)&c0; 159 | valueInHex = QString("%1%2%3%4").arg(p[0] , 0, 16).arg(p[1] , 0, 16).arg(p[2] , 0, 16).arg(p[3] , 0, 16); 160 | resultHash.append(valueInHex); 161 | p = (uint8_t *)&d0; 162 | valueInHex = QString("%1%2%3%4").arg(p[0] , 0, 16).arg(p[1] , 0, 16).arg(p[2] , 0, 16).arg(p[3] , 0, 16); 163 | resultHash.append(valueInHex); 164 | 165 | //Лажает =/ 166 | 167 | return; 168 | } 169 | 170 | uint32_t HashMD5::RotateLeft32(uint32_t val, int amount) 171 | { 172 | amount %= 32; 173 | if (amount == 0) 174 | return val; 175 | return (val << amount) | (val >> (32 - amount)); 176 | } 177 | 178 | HashMD5::~HashMD5() 179 | { 180 | 181 | } 182 | 183 | -------------------------------------------------------------------------------- /Client/hashmd5.h: -------------------------------------------------------------------------------- 1 | #ifndef HASHMD5_H 2 | #define HASHMD5_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | typedef unsigned char BYTE; 12 | typedef unsigned int uint32_t; 13 | 14 | class HashMD5 15 | { 16 | private: 17 | QString hashPas; 18 | QString hashFile; 19 | QString salt; 20 | uint32_t RotateLeft32(uint32_t val, int amount); 21 | 22 | public: 23 | HashMD5(); 24 | QString HashSumPass(QString); 25 | QString SaltGeneration(); 26 | 27 | void Hash(QString message); 28 | ~HashMD5(); 29 | }; 30 | 31 | #endif // HASHMD5_H 32 | -------------------------------------------------------------------------------- /Client/listwidgetemoji.cpp: -------------------------------------------------------------------------------- 1 | #include "listwidgetemoji.h" 2 | 3 | ListWidgetEmoji::ListWidgetEmoji(QWidget *parent) : 4 | QListWidget(parent) 5 | { 6 | connect(this, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(getCurrentIndex(QListWidgetItem *))); 7 | } 8 | 9 | void ListWidgetEmoji::loadEmojiListView(QString category) 10 | { 11 | m_emojiList = m_emojiMan->getEmojiList(); 12 | 13 | for (int i = m_emojiList.count() - 1; i >= 0; i--) { 14 | if (category != "All") { 15 | if (category != m_emojiList.at(i).category) 16 | continue; 17 | } 18 | 19 | QListWidgetItem *newItem = new QListWidgetItem; 20 | 21 | QString binDir = QCoreApplication::applicationDirPath(); 22 | QString dataDir = binDir; 23 | dataDir = QDir::cleanPath(dataDir + "/"); 24 | 25 | QDir iconsLocation(dataDir + "/data/icons"); 26 | 27 | QIcon ico; 28 | QString iconFileName = QString("%1/x-%2.png") 29 | .arg(iconsLocation.absolutePath()) 30 | .arg(m_emojiList.at(i).pixmapIconNumber); 31 | QPixmap p(iconFileName); 32 | ico.addPixmap(p); 33 | newItem->setIcon(ico); 34 | 35 | newItem->setData(Qt::ToolTipRole, m_emojiList.at(i).description); 36 | 37 | insertItem(0, newItem); 38 | 39 | map.insert(m_emojiList.at(i).description, i); // Description | Index 40 | } 41 | } 42 | 43 | void ListWidgetEmoji::setEmojiManager(EmojiManager *emojiMan) 44 | { 45 | m_emojiMan = emojiMan; 46 | } 47 | 48 | void ListWidgetEmoji::getCurrentIndex(QListWidgetItem *item) 49 | { 50 | QString descr = item->data(Qt::ToolTipRole).toString(); 51 | int index = map[descr]; // Get the index using description 52 | 53 | emit sendEmoji(m_emojiList.at(index).symbol); 54 | } 55 | -------------------------------------------------------------------------------- /Client/listwidgetemoji.h: -------------------------------------------------------------------------------- 1 | #ifndef LISTWIDGETEMOJI_H 2 | #define LISTWIDGETEMOJI_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "emojimanager.h" 11 | 12 | class ListWidgetEmoji : public QListWidget 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit ListWidgetEmoji(QWidget *parent = 0); 17 | void loadEmojiListView(QString category); 18 | void setEmojiManager(EmojiManager *emojiMan); 19 | 20 | private: 21 | EmojiManager *m_emojiMan; 22 | QList m_emojiList; 23 | QMap map; // Description / index 24 | 25 | signals: 26 | void sendEmoji(QString); 27 | 28 | public slots: 29 | 30 | private slots: 31 | void getCurrentIndex(QListWidgetItem *item); 32 | }; 33 | 34 | 35 | #endif // LISTWIDGETEMOJI_H 36 | -------------------------------------------------------------------------------- /Client/main.cpp: -------------------------------------------------------------------------------- 1 | #include "client.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | a.setApplicationName("HEHE"); 8 | 9 | Client w; 10 | //w.hide(); 11 | 12 | return a.exec(); 13 | } 14 | -------------------------------------------------------------------------------- /Client/notification.cpp: -------------------------------------------------------------------------------- 1 | #include "notification.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | Notification::Notification(QWidget *parent) : QWidget(parent) 8 | { 9 | 10 | setWindowFlags(Qt::FramelessWindowHint | // Disable window decoration 11 | Qt::Tool | // Cancel the show in a separate window 12 | Qt::WindowStaysOnTopHint); // Set on top of all windows 13 | setAttribute(Qt::WA_TranslucentBackground); // Indicates that it will be transparent 14 | setAttribute(Qt::WA_ShowWithoutActivating); // At the show, the widget does not get the focus automatically 15 | 16 | animation.setTargetObject(this); // Set the target animation 17 | animation.setPropertyName("popupOpacity"); // Install animated property 18 | connect(&animation, &QAbstractAnimation::finished, this, &Notification::hide); /*Connect the signal to the end 19 | *animation to hide slots * */ 20 | 21 | 22 | label.setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); 23 | label.setStyleSheet("QLabel { color : white; " 24 | "margin-top: 6px;" 25 | "margin-bottom: 6px;" 26 | "margin-left: 10px;" 27 | "margin-right: 10px; }"); 28 | 29 | 30 | layout.addWidget(&label, 0, 0); 31 | setLayout(&layout); 32 | timer = new QTimer(); 33 | connect(timer, &QTimer::timeout, this, &Notification::HideAnimation); 34 | } 35 | 36 | void Notification::paintEvent(QPaintEvent *event) 37 | { 38 | Q_UNUSED(event) 39 | 40 | QPainter painter(this); 41 | painter.setRenderHint(QPainter::Antialiasing); 42 | 43 | QRect roundedRect; 44 | roundedRect.setX(rect().x() + 5); 45 | roundedRect.setY(rect().y() + 5); 46 | roundedRect.setWidth(rect().width() - 10); 47 | roundedRect.setHeight(rect().height() - 10); 48 | 49 | painter.setBrush(QBrush(QColor(0,0,0,180))); 50 | painter.setPen(Qt::NoPen); 51 | 52 | painter.drawRoundedRect(roundedRect, 10, 10); 53 | } 54 | 55 | void Notification::SetPopupText(const QString &text) 56 | { 57 | label.setText(text); 58 | adjustSize(); 59 | } 60 | 61 | void Notification::Show() 62 | { 63 | setWindowOpacity(0.0); 64 | animation.setDuration(150); 65 | animation.setStartValue(0.0); 66 | animation.setEndValue(1.0); 67 | 68 | setGeometry(QApplication::desktop()->availableGeometry().width() - 36 - width() + QApplication::desktop() -> availableGeometry().x(), 69 | QApplication::desktop()->availableGeometry().height() - 36 - height() + QApplication::desktop() -> availableGeometry().y(), 70 | width(), 71 | height()); 72 | QWidget::show(); 73 | animation.start(); 74 | timer->start(3000); 75 | } 76 | 77 | void Notification::HideAnimation() 78 | { 79 | timer->stop(); 80 | animation.setDuration(1000); 81 | animation.setStartValue(1.0); 82 | animation.setEndValue(0.0); 83 | animation.start(); 84 | } 85 | 86 | void Notification::Hide() 87 | { 88 | if(GetPopupOpacity() == 0.0){ 89 | QWidget::hide(); 90 | } 91 | } 92 | 93 | void Notification::SetPopupOpacity(float opacity) 94 | { 95 | popupOpacity = opacity; 96 | setWindowOpacity(opacity); 97 | } 98 | 99 | float Notification::GetPopupOpacity() const 100 | { 101 | return popupOpacity; 102 | } 103 | 104 | -------------------------------------------------------------------------------- /Client/notification.h: -------------------------------------------------------------------------------- 1 | #ifndef NOTIFICATION_H 2 | #define NOTIFICATION_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | class Notification : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | Q_PROPERTY(float popupOpacity READ GetPopupOpacity WRITE SetPopupOpacity) 15 | 16 | public: 17 | explicit Notification(QWidget *parent = 0); 18 | 19 | protected: 20 | void paintEvent(QPaintEvent *event); 21 | 22 | public slots: 23 | void SetPopupText(const QString& text); 24 | void Show(); 25 | 26 | private slots: 27 | void HideAnimation(); 28 | void Hide(); 29 | 30 | private: 31 | QLabel label; 32 | QGridLayout layout; 33 | QPropertyAnimation animation; 34 | float popupOpacity; // Properties translucent widget 35 | QTimer *timer; // The timer on which the widget is hidden 36 | 37 | void SetPopupOpacity(float opacity); 38 | float GetPopupOpacity() const; 39 | }; 40 | 41 | #endif // NOTIFICATION_H 42 | -------------------------------------------------------------------------------- /Client/registration.cpp: -------------------------------------------------------------------------------- 1 | #include "registration.h" 2 | #include "ui_registration.h" 3 | #include 4 | 5 | Registration::Registration(QWidget *parent) : 6 | QWidget(parent), 7 | ui(new Ui::Registration) 8 | { 9 | ui->setupUi(this); 10 | this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::CustomizeWindowHint); 11 | 12 | #ifdef __APPLE__ 13 | ui->enter_city->setAttribute(Qt::WA_MacShowFocusRect, false); 14 | ui->enter_password->setAttribute(Qt::WA_MacShowFocusRect, false); 15 | ui->enter_user_name->setAttribute(Qt::WA_MacShowFocusRect, false); 16 | ui->password_confirm->setAttribute(Qt::WA_MacShowFocusRect, false); 17 | ui->age->setAttribute(Qt::WA_MacShowFocusRect, false); 18 | #endif 19 | 20 | socket = new QTcpSocket(); 21 | rsacrypt = new RSACrypt(); 22 | 23 | ui->Error_label->hide(); 24 | ui->Error_label_2->hide(); 25 | 26 | rsacrypt->GenerationKeys(); 27 | 28 | connect(socket, SIGNAL(readyRead()), this, SLOT(getMessagee())); 29 | } 30 | 31 | void Registration::getMessagee() 32 | { 33 | QString received_message; 34 | 35 | received_message = socket->read(4); 36 | 37 | if (received_message == "PNIL") 38 | { 39 | ui->Error_label->hide(); 40 | ui->Error_label_2->setText(errors.at(0)); 41 | ui->Error_label_2->show(); 42 | } 43 | else if (received_message == "ALRD") 44 | { 45 | ui->Error_label_2->hide(); 46 | ui->Error_label->setText(errors.at(1)); 47 | ui->Error_label->show(); 48 | } 49 | 50 | else if (received_message == "WELC") 51 | { 52 | QString nameKey = QDir::homePath() + "/WhisperServer/Whisper Close Key/"; 53 | QFile *receiveFile = new QFile(nameKey + ui->enter_user_name->text()+".txt"); 54 | 55 | QTextStream out(receiveFile); 56 | receiveFile->open(QIODevice::Append); 57 | out << QString::number(rsacrypt->GetD()) + " " + QString::number(rsacrypt->GetModule()); 58 | 59 | receiveFile->close(); 60 | on_come_back_clicked(); 61 | } 62 | } 63 | 64 | void Registration::on_accept_button_clicked() 65 | { 66 | QString request = "REGI"; 67 | 68 | if (ui->enter_password->text().isEmpty()) 69 | { 70 | ui->Error_label_2->show(); 71 | return; 72 | } 73 | else if (ui->password_confirm->text().isEmpty()) 74 | { 75 | ui->Error_label_2->show(); 76 | ui->Error_label_2->setText(errors.at(3)); 77 | return; //"Confirm pass is empty" 78 | } 79 | else if (ui->password_confirm->text() != ui->enter_password->text()) 80 | { 81 | ui->Error_label_2->show(); 82 | ui->Error_label_2->setText(errors.at(2)); 83 | return; //"Passwords are different" 84 | } 85 | 86 | socket->abort(); 87 | socket->connectToHost("127.0.0.1", 55155); 88 | 89 | // use password = md5(md5(password) + salt) 90 | 91 | QString passmd5 = hashmd5->HashSumPass(ui->enter_password->text()); 92 | QString salt = hashmd5->SaltGeneration(); 93 | passmd5 = hashmd5->HashSumPass(passmd5 + salt); 94 | 95 | request.append(QString("%1 /s %2 /s ").arg(ui->enter_user_name->text()).arg(ui->enter_city->text())); 96 | request.append(QString("%1 /s %2 /s ").arg(passmd5).arg(ui->age->text())); 97 | request.append(QString("%1 /s %2 /s ").arg(ui->sex_person->currentText()).arg(QString::number(rsacrypt->GetE()) + " " + QString::number(rsacrypt->GetModule()))); 98 | request.append(QString("%1").arg(salt)); 99 | 100 | socket->write(request.toUtf8()); 101 | } 102 | 103 | void Registration::mouseMoveEvent(QMouseEvent *event) 104 | { 105 | if (event->buttons() && Qt::LeftButton) { 106 | move(event->globalPos() - m_dragPosition); 107 | event->accept(); 108 | } 109 | } 110 | 111 | void Registration::mousePressEvent(QMouseEvent *event) 112 | { 113 | if (event->button() == Qt::LeftButton) { 114 | m_dragPosition = event->globalPos() - frameGeometry().topLeft(); 115 | event->accept(); 116 | } 117 | } 118 | 119 | void Registration::SetLanguage(QMap & lan_dict) 120 | { 121 | ui->register_2->setText(lan_dict.value(ui->register_2->objectName())); 122 | ui->username->setText(lan_dict.value(ui->username->objectName())); 123 | ui->sex->setText(lan_dict.value(ui->sex->objectName())); 124 | ui->age_2->setText(lan_dict.value(ui->age->objectName())); 125 | ui->city->setText(lan_dict.value(ui->city->objectName())); 126 | ui->password->setText(lan_dict.value(ui->password->objectName())); 127 | ui->confirm->setText(lan_dict.value(ui->confirm->objectName())); 128 | ui->accept_button->setText(lan_dict.value(ui->accept_button->objectName())); 129 | errors = lan_dict.value("errors1").split("//"); 130 | 131 | if (errors.size() == 4) 132 | { 133 | ui->Error_label->setText(errors.at(1)); 134 | ui->Error_label_2->setText(errors.at(0)); 135 | } 136 | 137 | QStringList lst_setting; 138 | lst_setting = lan_dict.value("sex_person").split(','); 139 | 140 | for (int i = 0; i < lst_setting.size(); i++) 141 | ui->sex_person->setItemText(i, lst_setting[i]); 142 | } 143 | 144 | void Registration::on_come_back_clicked() 145 | { 146 | ui->enter_city->setText(""); 147 | ui->enter_password->setText(""); 148 | ui->enter_user_name->setText(""); 149 | ui->sex_person->setCurrentIndex(0); 150 | ui->age->setValue(0); 151 | 152 | emit sendData(QString("Show")); 153 | this->close(); 154 | } 155 | 156 | void Registration::on_close_window_clicked() 157 | { 158 | this->close(); 159 | } 160 | 161 | void Registration::on_turn_window_clicked() 162 | { 163 | this->showMinimized(); 164 | } 165 | 166 | Registration::~Registration() 167 | { 168 | delete ui; 169 | } 170 | -------------------------------------------------------------------------------- /Client/registration.h: -------------------------------------------------------------------------------- 1 | #ifndef NEWCONTACT_H 2 | #define NEWCONTACT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "rsacrypt.h" 11 | #include "hashmd5.h" 12 | 13 | namespace Ui { 14 | class Registration; 15 | } 16 | 17 | class Registration : public QWidget 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | explicit Registration(QWidget *parent = 0); 23 | ~Registration(); 24 | 25 | protected: 26 | void mouseMoveEvent(QMouseEvent *event); 27 | void mousePressEvent(QMouseEvent *event); 28 | 29 | private slots: 30 | void on_accept_button_clicked(); 31 | void on_come_back_clicked(); 32 | void on_close_window_clicked(); 33 | void on_turn_window_clicked(); 34 | void getMessagee(); 35 | 36 | public slots: 37 | void SetLanguage(QMap &); 38 | 39 | signals: 40 | void sendData(QString str); 41 | 42 | private: 43 | Ui::Registration *ui; 44 | 45 | HashMD5 *hashmd5; 46 | RSACrypt *rsacrypt; 47 | QTcpSocket *socket; 48 | QPoint m_dragPosition; 49 | QStringList errors; 50 | }; 51 | 52 | #endif // NEWCONTACT_H 53 | -------------------------------------------------------------------------------- /Client/resource.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Resource/Avatars/1.jpg 4 | Resource/Avatars/2.jpg 5 | Resource/Avatars/3.jpg 6 | Resource/Avatars/4.jpg 7 | Resource/Avatars/5.jpg 8 | Resource/Avatars/6.jpg 9 | Resource/Avatars/7.jpg 10 | Resource/Avatars/8.jpg 11 | Resource/Avatars/9.jpg 12 | Resource/Avatars/10.jpg 13 | Resource/Avatars/11.jpg 14 | Resource/Avatars/12.jpg 15 | Resource/Avatars/13.jpg 16 | Resource/Avatars/14.jpg 17 | Resource/Avatars/15.jpg 18 | Resource/Avatars/16.jpg 19 | Resource/Avatars/17.jpg 20 | Resource/Avatars/18.jpg 21 | Resource/Avatars/19.jpg 22 | Resource/Avatars/20.jpg 23 | Resource/Avatars/21.jpg 24 | Resource/Avatars/22.jpg 25 | Resource/Avatars/23.jpg 26 | Resource/Avatars/24.jpg 27 | Resource/Avatars/25.jpg 28 | Resource/Avatars/26.jpg 29 | Resource/Avatars/27.jpg 30 | Resource/Avatars/28.jpg 31 | Resource/Avatars/29.jpg 32 | Resource/Avatars/30.jpg 33 | Resource/Avatars/31.jpg 34 | Resource/Avatars/32.jpg 35 | Resource/Avatars/33.jpg 36 | Resource/Avatars/34.jpg 37 | Resource/Avatars/35.jpg 38 | Resource/Avatars/36.jpg 39 | Resource/Avatars/37.jpg 40 | Resource/Avatars/38.jpg 41 | Resource/Avatars/39.jpg 42 | Resource/Avatars/40.jpg 43 | Resource/Avatars/41.jpg 44 | Resource/Avatars/42.jpg 45 | Resource/Avatars/43.jpg 46 | Resource/Avatars/44.jpg 47 | Resource/Avatars/45.jpg 48 | Resource/Avatars/46.jpg 49 | Resource/Avatars/47.jpg 50 | Resource/Avatars/48.jpg 51 | Resource/Avatars/49.jpg 52 | Resource/Avatars/50.jpg 53 | Resource/Avatars/51.jpg 54 | 55 | 56 | Resource/RoundLetters(RUS)/a.jpg 57 | Resource/RoundLetters(RUS)/b.jpg 58 | Resource/RoundLetters(RUS)/c.jpg 59 | Resource/RoundLetters(RUS)/d.jpg 60 | Resource/RoundLetters(RUS)/e.jpg 61 | Resource/RoundLetters(RUS)/ee.jpg 62 | Resource/RoundLetters(RUS)/f.jpg 63 | Resource/RoundLetters(RUS)/g.jpg 64 | Resource/RoundLetters(RUS)/h.jpg 65 | Resource/RoundLetters(RUS)/i.jpg 66 | Resource/RoundLetters(RUS)/k.jpg 67 | Resource/RoundLetters(RUS)/l.jpg 68 | Resource/RoundLetters(RUS)/m.jpg 69 | Resource/RoundLetters(RUS)/n.jpg 70 | Resource/RoundLetters(RUS)/o.jpg 71 | Resource/RoundLetters(RUS)/p.jpg 72 | Resource/RoundLetters(RUS)/q.jpg 73 | Resource/RoundLetters(RUS)/r.jpg 74 | Resource/RoundLetters(RUS)/s.jpg 75 | Resource/RoundLetters(RUS)/t.jpg 76 | Resource/RoundLetters(RUS)/u.jpg 77 | Resource/RoundLetters(RUS)/v.jpg 78 | Resource/RoundLetters(RUS)/x.jpg 79 | Resource/RoundLetters(RUS)/y.jpg 80 | Resource/RoundLetters(RUS)/ya.jpg 81 | Resource/RoundLetters(RUS)/z.jpg 82 | Resource/RoundLetters(RUS)/zh.jpg 83 | 84 | 85 | Resource/RoundLetters(ENG)/a.jpg 86 | Resource/RoundLetters(ENG)/b.jpg 87 | Resource/RoundLetters(ENG)/c.jpg 88 | Resource/RoundLetters(ENG)/d.jpg 89 | Resource/RoundLetters(ENG)/e.jpg 90 | Resource/RoundLetters(ENG)/f.jpg 91 | Resource/RoundLetters(ENG)/g.jpg 92 | Resource/RoundLetters(ENG)/h.jpg 93 | Resource/RoundLetters(ENG)/i.jpg 94 | Resource/RoundLetters(ENG)/j.jpg 95 | Resource/RoundLetters(ENG)/k.jpg 96 | Resource/RoundLetters(ENG)/l.jpg 97 | Resource/RoundLetters(ENG)/m.jpg 98 | Resource/RoundLetters(ENG)/n.jpg 99 | Resource/RoundLetters(ENG)/o.jpg 100 | Resource/RoundLetters(ENG)/p.jpg 101 | Resource/RoundLetters(ENG)/q.jpg 102 | Resource/RoundLetters(ENG)/r.jpg 103 | Resource/RoundLetters(ENG)/s.jpg 104 | Resource/RoundLetters(ENG)/t.jpg 105 | Resource/RoundLetters(ENG)/u.jpg 106 | Resource/RoundLetters(ENG)/v.jpg 107 | Resource/RoundLetters(ENG)/w.jpg 108 | Resource/RoundLetters(ENG)/x.jpg 109 | Resource/RoundLetters(ENG)/y.jpg 110 | Resource/RoundLetters(ENG)/z.jpg 111 | 112 | 113 | Resource/Sound/from.wav 114 | Resource/Sound/to.wav 115 | 116 | 117 | Resource/Icon/ic_about.png 118 | Resource/Icon/ic_back.png 119 | Resource/Icon/ic_back_2.png 120 | Resource/Icon/ic_chat_file.png 121 | Resource/Icon/ic_chat_set.png 122 | Resource/Icon/ic_close_brown.png 123 | Resource/Icon/ic_close_white.png 124 | Resource/Icon/ic_create.png 125 | Resource/Icon/ic_download.png 126 | Resource/Icon/ic_emoji.png 127 | Resource/Icon/ic_general_set.png 128 | Resource/Icon/ic_group.png 129 | Resource/Icon/ic_group_avatar.png 130 | Resource/Icon/ic_login.png 131 | Resource/Icon/ic_LOGO_64.png 132 | Resource/Icon/ic_network_set.png 133 | Resource/Icon/ic_password.png 134 | Resource/Icon/ic_profile_set.png 135 | Resource/Icon/ic_register.png 136 | Resource/Icon/ic_search.png 137 | Resource/Icon/ic_send_file.png 138 | Resource/Icon/ic_send_mess.png 139 | Resource/Icon/ic_setting.png 140 | Resource/Icon/ic_setting_2.png 141 | Resource/Icon/ic_turn_brown.png 142 | Resource/Icon/ic_turn_white.png 143 | Resource/Icon/ic_username.png 144 | 145 | 146 | Resource/background.jpg 147 | Resource/botton.jpg 148 | Resource/header.jpg 149 | 150 | 151 | Resource/XML_Language/DE_Language.xml 152 | Resource/XML_Language/EN_Language.xml 153 | Resource/XML_Language/FR_Language.xml 154 | Resource/XML_Language/RU_Language.xml 155 | 156 | 157 | -------------------------------------------------------------------------------- /Client/rsacrypt.cpp: -------------------------------------------------------------------------------- 1 | #include "rsacrypt.h" 2 | #include 3 | 4 | RSACrypt::RSACrypt() 5 | { 6 | QTime time = QTime::currentTime(); 7 | qsrand((uint)time.msec()); 8 | 9 | p_simple = 0; 10 | q_simple = 0; 11 | d = 0; 12 | e = 0; 13 | f = 0; 14 | module = 0; 15 | } 16 | 17 | void RSACrypt::GenerationKeys() 18 | { 19 | d =0; 20 | 21 | do 22 | { 23 | SimpleNumber(p_simple, 0); 24 | SimpleNumber(q_simple, 1); 25 | 26 | module = p_simple * q_simple; 27 | } while (module < 1500); 28 | 29 | f = (p_simple - 1) * (q_simple - 1); 30 | 31 | for (;;) 32 | { 33 | e = qrand() % 150 + 2; 34 | if (SimpleNumber(e, 2) && e < f && (NOD(e, f) == 1)) 35 | break; 36 | } 37 | 38 | while ((d * e) % f != 1 ) 39 | d += 1; 40 | } 41 | 42 | bool RSACrypt::SimpleNumber(int &n, int t) 43 | { 44 | 45 | if (t==0) 46 | n = qrand() % 75; 47 | else if (t==1) 48 | n = qrand() % 75 + 75; 49 | else 50 | n = qrand() % 150; 51 | 52 | if (n < 2) 53 | SimpleNumber(n, t); 54 | 55 | for (int j = 2; j * j <= n; ++j) 56 | if (n % j == 0) 57 | SimpleNumber(n, t); 58 | 59 | return true; 60 | } 61 | 62 | 63 | int RSACrypt::NOD(int p, int q) 64 | { 65 | while (p && q) 66 | { 67 | if (p >= q) 68 | p %= q; 69 | else 70 | q %= p; 71 | } 72 | 73 | return (p | q); 74 | } 75 | 76 | QString RSACrypt::EncodeText(QString text, int _e, int _module) 77 | { 78 | QString tmpText; 79 | QString EncodeText = text; 80 | int EnTextSize = text.size(); 81 | int EncodeInt[EnTextSize]; 82 | 83 | for (int i = 0; i < EnTextSize;i++){ 84 | EncodeInt[i] = ModExp(EncodeText[i].unicode(), _e, _module); 85 | tmpText.append(QString::number(EncodeInt[i]) + " "); 86 | } 87 | return tmpText; 88 | } 89 | 90 | QString RSACrypt::DecodeText(QString text, int _d, int _module) 91 | { 92 | QStringList DecryptText = text.split(" "); 93 | int DecTextSize = DecryptText.size()-1; 94 | int DecryptInt[DecTextSize]; 95 | 96 | QString normalText; 97 | for (int i = 0; i < DecTextSize; i++){ 98 | DecryptInt[i] = DecryptText[i].toInt(); 99 | DecryptInt[i] = ModExp(DecryptInt[i], _d, _module); 100 | normalText.append(QChar(DecryptInt[i])); 101 | } 102 | return normalText; 103 | } 104 | 105 | 106 | int RSACrypt::ModExp(long long base, long long exp, long long module){ 107 | 108 | if (exp == 0) 109 | return 1; 110 | 111 | if (exp % 2 == 0) 112 | { 113 | long long res = ModExp(base, exp/2, module); 114 | return (res * res) % module; 115 | } 116 | else 117 | { 118 | long long res = ModExp(base, exp-1, module); 119 | return ((base % module) * res) % module; 120 | } 121 | } 122 | 123 | int RSACrypt::GetE() 124 | { 125 | return e; 126 | } 127 | 128 | int RSACrypt::GetModule() 129 | { 130 | return module; 131 | } 132 | 133 | int RSACrypt::GetD() 134 | { 135 | return d; 136 | } 137 | -------------------------------------------------------------------------------- /Client/rsacrypt.h: -------------------------------------------------------------------------------- 1 | #ifndef RSACRYPT_H 2 | #define RSACRYPT_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class RSACrypt 9 | { 10 | private: 11 | int p_simple; 12 | int q_simple; 13 | int module; 14 | int d; 15 | int f; 16 | int e; 17 | 18 | bool SimpleNumber(int &n, int t); 19 | int ModExp(long long, long long, long long ); 20 | int NOD(int p, int q); 21 | 22 | public: 23 | RSACrypt(); 24 | QString EncodeText(QString, int, int); 25 | QString DecodeText(QString, int, int); 26 | void GenerationKeys(); 27 | int GetE(); 28 | int GetModule(); 29 | int GetD(); //Временно, для теста. 30 | }; 31 | 32 | #endif // RSACRYPT_H 33 | -------------------------------------------------------------------------------- /Client/selectcontacts.cpp: -------------------------------------------------------------------------------- 1 | #include "selectcontacts.h" 2 | #include "ui_selectcontacts.h" 3 | #include 4 | 5 | 6 | /******************************************************/ 7 | /* */ 8 | /* Window selection contacts when added to the group. */ 9 | /* Displaying a list of users from the user */ 10 | /* who creates a group and can add people */ 11 | /* from your list of friends. */ 12 | /* */ 13 | /******************************************************/ 14 | 15 | SelectContacts::SelectContacts(QWidget *parent, QListWidget *list) : 16 | QFrame(parent), 17 | ui(new Ui::SelectContacts) 18 | { 19 | ui->setupUi(this); 20 | 21 | //To hide the edges of the form and standard buttons. 22 | this->setWindowFlags(Qt::Popup | Qt::Window); 23 | setWindowOpacity(0); 24 | show(); 25 | 26 | // Setting animation when opening window 27 | QPropertyAnimation* animation = new QPropertyAnimation(this, "windowOpacity"); 28 | animation->setDuration(500); 29 | animation->setStartValue(0); 30 | animation->setEndValue(1); 31 | animation->start(); 32 | 33 | ui->userList->setItemDelegate(new UserListDelegate(ui->userList)); 34 | 35 | for (int i = 0; i < list->count(); i++) 36 | { 37 | QListWidgetItem *item = new QListWidgetItem(); 38 | item->setData(Qt::DisplayRole, list->item(i)->data(Qt::DisplayRole).toString()); 39 | item->setData(Qt::ToolTipRole, list->item(i)->data(Qt::ToolTipRole).toString()); 40 | item->setData(Qt::UserRole + 1, list->item(i)->data(Qt::UserRole + 1).toString()); 41 | item->setData(Qt::DecorationRole, list->item(i)->data(Qt::DecorationRole)); 42 | ui->userList->addItem(item); 43 | } 44 | } 45 | 46 | ////////////////////////////////////////////////////////// 47 | ////////////////////////////////////////////////////////// 48 | /// Members are selected. In the main class is sent a signal to create a group. 49 | void SelectContacts::on_crGroup_button_clicked() 50 | { 51 | QStringList userList; 52 | if (!ui->userList->selectedItems().isEmpty()) 53 | { 54 | for (int i = 0; iuserList->count(); i++) 55 | { 56 | if (ui->userList->item(i)->isSelected()) 57 | userList.push_back(ui->userList->item(i)->data(Qt::DisplayRole).toString()); 58 | } 59 | 60 | emit SelectUsersSignal(userList, "Create"); 61 | this->close(); 62 | } 63 | } 64 | 65 | ////////////////////////////////////////////////////////// 66 | ////////////////////////////////////////////////////////// 67 | /// Cancel group creation. Close window 68 | void SelectContacts::on_cancel_button_clicked() 69 | { 70 | QStringList tmp; 71 | emit SelectUsersSignal(tmp, "Cancel"); 72 | this->close(); 73 | } 74 | 75 | ////////////////////////////////////////////////////////// 76 | ////////////////////////////////////////////////////////// 77 | /// Counter users that are added to the group. On-screen display 78 | void SelectContacts::on_userList_itemSelectionChanged() 79 | { 80 | int count = 0; 81 | for (int i = 0; i < ui->userList->count(); i++) 82 | { 83 | if (ui->userList->item(i)->isSelected()) 84 | count ++; 85 | } 86 | 87 | ui->count_member->setText(languageMembers + QString::number(count) + "/" + QString::number(ui->userList->count())); 88 | } 89 | 90 | void SelectContacts::SetLanguage(QMap & lan_dict) 91 | { 92 | languageMembers = lan_dict.value(ui->count_member->objectName()); 93 | ui->count_member->setText(languageMembers + "0" + "/" + QString::number(ui->userList->count())); 94 | ui->crGroup_button->setText(lan_dict.value(ui->crGroup_button->objectName())); 95 | ui->cancel_button->setText(lan_dict.value(ui->cancel_button->objectName())); 96 | } 97 | 98 | SelectContacts::~SelectContacts() 99 | { 100 | //delete ui; 101 | } 102 | -------------------------------------------------------------------------------- /Client/selectcontacts.h: -------------------------------------------------------------------------------- 1 | #ifndef SELECTCONTACTS_H 2 | #define SELECTCONTACTS_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "userlistdelegate.h" 9 | 10 | namespace Ui { 11 | class SelectContacts; 12 | } 13 | 14 | class SelectContacts : public QFrame 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | explicit SelectContacts(QWidget *parent = 0, QListWidget *list = 0); 20 | ~SelectContacts(); 21 | 22 | signals: 23 | void SelectUsersSignal(QStringList, QString); 24 | 25 | private slots: 26 | void on_crGroup_button_clicked(); 27 | void on_cancel_button_clicked(); 28 | void on_userList_itemSelectionChanged(); 29 | 30 | public slots: 31 | void SetLanguage(QMap &); 32 | 33 | private: 34 | Ui::SelectContacts *ui; 35 | QString languageMembers; 36 | }; 37 | 38 | #endif // SELECTCONTACTS_H 39 | -------------------------------------------------------------------------------- /Client/selectcontacts.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SelectContacts 4 | 5 | 6 | 7 | 0 8 | 0 9 | 361 10 | 540 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | background-color: rgb(255, 255, 255); 18 | 19 | 20 | 21 | 22 | 10 23 | 80 24 | 341 25 | 401 26 | 27 | 28 | 29 | 30 | 31 | 32 | QAbstractItemView::MultiSelection 33 | 34 | 35 | 36 | 37 | 38 | 0 39 | -1 40 | 371 41 | 71 42 | 43 | 44 | 45 | background-color: rgb(99, 137, 168); 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 20 55 | 25 56 | 311 57 | 21 58 | 59 | 60 | 61 | 62 | 12 63 | 64 | 65 | 66 | color: rgb(255, 255, 255); 67 | background-color: rgb(255, 255, 255, 0); 68 | 69 | 70 | Add members: 71 | 72 | 73 | 74 | 75 | 76 | 40 77 | 490 78 | 281 79 | 41 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 10 88 | 89 | 90 | 91 | QPushButton{color: rgb(126, 126, 126); background: white;} 92 | QPushButton:hover{background: #f6f4ff; border:none;} 93 | 94 | 95 | CANCEL 96 | 97 | 98 | true 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 10 107 | 108 | 109 | 110 | 111 | QPushButton{color: rgb(65, 109, 211); background: white;} 112 | QPushButton:hover{background: #f6f4ff; border:none;} 113 | 114 | 115 | CREATE 116 | 117 | 118 | true 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /Client/setting.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Setting 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 50 20 | 90 21 | 113 22 | 22 23 | 24 | 25 | 26 | 27 | 28 | 29 | 40 30 | 140 31 | 93 32 | 28 33 | 34 | 35 | 36 | 1 37 | 38 | 39 | 40 | 41 | 42 | 40 43 | 190 44 | 93 45 | 28 46 | 47 | 48 | 49 | 2 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Client/trayicon.cpp: -------------------------------------------------------------------------------- 1 | #include "trayicon.h" 2 | 3 | /******************************************************/ 4 | /* */ 5 | /* A pop-up window of a new message */ 6 | /* */ 7 | /******************************************************/ 8 | 9 | TrayIcon::TrayIcon(QObject *parent) : QSystemTrayIcon(parent) 10 | { 11 | setIcon(QIcon(":/new/prefix1/Resource/logo.png")); 12 | 13 | this->setVisible(true); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Client/trayicon.h: -------------------------------------------------------------------------------- 1 | #ifndef TRAYICON_H 2 | #define TRAYICON_H 3 | 4 | #include 5 | 6 | class TrayIcon : public QSystemTrayIcon 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit TrayIcon(QObject *parent = 0); 11 | }; 12 | 13 | #endif // TRAYICON_H 14 | -------------------------------------------------------------------------------- /Client/userlistdelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "userlistdelegate.h" 2 | #include 3 | #include 4 | 5 | /******************************************************/ 6 | /* */ 7 | /* UserListDelegate changes the standard display */ 8 | /* of users to display the name of the last message, */ 9 | /* time and avatars. */ 10 | /* And all this allows to combine in a single cell. */ 11 | /* */ 12 | /******************************************************/ 13 | 14 | UserListDelegate::UserListDelegate(QObject *parent) 15 | { 16 | 17 | } 18 | 19 | ////////////////////////////////////////////////////////// 20 | ////////////////////////////////////////////////////////// 21 | /// painter - responsible for drawing. 22 | /// option - display area 23 | /// index - takes the input parameters: 24 | // Sender's name - title 25 | // The last received message - description 26 | // Time - time 27 | // Image - mediaIcon (User Avatar) 28 | 29 | void UserListDelegate::paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const{ 30 | 31 | // Get title, description and icon 32 | QIcon mediaIcon = QIcon(qvariant_cast(index.data(Qt::DecorationRole))); 33 | QString title = index.data(Qt::DisplayRole).toString(); 34 | QString description = index.data(Qt::UserRole + 1).toString(); 35 | QString time = index.data(Qt::ToolTipRole).toString(); 36 | 37 | QRect r = option.rect; 38 | QPen linePen(QColor::fromRgb(211,211,211), 1, Qt::SolidLine); 39 | QPen lineMarkedPen(QColor::fromRgb(0,90,131), 1, Qt::SolidLine); 40 | QPen fontPen(QColor::fromRgb(51,51,51), 1, Qt::SolidLine); 41 | QPen fontMarkedPen(Qt::white, 1, Qt::SolidLine); 42 | 43 | // If a user is selected (pressed), changing the color(background) and size of the border area 44 | if (option.state & QStyle::State_Selected){ 45 | 46 | QLinearGradient gradientSelected(r.left(),r.top(),r.left(),r.height()+r.top()); 47 | gradientSelected.setColorAt(0.0, QColor::fromRgb(195,213,255)); 48 | gradientSelected.setColorAt(1.0, QColor::fromRgb(177,215,246)); 49 | painter->setBrush(gradientSelected); 50 | painter->drawRect(r); 51 | 52 | //BORDER 53 | painter->setPen(lineMarkedPen); 54 | painter->drawLine(r.topLeft(),r.topRight()); 55 | painter->drawLine(r.topRight(),r.bottomRight()); 56 | painter->drawLine(r.bottomLeft(),r.bottomRight()); 57 | painter->drawLine(r.topLeft(),r.bottomLeft()); 58 | 59 | painter->setPen(fontMarkedPen); 60 | 61 | } else { 62 | 63 | //BACKGROUND 64 | //ALTERNATING COLORS 65 | painter->setBrush( (index.row() % 2) ? Qt::white : QColor(252,252,252) ); 66 | painter->drawRect(r); 67 | 68 | //BORDER 69 | painter->setPen(linePen); 70 | painter->drawLine(r.topLeft(),r.topRight()); 71 | painter->drawLine(r.topRight(),r.bottomRight()); 72 | painter->drawLine(r.bottomLeft(),r.bottomRight()); 73 | painter->drawLine(r.topLeft(),r.bottomLeft()); 74 | 75 | painter->setPen(fontPen); 76 | } 77 | 78 | // The offset for the installation image 79 | int imageSpace = 10; 80 | if (!mediaIcon.isNull()) 81 | { 82 | r = option.rect.adjusted(2, 2, -1, -1); 83 | mediaIcon.paint(painter, r, Qt::AlignVCenter|Qt::AlignLeft); 84 | imageSpace = 85; 85 | } 86 | 87 | //TITLE 88 | r = option.rect.adjusted(imageSpace, 10, -10, -27); 89 | painter->setFont( QFont( "Lucida Grande", 16, QFont::Normal ) ); 90 | painter->drawText(r.left(), r.top(), r.width(), r.height(), Qt::AlignTop|Qt::AlignLeft, title, &r); 91 | // TIME 92 | r = option.rect.adjusted(60, 15, -10, -27); 93 | painter->setFont( QFont( "Lucida Grande", 12, QFont::Normal ) ); 94 | painter->drawText(r.left(), r.top(), r.width(), r.height(), Qt::AlignTop|Qt::AlignRight, time , &r); 95 | //DESCRIPTION 96 | r = option.rect.adjusted(imageSpace, 35, -10, 10); 97 | painter->setFont( QFont( "Lucida Grande", 12, QFont::Normal ) ); 98 | 99 | //If the last message is long, it is cut, for convenient display 100 | if (description.size() > 30) 101 | { 102 | description.remove(30, description.size()); 103 | description.append("..."); 104 | } 105 | painter->drawText(r.left(), r.top(), r.width(), r.height(), Qt::AlignLeft, description, &r); 106 | 107 | } 108 | 109 | ////////////////////////////////////////////////////////// 110 | ////////////////////////////////////////////////////////// 111 | /// Set the message block size 112 | QSize UserListDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const{ 113 | return QSize(200, 70); 114 | } 115 | 116 | 117 | -------------------------------------------------------------------------------- /Client/userlistdelegate.h: -------------------------------------------------------------------------------- 1 | #ifndef LISTDELEGATE_H 2 | #define LISTDELEGATE_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | class UserListDelegate : public QAbstractItemDelegate 9 | { 10 | public: 11 | UserListDelegate(QObject *parent = 0); 12 | void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const; 13 | QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const; 14 | }; 15 | 16 | #endif // LISTDELEGATE_H 17 | -------------------------------------------------------------------------------- /Client/usersgroupinfo.cpp: -------------------------------------------------------------------------------- 1 | #include "usersgroupinfo.h" 2 | #include "ui_usersgroupinfo.h" 3 | #include "userlistdelegate.h" 4 | #include 5 | 6 | /******************************************************/ 7 | /* */ 8 | /* Information window about the user */ 9 | /* or the group in which the user is. */ 10 | /* */ 11 | /******************************************************/ 12 | 13 | ////////////////////////////////////////////////////////// 14 | ////////////////////////////////////////////////////////// 15 | /// The constructor accepts parameters for the display of one the user (Name, age, city, sex) 16 | UsersGroupInfo::UsersGroupInfo(QWidget *parent, QStringList *UserInfo) : 17 | QFrame(parent), 18 | ui(new Ui::UsersGroupInfo) 19 | { 20 | // It is necessary to write about the number of files and the avatar. 21 | ui->setupUi(this); 22 | initWindow(); 23 | 24 | ui->name_label->setText(UserInfo->at(0)); 25 | ui->age->setText("Age: " + UserInfo->at(2)); 26 | ui->city->setText("City: " + UserInfo->at(3)); 27 | ui->sex->setText("Sex: " + UserInfo->at(1)); 28 | } 29 | 30 | 31 | ////////////////////////////////////////////////////////// 32 | ////////////////////////////////////////////////////////// 33 | /// The constructor accepts parameters for displaying information about the group (information about the group, the number of people(list)) 34 | UsersGroupInfo::UsersGroupInfo(QWidget *parent, QString _name, QString _descr, QListWidget *list) : 35 | QFrame(parent), 36 | ui(new Ui::UsersGroupInfo) 37 | { 38 | ui->setupUi(this); 39 | initWindow(); 40 | 41 | ui->name_label->setText(_name); 42 | ui->description_label->setText(_descr); 43 | 44 | for(int i=0; icount(); i++) 45 | { 46 | QListWidgetItem *item = new QListWidgetItem(); 47 | item->setData(Qt::DisplayRole, list->item(i)->data(Qt::DisplayRole).toString()); 48 | item->setData(Qt::ToolTipRole, list->item(i)->data(Qt::ToolTipRole).toString()); 49 | item->setData(Qt::UserRole + 1, list->item(i)->data(Qt::UserRole + 1).toString()); 50 | item->setData(Qt::DecorationRole, list->item(i)->data(Qt::DecorationRole)); 51 | ui->userList->addItem(item); 52 | } 53 | 54 | ui->userList->setItemDelegate(new UserListDelegate(ui->userList)); 55 | } 56 | ////////////////////////////////////////////////////////// 57 | ////////////////////////////////////////////////////////// 58 | /// Setting animation when opening window 59 | void UsersGroupInfo::initWindow() 60 | { 61 | //To hide the edges of the form and standard buttons. 62 | this->setWindowFlags(Qt::Popup | Qt::Window); 63 | setWindowOpacity(0); 64 | show(); 65 | 66 | QPropertyAnimation* animation = new QPropertyAnimation(this, "windowOpacity"); 67 | animation->setDuration(500); 68 | animation->setStartValue(0); 69 | animation->setEndValue(1); 70 | animation->start(); 71 | } 72 | 73 | UsersGroupInfo::~UsersGroupInfo() 74 | { 75 | delete ui; 76 | } 77 | -------------------------------------------------------------------------------- /Client/usersgroupinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef USERSGROUPINFO_H 2 | #define USERSGROUPINFO_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | namespace Ui { 11 | class UsersGroupInfo; 12 | } 13 | 14 | class UsersGroupInfo : public QFrame 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | UsersGroupInfo(QWidget *parent = 0, QStringList *_userData = 0); 20 | UsersGroupInfo(QWidget *parent = 0, QString _name = 0, QString _descr = 0, QListWidget *list = 0); 21 | void initWindow(); 22 | ~UsersGroupInfo(); 23 | 24 | public slots: 25 | //void set_lang(QMap &); 26 | 27 | private: 28 | Ui::UsersGroupInfo *ui; 29 | }; 30 | 31 | #endif // USERSGROUPINFO_H 32 | -------------------------------------------------------------------------------- /Client/usersgroupinfo.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | UsersGroupInfo 4 | 5 | 6 | 7 | 0 8 | 0 9 | 330 10 | 480 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | background-color: rgb(255, 255, 255); 18 | 19 | 20 | 21 | 22 | 0 23 | 159 24 | 331 25 | 321 26 | 27 | 28 | 29 | 0 30 | 31 | 32 | 33 | 34 | 35 | 30 36 | 20 37 | 271 38 | 191 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 10 47 | 48 | 49 | 50 | Sex: 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 10 59 | 60 | 61 | 62 | Age: 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 10 71 | 72 | 73 | 74 | City: 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 10 83 | 84 | 85 | 86 | Shared media: 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 30 96 | 250 97 | 271 98 | 57 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 0 107 | 45 108 | 109 | 110 | 111 | 112 | 10 113 | 114 | 115 | 116 | 117 | QPushButton{ background: white;} 118 | QPushButton:hover{background: #f6f4ff; border:none;} 119 | 120 | 121 | Clear History 122 | 123 | 124 | true 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 0 133 | 45 134 | 135 | 136 | 137 | 138 | 10 139 | 140 | 141 | 142 | 143 | 144 | QPushButton{color: rgb(255, 0, 0); background: white;} 145 | QPushButton:hover{background: #f6f4ff; border:none;} 146 | 147 | 148 | Delete User 149 | 150 | 151 | true 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 30 163 | 90 164 | 271 165 | 151 166 | 167 | 168 | 169 | 170 | 171 | 172 | 30 173 | 250 174 | 271 175 | 51 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 0 184 | 45 185 | 186 | 187 | 188 | 189 | 10 190 | 191 | 192 | 193 | QPushButton{ background: white;} 194 | QPushButton:hover{background: #f6f4ff; border:none;} 195 | 196 | 197 | Clear History 198 | 199 | 200 | true 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 0 209 | 45 210 | 211 | 212 | 213 | 214 | 10 215 | 216 | 217 | 218 | QPushButton{color: rgb(255, 0, 0); background: white;} 219 | QPushButton:hover{background: #f6f4ff; border:none;} 220 | 221 | 222 | Leave Group 223 | 224 | 225 | true 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 30 235 | 0 236 | 271 237 | 81 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 10 246 | 247 | 248 | 249 | background-color: rgb(255, 255, 255, 0); 250 | 251 | 252 | 253 | Description: 254 | 255 | 256 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 10 265 | 266 | 267 | 268 | Members: 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 130 280 | 10 281 | 81 282 | 81 283 | 284 | 285 | 286 | background-color: rgb(255, 255, 255, 25); 287 | 288 | 289 | 290 | 291 | 292 | :/Avatars/Resource/Avatars/4.jpg 293 | 294 | 295 | true 296 | 297 | 298 | 299 | 300 | 301 | 0 302 | 0 303 | 331 304 | 151 305 | 306 | 307 | 308 | background-color: rgb(99, 137, 168); 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 0 318 | 80 319 | 331 320 | 71 321 | 322 | 323 | 324 | 325 | 14 326 | 327 | 328 | 329 | color: rgb(255, 255, 255); 330 | background-color: rgb(255, 255, 255, 0); 331 | 332 | 333 | Hello World 334 | 335 | 336 | Qt::AlignCenter 337 | 338 | 339 | stackedWidget 340 | label 341 | avatar_label 342 | name_label 343 | 344 | 345 | 346 | 347 | 348 | 349 | -------------------------------------------------------------------------------- /Client/xml_language.cpp: -------------------------------------------------------------------------------- 1 | #include "xml_language.h" 2 | 3 | 4 | XML_Language::XML_Language(QObject *parent) : QObject(parent) 5 | { 6 | 7 | } 8 | 9 | QMap XML_Language::ParseXML(QString fileName) 10 | { 11 | XML_fileName = fileName; 12 | fileLanguage = new QFile(":/Language/Resource/XML_Language/" + XML_fileName + ".xml"); 13 | 14 | if(!fileLanguage->open(QIODevice::ReadOnly | QIODevice::Text)) { 15 | qDebug() << "Language file is not found"; 16 | return dictionary; 17 | } 18 | 19 | QXmlStreamReader xml(fileLanguage); 20 | QString line_tag; 21 | 22 | while (!xml.atEnd() && !xml.hasError() ) { 23 | if(xml.isStartElement()) 24 | { 25 | if (xml.name() == "line") 26 | { 27 | xml.readNext(); 28 | line_tag = xml.text().toString(); 29 | } 30 | else if (xml.name() == "value") 31 | { 32 | xml.readNext(); 33 | dictionary.insert(line_tag, xml.text().toString()); 34 | } 35 | } 36 | xml.readNext(); 37 | } 38 | 39 | return dictionary; 40 | } 41 | -------------------------------------------------------------------------------- /Client/xml_language.h: -------------------------------------------------------------------------------- 1 | #ifndef XML_LANGUAGE_H 2 | #define XML_LANGUAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | class XML_Language : public QObject 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit XML_Language(QObject *parent = 0); 17 | QMap ParseXML(QString); 18 | 19 | private: 20 | QString XML_fileName; 21 | QFile *fileLanguage; 22 | QMap dictionary; 23 | 24 | }; 25 | 26 | #endif // XML_LANGUAGE_H 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WaveTalk (~Whisper) 2 |
3 | 4 |
5 | 6 | ### Client - Server application, Messenger 7 | 8 | The сrossplatform client is the messenger, which interacts with the [mobile client](https://github.com/MarioCode/WaveTalk) and [desktop applications](https://github.com/MarioCode/Chat/tree/master/Client). Data transmission between devices is organized with using TCP sockets. 9 | 10 | #### Client: 11 | Cross-platform program written in C ++ (Qt). Has a complete user-friendly interface, a lot of settings, support for encryption. 12 | 13 | #### Server: 14 | It is a centralized place for connecting clients, both desktop and mobile. 15 | This server can be deployed not only for the Internet, but also for local work. To store user information used the SQLite database. 16 | Used partial multithreading and support at least 100 connections. 17 | 18 | The development is aimed at creating a secure multi-user system for instant information exchange between users. 19 | 20 | Mobile iOS client (Swift): https://github.com/MarioCode/WaveTalk 21 | 22 | This project is developed as a diploma thesis of bachelor for the University. 23 | 24 | --- 25 | 26 | #### Already implemented: 27 | + Finished UI parts, user-friendly interface 28 | + Registration, authorization of users 29 | + Group Dialogues 30 | + Full translation of 4 languages (Russian, English, French, German) 31 | + Notifications and emoji 32 | + Encryption: 33 | - RSA (256 bit) - for messages 34 | - MD5 (+salt) - for user passwords 35 | + Database: 36 | - SQLite - storage for text information (user's data, messages, etc) 37 | 38 | #### In the plans: 39 | + _Storage of media files_ 40 | + _Improve server stability_ 41 | + _Using multithreading in the client_ 42 | + _Use real user avatars (as in the mobile client)_ 43 | + _Choice of encryption algorithm_ 44 | 45 | --- 46 | 47 | #### Instruments: 48 | + Qt Creator 4+ 49 | + C++ 50 | + SourceTree / Git 51 | 52 | --- 53 | 54 | ### Build the project 55 | ``` 56 | qmake Chat.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 CONFIG+=qml_debug && /usr/bin/make qmake_all 57 | ``` 58 | 59 | ### The current developments 60 | 61 | #### Working area of the chat. Contact list and selected dialog 62 | 63 | 64 | #### Authorization, Registration 65 | 66 | 67 | #### Setting (profile), Chat space 68 | 69 | 70 | #### Create group chat, Server log 71 | 72 | -------------------------------------------------------------------------------- /Server/Server.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-10-03T17:53:03 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui network sql 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = Server 12 | TEMPLATE = app 13 | CONFIG += c++11 14 | 15 | SOURCES += main.cpp\ 16 | server.cpp \ 17 | sqlitedb.cpp \ 18 | user.cpp 19 | 20 | HEADERS += server.h \ 21 | sqlitedb.h \ 22 | user.h 23 | 24 | FORMS += server.ui 25 | -------------------------------------------------------------------------------- /Server/main.cpp: -------------------------------------------------------------------------------- 1 | #include "server.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | Server w; 8 | w.show(); 9 | 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /Server/server.h: -------------------------------------------------------------------------------- 1 | #ifndef SERVER_H 2 | #define SERVER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "sqlitedb.h" 15 | #include "user.h" 16 | 17 | typedef QList > PairStringList; 18 | 19 | 20 | namespace Ui { 21 | class Server; 22 | } 23 | 24 | class Server : public QMainWindow 25 | { 26 | Q_OBJECT 27 | 28 | public: 29 | explicit Server(QWidget *parent = 0); 30 | ~Server(); 31 | 32 | private slots: 33 | void getMessage(); 34 | void NewConnect(); 35 | void onDisconnect(); 36 | void Status(); 37 | 38 | void SendResponseToID(QString message, int ID); //Отправка личных сообщений 39 | void userIsOnline(QTcpSocket *client, QString _user); 40 | void privateMessage(QTcpSocket *client, QStringList); 41 | void SendingFile(QTcpSocket *client); 42 | void LogIn(QTcpSocket *client, QString &U, QString &C, QString &P, QString &A, QString &S, QString &PubK, QString &Salt); 43 | void NotificationNetwork(const QString, const QStringList &, int); 44 | QStringList requestSeparation(QString text); 45 | 46 | void on_pushButton_clicked(); 47 | 48 | private: 49 | Ui::Server *ui; 50 | SQLiteDB *sqlitedb; 51 | QTcpServer *tcpServer; 52 | QList clientConnections; //Список подключений 53 | 54 | QString timeconnect(); //Время соединения 55 | quint32 nextBlockSize; 56 | QHash buffers; 57 | QHash sizes; 58 | QTimer *timer; 59 | }; 60 | 61 | #endif // SERVER_H 62 | -------------------------------------------------------------------------------- /Server/server.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Server 4 | 5 | 6 | 7 | 0 8 | 0 9 | 904 10 | 394 11 | 12 | 13 | 14 | Server 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 0 25 | 0 26 | 27 | 28 | 29 | 30 | 700 31 | 0 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | Send 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Server/sqlitedb.h: -------------------------------------------------------------------------------- 1 | #ifndef SQLITEDB_H 2 | #define SQLITEDB_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | typedef QList > > > ChatListVector; 9 | typedef QList > PairStringList; 10 | 11 | class SQLiteDB : public QObject 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit SQLiteDB(QObject *parent = 0); 16 | ~SQLiteDB(); 17 | 18 | private: 19 | QSqlDatabase myDB; 20 | QString CheckPass(QString); 21 | 22 | public slots: 23 | void AddContact(QString, QString, int, QString, QString, QString, QString); 24 | void addMessInChat(QString, QString, QString, QString); 25 | QString FriendList(QString, int &); 26 | QString getChatHistory(QString user); 27 | QString getChatHistoryPerUser(QString myName, QString user); 28 | void createGroup(QString , QString , QStringList); 29 | void addChatTable(QString, QString); 30 | QString FindInDB(QString, QString); 31 | void ClearHistory(QString, QString); 32 | void delFriend(QString, QString); 33 | void UpOnlineStatus(const QString&, const QString&); 34 | void updateAllDataOfUser(QStringList); 35 | void updateStateNotificationFromUser(QString, QString, QString); 36 | QStringList getOnlineStatus(const QString & user_name); 37 | QString getFullUserInformations(QString); 38 | QString getOnlyPublicKey(QString); 39 | QString CorrectInput(QString, QString); 40 | QStringList UserData(QString); 41 | void FriendListName(QString, QStringList &); 42 | }; 43 | 44 | #endif // SQLITEDB_H 45 | -------------------------------------------------------------------------------- /Server/user.cpp: -------------------------------------------------------------------------------- 1 | #include "user.h" 2 | 3 | User::User() 4 | { 5 | this->UserName = "Unknown"; 6 | socket = nullptr; 7 | } 8 | 9 | void User::setUserName(QString name) 10 | { 11 | this->UserName = name; 12 | } 13 | 14 | QString User::getUserName() 15 | { 16 | return UserName; 17 | } 18 | 19 | void User::setSocket(QTcpSocket* socket) 20 | { 21 | if (socket == nullptr) 22 | delete socket; 23 | this->socket = socket; 24 | } 25 | 26 | QTcpSocket* User::getSocket() 27 | { 28 | return socket; 29 | } 30 | 31 | 32 | User::~User() 33 | { 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /Server/user.h: -------------------------------------------------------------------------------- 1 | #ifndef USER_H 2 | #define USER_H 3 | 4 | #include 5 | #include 6 | 7 | class User 8 | { 9 | public: 10 | User(); 11 | ~User(); 12 | 13 | public slots: 14 | void setUserName(QString name); 15 | void setSocket(QTcpSocket* socket); 16 | 17 | QTcpSocket* getSocket(); 18 | QString getUserName(); 19 | 20 | private: 21 | QString UserName; 22 | QTcpSocket* socket; 23 | 24 | }; 25 | 26 | #endif // USER_H 27 | --------------------------------------------------------------------------------