Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

[task_02] Add task 02 #127

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
| № | ФИО | Directory name | #1 | #2 | #3 | #4 | #5 | #6 | #7 | Рейтинг | Амбиции | Реальность |
| --- | ---------------------------------------------------------------- | -------------- | --- | --- | --- | --- | --- | --- | --- | ------- | ------- | ------- |
| 1 | [Кузьмич Вадим](https://github.com/orgs/brstu/people/vkn10) |[ii02211](./trunk/ii02211)|:heavy_check_mark:|:heavy_check_mark:| |:heavy_check_mark:|:heavy_check_mark:| | | | | |
| 2 | [Любчук Илья](https://github.com/snep1one)|[ii02212](./trunk/ii02212)|:heavy_check_mark:| | | | | | | | 5 | 0 |
| 2 | [Любчук Илья](https://github.com/snep1one)|[ii02212](./trunk/ii02212)|:heavy_check_mark:|:heavy_check_mark:| | | | | | | 5 | 0 |
| 3 | [Марач Максим](https://github.com/orgs/brstu/people/MaximMarach) | | | | | | | | | | | |
| 4 | [Нестерчук Дмитрий](https://github.com/nesterchuk11) |[ii02214](./trunk/ii02214)| |:heavy_check_mark:| |:heavy_check_mark:|:heavy_check_mark:| | | | 5 | 0 |
| 5 | [Павлюкович Игорь](https://github.com/orgs/brstu/people/Kre1kh) |[ii02215](./trunk/ii02215)| |:heavy_check_mark:| |:heavy_check_mark:|:heavy_check_mark:| | | | 4 | 0 |
Expand Down
25 changes: 25 additions & 0 deletions trunk/ii02212/task_02/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Лабораторная работа № 2
## Разработка приложения "Адресная книга" средствами Qt

## Цель работы
Изучить базовые компоненты средства разработки графического интерфейса среды Qt

## Ход работы
В ходе работы над лабораторной работой была реализована программа "Адресная Книга", которая позволяла при помощи графического интерфейса пользователя
добавлять записи, просматривать их, редактировать, сохранять/открывать файлы с записями, а так же экспортировать их в другой формат.

## Графический интерфейс пользователя и результат работы

Добавление в адресную книгу
![](images/add.png)
Удаление
![](images/delete.png)
Обновление записи
![](images/update.png)
Поиск
![](images/find.png)
Открытие файла
![](images/open.png)
![](images/open2.png)
Сохранение
![](images/save.png)
Binary file added trunk/ii02212/task_02/images/add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/ii02212/task_02/images/delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/ii02212/task_02/images/find.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/ii02212/task_02/images/open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/ii02212/task_02/images/open2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/ii02212/task_02/images/save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/ii02212/task_02/images/update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions trunk/ii02212/task_02/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
cmake_minimum_required(VERSION 3.5)

project(Lab2Giis VERSION 0.1 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)

set(PROJECT_SOURCES
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
)

if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(Lab2Giis
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
# Define target properties for Android with Qt 6 as:
# set_property(TARGET Lab2Giis APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
else()
if(ANDROID)
add_library(Lab2Giis SHARED
${PROJECT_SOURCES}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else()
add_executable(Lab2Giis
${PROJECT_SOURCES}
)
endif()
endif()

target_link_libraries(Lab2Giis PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)

# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
if(${QT_VERSION} VERSION_LESS 6.1.0)
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.Lab2Giis)
endif()
set_target_properties(Lab2Giis PROPERTIES
${BUNDLE_ID_OPTION}
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)

include(GNUInstallDirs)
install(TARGETS Lab2Giis
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(Lab2Giis)
endif()
35 changes: 35 additions & 0 deletions trunk/ii02212/task_02/src/addressBook.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
QT += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
addressbook.cpp \
finddialog.cpp \
main.cpp \
mainwindow.cpp

HEADERS += \
addressbook.h \
finddialog.h \
mainwindow.h

FORMS += \
mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
Loading
Loading