Skip to content

Commit 3df523a

Browse files
authored
Merge pull request #1 from Simon-12/develop
Add code
2 parents 1af5d89 + 5428d04 commit 3df523a

File tree

251 files changed

+14813
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+14813
-2
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
*.dll
3+
*.user
4+
build*
5+
docs/html/

CMakeLists.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
project(tidy-images
4+
VERSION 1.0.0
5+
LANGUAGES CXX)
6+
7+
# Options
8+
option( APP_BUILD_PLUGINS "Build plugins (be sure dependencies are installed and in PATH)" ON )
9+
option( APP_BUILD_TESTS "Build unit tests" ON )
10+
option( APP_BUILD_DOC "Generate documentation (requires Doxygen)" ON )
11+
option( APP_COPY_SAMPLES "Copy samples to application folder" ON )
12+
13+
# Main application
14+
add_subdirectory(app)
15+
16+
# Plugins
17+
if( APP_BUILD_PLUGINS )
18+
add_subdirectory( plugins/exiv2 )
19+
add_subdirectory( plugins/opencv )
20+
endif()
21+
22+
# Unit tests
23+
if( APP_BUILD_TESTS )
24+
add_subdirectory( tests/test_app )
25+
endif()
26+
27+
# Documentation
28+
if( APP_BUILD_DOC )
29+
add_subdirectory( docs )
30+
endif()
31+
32+
# Copy samples
33+
if( APP_COPY_SAMPLES )
34+
file(GLOB samples "samples/*")
35+
file(COPY ${samples} DESTINATION "app/samples")
36+
endif()

README.md

Lines changed: 107 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,107 @@
1-
# tidy-images
2-
Easy sort and organize your image collection
1+
# Tidy Images
2+
Easy sort and organize your image collection
3+
<br>
4+
<br>
5+
6+
[![Paypal](https://img.shields.io/badge/donate-PayPal-blue.svg?style=flat-square&logo=paypal)](https://paypal.me/SimonSchwarzkopf)
7+
[![Bitcoin](https://img.shields.io/badge/donate-Bitcoin-orange.svg?style=flat-square&logo=bitcoin)](https://github.com/Simon-12/TestImage/blob/develop/app/data/bitcoin-code.png)
8+
<br>
9+
<br>
10+
11+
12+
## Features
13+
14+
![Gallery](https://github.com/Simon-12/common/blob/main/tidy-images/01.gif)
15+
<br>
16+
17+
Image and videos can be viewed in different modes: as Gallery, Image-only-viewer and Video-only-viewer.
18+
Files can be moved into separate folders and can be added to a database for later browsing.
19+
Files can also be copied to a specific folder or be deleted.
20+
All actions can be undo or redo.
21+
22+
<details>
23+
<summary>...</summary>
24+
<img src="https://github.com/Simon-12/common/blob/main/tidy-images/02.gif" width="65%"/>
25+
<img src="https://github.com/Simon-12/common/blob/main/tidy-images/03.gif" width="65%"/>
26+
</details>
27+
<br>
28+
29+
Files can be labeled with text information or marked as favorite. Favorite images get copied into a separate folder.
30+
The database can be browsed for already sorted files (currently support SQLite).
31+
Folders can be completely added or removed from the database.
32+
33+
<details>
34+
<summary>...</summary>
35+
<img src="https://github.com/Simon-12/common/blob/main/tidy-images/04.gif" width="65%"/>
36+
<img src="https://github.com/Simon-12/common/blob/main/tidy-images/05.gif" width="65%"/>
37+
</details>
38+
<br>
39+
40+
41+
To find similar images, images can be compared side by side or with an algorithm.
42+
(for algorithm the OpenCV plugin is needed)
43+
44+
<details>
45+
<summary>...</summary>
46+
<img src="https://github.com/Simon-12/common/blob/main/tidy-images/06.gif" width="65%"/>
47+
</details>
48+
<br>
49+
50+
## Plugins
51+
52+
The application can be extended with plugins. The idea is to reduce dependencies, so the application can also be built without external libs.
53+
<br>
54+
<br>
55+
56+
Plugin | | Description | Link
57+
:----: | :--: | :----------- | :----
58+
**Exiv2** | <img src="https://github.com/Simon-12/TestImage/blob/develop/plugins/exiv2/plugin/icon.png" width="50%"/> | Image metadata library and tools. Is needed for read image metadata (date) and read and write labels to metadata comment section. | [github/exiv2](https://github.com/Exiv2/exiv2)
59+
**OpenCV** | <img src="https://github.com/Simon-12/TestImage/blob/develop/plugins/opencv/plugin/icon.png" width="40%"/> | Open Source Computer Vision Library. Is needed for read and rotate images, read in single video frames and the image compare algorithm. | [github/opencv](https://github.com/opencv/opencv)
60+
61+
<br>
62+
63+
## Installation
64+
- Tested under Windows 10 and Linux with Qt version 5.15.2
65+
- Download the current release link... and unzip
66+
- Open `CMakeLists.txt` inside your Qt Creator and configure with on if your installed Qt kits
67+
- If you want to play videos you have to install codecs to your system. For windows i can recommend the K-Lite Basic Pack: [link](http://www.codecguide.com/download_kl.htm)
68+
69+
<br>
70+
71+
**CMake options**
72+
73+
Options | Purpose | Default |
74+
:------ |:------- |:------: |
75+
APP\_BUILD\_PLUGINS | Build plugins (be sure dependencies are installed and in PATH) | ON
76+
APP\_BUILD\_TESTS |Build unit tests | ON
77+
APP\_BUILD\_DOC | Generate documentation (requires Doxygen) | ON
78+
APP\_COPY\_SAMPLES | Copy samples to the application folder | ON
79+
80+
<br>
81+
82+
## TO-DO
83+
- [ ] Add more options to customize the application
84+
- [ ] Display more image meta data (exiv2 plugin)
85+
- [ ] Plugin for alternative database ...?
86+
- [ ] Use VLC lib for videos ...?
87+
- [ ] Port to Qt6
88+
<br>
89+
90+
## Story
91+
This application was published in the hope that someone would find it useful and inspiring.
92+
In the first place this application was developed for my wife, to sort her beautiful camera pictures and to find her favorite memories in a well organized database.
93+
Thanks a lot to Bryan for the instructive Udemy courses and YouTube tutorials. With this i could improve my skills and got some good inspirations to do this project.
94+
For interested check out the links below and join the community:
95+
- [facebook/voidrealms](https://www.facebook.com/groups/1400884323467285/)
96+
- [youtube/voidrealms](https://www.youtube.com/user/VoidRealms)
97+
- [udemy/bryan-cairns](https://www.udemy.com/user/bryan-cairns/)
98+
99+
Feedback, suggestions for improvements or ideas for new features are always welcome. If you find bugs, please report to: [github/issues](https://github.com/Simon-12/tidy-images/issues)
100+
101+
If you like the application and want to support, you can donate via:
102+
103+
PayPal | Bitcoin
104+
:----: | :-----:
105+
[![Paypal img](https://github.com/Simon-12/TestImage/blob/develop/app/icons/flaticon/paypal.png)](https://paypal.me/SimonSchwarzkopf) | <img src="https://github.com/Simon-12/TestImage/blob/develop/app/data/bitcoin-code.png" width="40%"/><br>**bc1qll43hkqvv9jjwqw54xhejw324q4t4t55p8ss9e**
106+
107+
<br>

app/CMakeLists.txt

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
get_filename_component(ProjectId ${CMAKE_CURRENT_LIST_DIR} NAME)
4+
string(REPLACE " " "_" ProjectId ${ProjectId})
5+
project(${ProjectId} CXX)
6+
7+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
8+
9+
set(CMAKE_AUTOUIC ON)
10+
set(CMAKE_AUTOMOC ON)
11+
set(CMAKE_AUTORCC ON)
12+
13+
set(CMAKE_CXX_STANDARD 11)
14+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
15+
16+
# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
17+
# Check https://doc.qt.io/qt/deployment-android.html for more information.
18+
# They need to be set before the find_package(...) calls below.
19+
20+
#if(ANDROID)
21+
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
22+
# if (ANDROID_ABI STREQUAL "armeabi-v7a")
23+
# set(ANDROID_EXTRA_LIBS
24+
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so
25+
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so)
26+
# endif()
27+
#endif()
28+
29+
# - - - For static plugins
30+
#set("OpenCV_DIR" "E:/libs/opencv-4.5.3/release/x86/vc16/staticlib") # Win32
31+
#set("exiv2_DIR" "E:/libs/exiv2-0.27.4/release/lib/cmake/exiv2") # Win32
32+
#find_package(OpenCV REQUIRED)
33+
#find_package(exiv2 REQUIRED CONFIG NAMES exiv2)
34+
# - - -
35+
36+
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick QmlImportScanner Widgets Concurrent Sql Multimedia REQUIRED)
37+
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick QmlImportScanner Widgets Concurrent Sql Multimedia REQUIRED)
38+
39+
set(PROJECT_SOURCES
40+
41+
src/main.cpp
42+
data/data.qrc
43+
icons/icons.qrc
44+
qml/qml.qrc
45+
46+
src/options.h
47+
src/settings.h
48+
src/support.h
49+
src/qmlcontroller.h
50+
src/qmlcontroller.cpp
51+
src/logger.h
52+
src/logger.cpp
53+
src/loaderclass.h
54+
src/loaderclass.cpp
55+
src/applicationinfo.h
56+
src/applicationinfo.cpp
57+
src/iconitem.h
58+
src/iconmodel.h
59+
src/iconmodel.cpp
60+
61+
src/plugins/baseplugin.h
62+
src/plugins/exivplugin.h
63+
src/plugins/exivplugin.cpp
64+
src/plugins/visionplugin.h
65+
src/plugins/visionplugin.cpp
66+
src/plugins/pluginloader.h
67+
src/plugins/pluginloader.cpp
68+
src/plugins/pluginitem.h
69+
src/plugins/pluginmodel.h
70+
src/plugins/pluginmodel.cpp
71+
72+
src/filehandler/basehandler.h
73+
src/filehandler/basehandler.cpp
74+
src/filehandler/confighandler.h
75+
src/filehandler/confighandler.cpp
76+
src/filehandler/folderfiltermodel.h
77+
src/filehandler/folderfiltermodel.cpp
78+
src/filehandler/folderhandler.h
79+
src/filehandler/folderhandler.cpp
80+
src/filehandler/folderitem.h
81+
src/filehandler/foldermodel.h
82+
src/filehandler/foldermodel.cpp
83+
84+
src/listhandler/listhandler.h
85+
src/listhandler/listhandler.cpp
86+
src/listhandler/listsort.h
87+
src/listhandler/listsort.cpp
88+
src/listhandler/imageprovider.h
89+
src/listhandler/imageprovider.cpp
90+
91+
src/listhandler/basefile/basefile.h
92+
src/listhandler/basefile/basefile.cpp
93+
src/listhandler/basefile/imagefile.h
94+
src/listhandler/basefile/imagefile.cpp
95+
src/listhandler/basefile/videofile.h
96+
src/listhandler/basefile/videofile.cpp
97+
98+
src/listhandler/command/commandlist.h
99+
src/listhandler/command/commandlist.cpp
100+
src/listhandler/command/commanddata.h
101+
src/listhandler/command/basecommand.h
102+
src/listhandler/command/basecommand.cpp
103+
src/listhandler/command/commanditem.h
104+
src/listhandler/command/commandmodel.h
105+
src/listhandler/command/commandmodel.cpp
106+
src/listhandler/command/copycommand.h
107+
src/listhandler/command/copycommand.cpp
108+
src/listhandler/command/favoritecommand.h
109+
src/listhandler/command/favoritecommand.cpp
110+
src/listhandler/command/movecommand.h
111+
src/listhandler/command/movecommand.cpp
112+
113+
src/listhandler/models/fileitem.h
114+
src/listhandler/models/filemodel.h
115+
src/listhandler/models/filemodel.cpp
116+
src/listhandler/models/listmodels.h
117+
src/listhandler/models/imagemodel.h
118+
src/listhandler/models/imagemodel.cpp
119+
src/listhandler/models/labelmodel.h
120+
src/listhandler/models/labelmodel.cpp
121+
122+
src/listhandler/compare/comparelist.h
123+
src/listhandler/compare/comparelist.cpp
124+
src/listhandler/compare/tablemodel.h
125+
src/listhandler/compare/tablemodel.cpp
126+
127+
src/listhandler/database/database.h
128+
src/listhandler/database/database.cpp
129+
src/listhandler/database/sqlhandler.h
130+
src/listhandler/database/sqlhandler.cpp
131+
src/listhandler/database/headeritem.h
132+
src/listhandler/database/headermodel.h
133+
src/listhandler/database/headermodel.cpp
134+
)
135+
136+
include_directories(src) # Avoids long headers (sorry)
137+
138+
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
139+
qt_add_executable(${CMAKE_PROJECT_NAME}
140+
${PROJECT_SOURCES}
141+
)
142+
else()
143+
if(ANDROID)
144+
add_library(${CMAKE_PROJECT_NAME} SHARED
145+
${PROJECT_SOURCES}
146+
)
147+
else()
148+
add_executable(${CMAKE_PROJECT_NAME}
149+
${PROJECT_SOURCES}
150+
)
151+
endif()
152+
endif()
153+
154+
target_compile_definitions(${CMAKE_PROJECT_NAME}
155+
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
156+
157+
target_link_libraries(${CMAKE_PROJECT_NAME}
158+
PRIVATE Qt${QT_VERSION_MAJOR}::Core
159+
Qt${QT_VERSION_MAJOR}::Quick
160+
Qt${QT_VERSION_MAJOR}::Widgets
161+
Qt${QT_VERSION_MAJOR}::Concurrent
162+
Qt${QT_VERSION_MAJOR}::Sql
163+
Qt${QT_VERSION_MAJOR}::Multimedia)
164+
165+
# - - - For static build
166+
#set(CMAKE_CXX_FLAGS_RELEASE "/MT")
167+
#qt5_import_qml_plugins(${CMAKE_PROJECT_NAME})
168+
#target_link_libraries(${CMAKE_PROJECT_NAME}
169+
# PRIVATE Qt${QT_VERSION_MAJOR}::Core
170+
# Qt${QT_VERSION_MAJOR}::Quick
171+
# Qt${QT_VERSION_MAJOR}::Widgets
172+
# Qt${QT_VERSION_MAJOR}::Concurrent
173+
# Qt${QT_VERSION_MAJOR}::Sql
174+
# Qt${QT_VERSION_MAJOR}::Multimedia
175+
# ${CMAKE_BINARY_DIR}/plugins/opencv_plugin.lib
176+
# ${OpenCV_LIBS}
177+
# ${CMAKE_BINARY_DIR}/plugins/exiv2_plugin.lib
178+
# exiv2lib
179+
# "E:/libs/exiv2-0.27.4/release/lib/exiv2-xmp.lib"
180+
# "E:/libs/exiv2-0.27.4/release/lib/libexpat.lib"
181+
# "E:/libs/exiv2-0.27.4/release/lib/zlibstatic.lib")

app/data/bitcoin-code.png

18.1 KB
Loading

app/data/data.qrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<RCC>
2+
<qresource prefix="/">
3+
<file>fonts/RobotoMono-Regular.ttf</file>
4+
<file>bitcoin-code.png</file>
5+
<file>fonts/Roboto-Regular.ttf</file>
6+
<file>fonts/Roboto-Bold.ttf</file>
7+
<file>fonts/Roboto-Italic.ttf</file>
8+
</qresource>
9+
</RCC>

app/data/fonts/Roboto-Bold.ttf

163 KB
Binary file not shown.

app/data/fonts/Roboto-Italic.ttf

167 KB
Binary file not shown.

app/data/fonts/Roboto-Regular.ttf

164 KB
Binary file not shown.

0 commit comments

Comments
 (0)