├── .clang-format ├── .gitignore ├── .vscode ├── BuildRun.sh ├── c_cpp_properties.json └── settings.json ├── CMakeLists.txt ├── LICENSES └── GPL-3.0-or-later.txt ├── Messages.sh ├── README.md ├── android_files ├── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── res │ ├── drawable-hdpi │ └── icon.png │ ├── drawable-ldpi │ └── icon.png │ ├── drawable-mdpi │ └── icon.png │ ├── values │ └── libs.xml │ └── xml │ └── filepaths.xml ├── ios_files └── Info.plist ├── logo.png ├── logo.png.license ├── macos_files └── index.icns ├── org.kde.index.appdata.xml ├── screenshots ├── Screenshot_1.png ├── Screenshot_2.png ├── Screenshot_3.png └── Screenshot_4.png ├── src ├── CMakeLists.txt ├── assets │ ├── application-x-zerosize.png │ ├── application-x-zerosize.png.license │ ├── application-x-zerosize.svg │ ├── application-x-zerosize.svg.license │ ├── index.png │ ├── index.png.license │ ├── index.svg │ ├── index.svg.license │ ├── index48.png │ ├── index48.png.license │ ├── index72.png │ ├── index72.png.license │ ├── index96.png │ └── index96.png.license ├── controllers │ ├── compressedfile.cpp │ ├── compressedfile.h │ ├── dirinfo.cpp │ ├── dirinfo.h │ ├── filepreviewer.cpp │ └── filepreviewer.h ├── index.cpp ├── index.h ├── index_assets.qrc ├── main.cpp ├── main.qml ├── models │ ├── recentfilesmodel.cpp │ └── recentfilesmodel.h ├── org.kde.index.desktop ├── qml.qrc └── widgets │ ├── ColorsBar.qml │ ├── previewer │ ├── AudioPreview.qml │ ├── CompressedPreview.qml │ ├── DefaultPreview.qml │ ├── DocumentPreview.qml │ ├── FilePreviewer.qml │ ├── FontPreviewer.qml │ ├── ImagePreview.qml │ ├── TextPreview.qml │ └── VideoPreview.qml │ └── views │ ├── Browser.qml │ ├── BrowserLayout.qml │ ├── BrowserView.qml │ ├── DisksSection.qml │ ├── FavoritesSection.qml │ ├── HomeView.qml │ ├── PlacesSection.qml │ ├── PlacesSideBar.qml │ ├── RecentSection.qml │ ├── SettingsDialog.qml │ ├── TagsSection.qml │ ├── Terminal.qml │ └── home │ ├── AudioCard.qml │ ├── Card.qml │ ├── ImageCard.qml │ ├── QuickCommonSection.qml │ └── SystemInfo.qml └── windows_files ├── README ├── config └── config.xml ├── index.ico └── packages └── org.maui.index └── meta ├── installscript.qs ├── license.txt └── package.xml /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # SPDX-FileCopyrightText: 2019 Christoph Cullmann 3 | # SPDX-FileCopyrightText: 2019 Gernot Gebhard 4 | # 5 | # SPDX-License-Identifier: MIT 6 | 7 | # Style for C++ 8 | Language: Cpp 9 | 10 | # base is WebKit coding style: https://webkit.org/code-style-guidelines/ 11 | # below are only things set that diverge from this style! 12 | BasedOnStyle: WebKit 13 | 14 | # enforce C++11 (e.g. for std::vector> 15 | Standard: Cpp11 16 | 17 | # 4 spaces indent 18 | TabWidth: 4 19 | 20 | # 2 * 80 wide lines 21 | ColumnLimit: 160 22 | 23 | # sort includes inside line separated groups 24 | SortIncludes: true 25 | 26 | # break before braces on function, namespace and class definitions. 27 | BreakBeforeBraces: Linux 28 | 29 | # CrlInstruction *a; 30 | PointerAlignment: Right 31 | 32 | # horizontally aligns arguments after an open bracket. 33 | AlignAfterOpenBracket: Align 34 | 35 | # don't move all parameters to new line 36 | AllowAllParametersOfDeclarationOnNextLine: false 37 | 38 | # no single line functions 39 | AllowShortFunctionsOnASingleLine: None 40 | 41 | # always break before you encounter multi line strings 42 | AlwaysBreakBeforeMultilineStrings: true 43 | 44 | # don't move arguments to own lines if they are not all on the same 45 | BinPackArguments: false 46 | 47 | # don't move parameters to own lines if they are not all on the same 48 | BinPackParameters: false 49 | 50 | # In case we have an if statement whith multiple lines the operator should be at the beginning of the line 51 | # but we do not want to break assignments 52 | BreakBeforeBinaryOperators: NonAssignment 53 | 54 | # format C++11 braced lists like function calls 55 | Cpp11BracedListStyle: true 56 | 57 | # do not put a space before C++11 braced lists 58 | SpaceBeforeCpp11BracedList: false 59 | 60 | # remove empty lines 61 | KeepEmptyLinesAtTheStartOfBlocks: false 62 | 63 | # no namespace indentation to keep indent level low 64 | NamespaceIndentation: None 65 | 66 | # we use template< without space. 67 | SpaceAfterTemplateKeyword: false 68 | 69 | # macros for which the opening brace stays attached. 70 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ] 71 | 72 | # keep lambda formatting multi-line if not empty 73 | AllowShortLambdasOnASingleLine: Empty 74 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 3rdparty/kirigami 2 | 3rdparty/breeze-icons 3 | 3rdparty/mauikit 4 | 3rdparty/QMLTermWidget 5 | .directory 6 | 7 | *.kdev4 8 | *.*~ 9 | *.travis* 10 | #~*.* 11 | #~.* 12 | *.DS_Store 13 | 14 | # C++ objects and libs 15 | *.slo 16 | *.lo 17 | *.o 18 | *.a 19 | *.la 20 | *.lai 21 | #*.so 22 | *.dll 23 | *.dylib 24 | 25 | # Qt-es 26 | object_script.*.Release 27 | object_script.*.Debug 28 | *_plugin_import.cpp 29 | /.qmake.cache 30 | /.qmake.stash 31 | *.pro.user 32 | *.pro.user.* 33 | *.qbs.user 34 | *.qbs.user.* 35 | *.moc 36 | moc_*.cpp 37 | moc_*.h 38 | qrc_*.cpp 39 | ui_*.h 40 | *.qmlc 41 | *.jsc 42 | Makefile* 43 | *build-* 44 | 45 | # Qt unit tests 46 | target_wrapper.* 47 | 48 | # QtCreator 49 | *.autosave 50 | 51 | # QtCreator Qml 52 | *.qmlproject.user 53 | *.qmlproject.user.* 54 | 55 | # QtCreator CMake 56 | CMakeLists.txt.user* 57 | 58 | # build folders and output 59 | build/ 60 | .vscode/ 61 | 62 | .idea/ 63 | -------------------------------------------------------------------------------- /.vscode/BuildRun.sh: -------------------------------------------------------------------------------- 1 | cd ../Maui/build 2 | #sudo rm -r * 3 | 4 | cmake -DCMAKE_INSTALL_PREFIX=/usr .. && make && make install 5 | 6 | cd ../../build/ 7 | cmake -DCMAKE_INSTALL_PREFIX=/usr .. && make && ./bin/index -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**", 7 | "/home/gabridc/Repositorio/KDE/mauikit/src/**", 8 | "/home/gabridc/Repositorio/KDE/mauikit/src/controls/**", 9 | "/home/gabridc/Repositorio/KDE/mauikit/src/controls/private/**", 10 | "/home/gabridc/Repositorio/KDE/karchive/src/**", 11 | "/home/gabridc/Qt/5.15.0/gcc_64/include/**" 12 | ], 13 | "defines": [], 14 | "compilerPath": "/usr/bin/gcc", 15 | "cStandard": "gnu18", 16 | "cppStandard": "gnu++14", 17 | "intelliSenseMode": "gcc-x64" 18 | } 19 | ], 20 | "version": 4 21 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "qobject": "cpp" 4 | } 5 | } -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | cmake_minimum_required(VERSION 3.14) 7 | 8 | set(INDEX_VERSION 1.2.1) 9 | 10 | set(CMAKE_CXX_STANDARD 17) 11 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 12 | 13 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 14 | 15 | set(CMAKE_AUTOUIC ON) 16 | set(CMAKE_AUTOMOC ON) 17 | set(CMAKE_AUTORCC ON) 18 | 19 | project(index VERSION ${INDEX_VERSION}) 20 | 21 | set(REQUIRED_QT_VERSION 5.14.0) 22 | set(REQUIRED_KF5_VERSION 5.78.0) 23 | 24 | find_package(ECM ${REQUIRED_KF5_VERSION} NO_MODULE) 25 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${ECM_MODULE_PATH}) 26 | 27 | option(EMBEDDED_TERMINAL "If set to true then tries to load the QmlTermWidget. v 0.1 is needed later version might not work" OFF) 28 | 29 | find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Qml Quick Sql Svg QuickControls2 Concurrent) 30 | find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED COMPONENTS I18n CoreAddons Archive) 31 | 32 | if(ANDROID) 33 | find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS AndroidExtras QuickControls2) 34 | message("CURRENT DIR" ${CMAKE_CURRENT_SOURCE_DIR}) 35 | set(ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android_files) 36 | set(ANDROID_ABIS "armeabi-v7a") 37 | else() 38 | find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED COMPONENTS Config KIO) 39 | endif() 40 | 41 | find_package(MauiKit REQUIRED) 42 | 43 | if(UNIX AND NOT APPLE AND NOT ANDROID) 44 | include(KDEInstallDirs) 45 | include(KDECMakeSettings) 46 | include(ECMInstallIcons) 47 | include(ECMAddAppIcon) 48 | endif() 49 | 50 | include(KDECompilerSettings NO_POLICY_SCOPE) 51 | include(KDEClangFormat) 52 | include(ECMSetupVersion) 53 | include(FeatureSummary) 54 | 55 | ecm_setup_version(${INDEX_VERSION} 56 | VARIABLE_PREFIX INDEX 57 | VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/index_version.h" 58 | ) 59 | 60 | add_subdirectory(src) 61 | 62 | if(UNIX AND NOT APPLE AND NOT ANDROID) 63 | install(FILES org.kde.index.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) 64 | endif() 65 | 66 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 67 | 68 | file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 69 | kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 70 | -------------------------------------------------------------------------------- /Messages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018-2020 Camilo Higuita 4 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 5 | # 6 | # SPDX-License-Identifier: GPL-3.0-or-later 7 | 8 | 9 | $XGETTEXT $(find src/ -name \*.cpp -o -name \*.h -o -name \*.qml) -o $podir/index-fm.pot 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Index 2 | Maui File manager 3 | 4 | Index is a file manager that works on desktops, Android and Plasma Mobile. 5 | Index lets you browse your system files and applications and preview your music, text, image and video files and share them with external applications. 6 | 7 | ## Prerequsites for developers 8 | ### Ubuntu 9 | 10 | **GCC and Build Essentials** 11 | ```shell 12 | sudo apt-get update 13 | sudo apt install build-essential libgl1-mesa-dev qtdeclarative5-dev libqt5svg5-dev \ qtquickcontols2-5-dev qt5-default 14 | sudo apt install cmake 15 | sudo apt install libkdecorations2-dev qml-module-qtquick-shapes 16 | ``` 17 | 18 | **Install extra-cmake-module >5.60** 19 | ```shell 20 | git clone https://anongit.kde.org/extra-cmake-modules 21 | mkdir build && cd build 22 | cmake -DCMAKE_INSTALL_PREFIX=/usr .. && make 23 | make install 24 | ``` 25 | 26 | **Install QT5 Libraries >5.10** 27 | Download and install QT binaries from Qt Open Source 28 | ``` 29 | https://www.qt.io/cs/c/?cta_guid=074ddad0-fdef-4e53-8aa8-5e8a876d6ab4&placement_guid=99d9dd4f-5681-48d2-b096-470725510d34&portal_id=149513&canon=https%3A%2F%2Fwww.qt.io%2Fdownload-open-source&redirect_url=APefjpHQjssyGwlBYE-rW_TcMDvQTTSN3igs_sES0bNmU4j3dNgz_g7U1gRD5rU9XP6QCagDltYNZe1mC_6yuR-J9-W2YmcKATNxGjM6fTT48JNue9VuRi4DK7LXluTHxwtZRv8NK3hLkSNlk4AKqcxomUJZqosxV3GK0cryzQm5xtWguoQg5Sg-E3LLyWQcat5flnqFkP-N5WbMKOQiHXZCCFTtzz-R5-48fCOn5EOIYCa4ePXGI-SHM-vf3KokrwZ_5LPenmO7pMJaXlm5vEoa1VyWrurg3A&click=f8615a00-0c1d-4cfe-8af2-2090813f25fa&hsutk=f0a10f80ae5765dd6d56a9d6725ee662&signature=AAH58kGBEuTlcag57Ka07aFLDeEt5qyytQ&pageId=12602948080&__hstc=152220518.f0a10f80ae5765dd6d56a9d6725ee662.1595615134675.1595615134675.1595615134675.1&__hssc=152220518.12.1595615134675&__hsfp=256125709&contentType=standard-page 30 | ``` 31 | 32 | Download and install QT binaries from Qt Open Source 33 | ``` 34 | TODO GABRIDC 35 | ``` 36 | ```shell 37 | sudo apt install libqt5svg5-dev && qtquickcontols2-5-dev && qt5-default 38 | ``` 39 | 40 | **Upgrade Qt libraries to 5.13** 41 | ```shell 42 | add source deb http://cz.archive.ubuntu.com/ubuntu groovy main universe 43 | sudo apt get update && upgrade 44 | ``` 45 | 46 | **Install KF5 Libraries** 47 | Download and install KF5 Attica 48 | ```shell 49 | Requirement: KDE Neon 5.19 50 | sudo apt install gettext 51 | sudo apt install libkf5attica-dev libkf5kio-dev libkf5notifications-dev libkf5coreaddons-dev libkf5activities-dev libkf5i18n-dev libkf5declarative-dev libkf5plasma-dev libkf5syntaxhighlighting-dev 52 | ``` 53 | 54 | **Download MAUI Kit** 55 | ```shell 56 | git clone https://invent.kde.org/maui/mauikit.git 57 | ``` 58 | 59 | ## Build 60 | 61 | We recommmend use KDE Neon for developing because KDE Neon has by default the latest version of Qt version supported in KDE Plasma. 62 | 63 | Index-FM use Qt version 5.14.2 so we need this version or higer installed on ower host. 64 | 65 | ### **KDE Neon >= 5.19.4** 66 | 67 | **Check libraries and other components** 68 | 69 | 1. Update the latest version of default OS libraries: **Open Discover and install all updates** 70 | 2. Check KDE Framework and Qt version installed: **Open System Settings > System Information** 71 | 72 | 73 | **GCC and Build Essentials** 74 | 75 | ```shell 76 | sudo apt-get update 77 | sudo apt install cmake git 78 | sudo apt install build-essential libgl1-mesa-dev qtdeclarative5-dev libqt5svg5-dev qtquickcontrols2-5-dev qt5-default libkdecorations2-dev qml-module-qtquick-shapes 79 | ``` 80 | 81 | **Install extra-cmake-module >5.60** 82 | ```shell 83 | cd 84 | git clone https://anongit.kde.org/extra-cmake-modules 85 | mkdir build && cd build 86 | cmake -DCMAKE_INSTALL_PREFIX=/usr .. && make 87 | make install 88 | ``` 89 | 90 | **Install KF5 Libraries** 91 | Download and install KF5 Attica 92 | ```shell 93 | sudo apt install gettext 94 | sudo apt install libkf5attica-dev libkf5kio-dev libkf5notifications-dev libkf5coreaddons-dev libkf5activities-dev libkf5i18n-dev libkf5declarative-dev libkf5plasma-dev libkf5syntaxhighlighting-dev 95 | ``` 96 | 97 | **Download and install MAUI KIT** 98 | 99 | ```shell 100 | cd 101 | git clone https://invent.kde.org/maui/mauikit.git 102 | git checkout origin/development 103 | cd mauikit && mkdir build && cd build 104 | cmake -DCMAKE_INSTALL_PREFIX=/usr .. && make 105 | sudo make install 106 | ``` 107 | 108 | ### **Other Host OS** 109 | 110 | **Install QT5 Libraries >5.10** 111 | Download and install QT binaries from Qt Open Source 112 | ``` 113 | https://www.qt.io/cs/c/?cta_guid=074ddad0-fdef-4e53-8aa8-5e8a876d6ab4&placement_guid=99d9dd4f-5681-48d2-b096-470725510d34&portal_id=149513&canon=https%3A%2F%2Fwww.qt.io%2Fdownload-open-source&redirect_url=APefjpHQjssyGwlBYE-rW_TcMDvQTTSN3igs_sES0bNmU4j3dNgz_g7U1gRD5rU9XP6QCagDltYNZe1mC_6yuR-J9-W2YmcKATNxGjM6fTT48JNue9VuRi4DK7LXluTHxwtZRv8NK3hLkSNlk4AKqcxomUJZqosxV3GK0cryzQm5xtWguoQg5Sg-E3LLyWQcat5flnqFkP-N5WbMKOQiHXZCCFTtzz-R5-48fCOn5EOIYCa4ePXGI-SHM-vf3KokrwZ_5LPenmO7pMJaXlm5vEoa1VyWrurg3A&click=f8615a00-0c1d-4cfe-8af2-2090813f25fa&hsutk=f0a10f80ae5765dd6d56a9d6725ee662&signature=AAH58kGBEuTlcag57Ka07aFLDeEt5qyytQ&pageId=12602948080&__hstc=152220518.f0a10f80ae5765dd6d56a9d6725ee662.1595615134675.1595615134675.1595615134675.1&__hssc=152220518.12.1595615134675&__hsfp=256125709&contentType=standard-page 114 | ``` 115 | 116 | 117 | # Build 118 | 119 | ### **Dependencies** 120 | 121 | #### Qt core deps: 122 | QT += qml, quick, sql 123 | 124 | #### KF5 deps: 125 | QT += KService KNotifications KI18n KIOCore KIOFileWidgets KIOWidgets KNTLM 126 | 127 | ### **Submodules** 128 | 129 | ### qmltermwidget: 130 | 131 | https://github.com/Swordfish90/qmltermwidget 132 | 133 | ```shell 134 | cmake .. -DCMAKE_INSTALL_PREFIX=/usr 135 | make 136 | sudo make install 137 | ``` 138 | ##### qmltermwidget: 139 | 140 | Before continue preparing your developer environment it is necesary preapare your Gitlab account for developer in your fork and update latest commits. 141 | 142 | 143 | ### Compilation 144 | 145 | ```shell 146 | cd 147 | git clone https://invent.kde.org//index-fm.git 148 | cd index-fm 149 | git config --global user.name "Your Invent KDE name" 150 | git config --global user.email "Your Invent KDE email" 151 | git remote add upstream https://invent.kde.org/maui/index-fm 152 | git pull upstream 153 | git checkout origin/development 154 | git pull --rebase upstream development 155 | ``` 156 | 157 | ### KDE Neon >=5.19.4 158 | 159 | After all the dependencies are met you can throw the following command lines to build Index and test it 160 | 161 | ```shell 162 | mkdir build && cd build 163 | 164 | cmake -DCMAKE_INSTALL_PREFIX=/usr .. && make 165 | ``` 166 | 167 | ### Other Host OS 168 | 169 | ```shell 170 | cmake .. -DCMAKE_INSTALL_INSTALL_PREFIX=/usr 171 | #-DQt5_DIR="/home//Qt//gcc_64/lib/cmake/Qt5/" -DMauiKit_DIR="/home/gabridc/Repositorio/KDE/mauikit/" 172 | 173 | cmake -DCMAKE_INSTALL_INSTALL_PREFIX=/usr -DQt5_DIR="/home//Qt//gcc_64/lib/cmake/Qt5/" -DMauiKit_DIR="/home/gabridc/Repositorio/KDE/mauikit/" .. 174 | 175 | make 176 | 177 | # you can now run index like this: 178 | ./bin/index 179 | 180 | # or install it on your system: 181 | sudo make install 182 | ``` 183 | 184 | A binary should be created and be ready to use. 185 | 186 | ## Contribute 187 | If you like the Maui project or Index and would like to get involve ther are several ways you can join us. 188 | - UI/UX design for desktop and mobile platforms 189 | - Plasma, KIO and Baloo integration 190 | - Deployment on other platforms like Mac OSX, IOS, Windows.. etc. 191 | - Work on data analysis and on the tagging system 192 | And also whatever else you would like to see on a convergent file manager. 193 | 194 | You can get in touch with me by opening an issue or email me: 195 | chiguitar@unal.edu.co 196 | 197 | 198 | ## Screenshots 199 | 200 | ![Preview](https://invent.kde.org/maui/index-fm/-/raw/v1.2/screenshots/Screenshot_1.png) 201 | 202 | ![Preview](https://invent.kde.org/maui/index-fm/-/raw/v1.2/screenshots/Screenshot_2.png) 203 | 204 | ![Preview](https://invent.kde.org/maui/index-fm/-/raw/v1.2/screenshots/Screenshot_3.png) 205 | 206 | ![Preview](https://invent.kde.org/maui/index-fm/-/raw/v1.2/screenshots/Screenshot_4.png) 207 | -------------------------------------------------------------------------------- /android_files/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /android_files/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.6.0' 9 | } 10 | } 11 | 12 | repositories { 13 | google() 14 | jcenter() 15 | } 16 | 17 | apply plugin: 'com.android.application' 18 | 19 | dependencies { 20 | implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) 21 | compile 'com.android.support:support-v4:25.3.1' 22 | } 23 | 24 | android { 25 | /******************************************************* 26 | * The following variables: 27 | * - androidBuildToolsVersion, 28 | * - androidCompileSdkVersion 29 | * - qt5AndroidDir - holds the path to qt android files 30 | * needed to build any Qt application 31 | * on Android. 32 | * 33 | * are defined in gradle.properties file. This file is 34 | * updated by QtCreator and androiddeployqt tools. 35 | * Changing them manually might break the compilation! 36 | *******************************************************/ 37 | 38 | compileSdkVersion androidCompileSdkVersion.toInteger() 39 | 40 | buildToolsVersion '28.0.3' 41 | 42 | sourceSets { 43 | main { 44 | manifest.srcFile 'AndroidManifest.xml' 45 | java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java'] 46 | aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl'] 47 | res.srcDirs = [qt5AndroidDir + '/res', 'res'] 48 | resources.srcDirs = ['resources'] 49 | renderscript.srcDirs = ['src'] 50 | assets.srcDirs = ['assets'] 51 | jniLibs.srcDirs = ['libs'] 52 | } 53 | } 54 | 55 | tasks.withType(JavaCompile) { 56 | options.incremental = true 57 | } 58 | 59 | compileOptions { 60 | sourceCompatibility JavaVersion.VERSION_1_8 61 | targetCompatibility JavaVersion.VERSION_1_8 62 | } 63 | 64 | lintOptions { 65 | abortOnError false 66 | } 67 | 68 | // Do not compress Qt binary resources file 69 | aaptOptions { 70 | noCompress 'rcc' 71 | } 72 | 73 | defaultConfig { 74 | resConfig "en" 75 | minSdkVersion = qtMinSdkVersion 76 | targetSdkVersion = qtTargetSdkVersion 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /android_files/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # For more details on how to configure your build environment visit 3 | # http://www.gradle.org/docs/current/userguide/build_environment.html 4 | # Specifies the JVM arguments used for the daemon process. 5 | # The setting is particularly useful for tweaking memory settings. 6 | org.gradle.jvmargs=-Xmx2048m 7 | 8 | # Gradle caching allows reusing the build artifacts from a previous 9 | # build with the same inputs. However, over time, the cache size will 10 | # grow. Uncomment the following line to enable it. 11 | #org.gradle.caching=true 12 | -------------------------------------------------------------------------------- /android_files/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/android_files/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android_files/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android_files/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /android_files/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /android_files/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/android_files/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /android_files/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/android_files/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /android_files/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/android_files/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /android_files/res/values/libs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://download.qt.io/ministro/android/qt5/qt-5.14 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /android_files/res/xml/filepaths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /ios_files/Info.plist: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | CFBundleDisplayName 14 | ${PRODUCT_NAME} 15 | CFBundleExecutable 16 | ${EXECUTABLE_NAME} 17 | CFBundleIconFile 18 | ${ASSETCATALOG_COMPILER_APPICON_NAME} 19 | CFBundleIdentifier 20 | ${PRODUCT_BUNDLE_IDENTIFIER} 21 | CFBundleName 22 | ${PRODUCT_NAME} 23 | CFBundlePackageType 24 | APPL 25 | CFBundleShortVersionString 26 | ${QMAKE_SHORT_VERSION} 27 | CFBundleSignature 28 | ${QMAKE_PKGINFO_TYPEINFO} 29 | CFBundleVersion 30 | ${QMAKE_FULL_VERSION} 31 | LSRequiresIPhoneOS 32 | 33 | MinimumOSVersion 34 | ${IPHONEOS_DEPLOYMENT_TARGET} 35 | NOTE 36 | This file was generated by Qt/QMake. 37 | UILaunchStoryboardName 38 | LaunchScreen 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/logo.png -------------------------------------------------------------------------------- /logo.png.license: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | -------------------------------------------------------------------------------- /macos_files/index.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/macos_files/index.icns -------------------------------------------------------------------------------- /org.kde.index.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.kde.index.desktop 4 | CC0-1.0 5 | LGPL-3.0 6 | Index 7 | Índex 8 | Índex 9 | Index 10 | Index 11 | Δείκτης 12 | Index 13 | Index 14 | Index 15 | Index 16 | Index 17 | निर्देशिका (Index) 18 | Index 19 | Index 20 | Index 21 | Index 22 | Index 23 | Index 24 | ਇੰਡੈਕਸ 25 | Índice 26 | Index 27 | Index 28 | Indeks 29 | Index 30 | Index 31 | xxIndexxx 32 | Manage your files 33 | Gestioneu els fitxers 34 | Gestioneu els fitxers 35 | Verwalten Sie Ihre Dateien 36 | Διαχειριστείτε τα αρχεία σας 37 | Manage your files 38 | Administre sus archivos 39 | Kudeatu zure fitxategiak 40 | Hallitse tiedostojasi 41 | Gérer vos fichiers 42 | फ़ाइलों का प्रबंधन करें 43 | Fájlkezelő 44 | elola file-filemu 45 | Gestisci i tuoi file 46 | 내 파일 관리 47 | Uw bestanden beheren 48 | Handsam filene dine 49 | ਆਪਣੀਆਂ ਫਾਇਲਾਂ ਦਾ ਇੰਤਜ਼ਾਮ ਕਰੋ 50 | Faça a gestão dos seus ficheiros 51 | Gestionați-vă fișierele 52 | Spravovať vaše súbory 53 | Upravljanje vaših datotek 54 | Hantera dina filer 55 | Керування вашими файлами 56 | xxManage your filesxx 57 | 58 |

Index allows you to navigate your computer and preview multimedia files.

59 |

L'Índex permet navegar per l'ordinador i previsualitzar fitxers multimèdia.

60 |

L'Índex permet navegar per l'ordinador i previsualitzar fitxers multimèdia.

61 |

Το Index σάς επιτρέπει να πλοηγηθείτε στον υπολογιστή σας και να κάνετε προεπισκόπηση των αρχείων σας με τα πολυμέσα.

62 |

Index allows you to navigate your computer and preview multimedia files.

63 |

Index le permite navegar por su equipo y previsualizar archivos multimedia.

64 |

Index-ek zure ordenagailuan nabigatzen eta multimedia fitxategiak aurreikusten uzten dizu.

65 |

Indexillä voi tarkastella koneen talletustilaa ja esikatsella multimediatiedostoja.

66 |

Index vous permet de naviguer dans les fichiers de votre ordinateurs et d'avoir un aperçu des fichiers multimédia.

67 |

निर्देशिका (Index) आपको अपने कंप्यूटर पर मल़टीमिडिया फाइल संचालन व देखने देता है

68 |

Az Index lehetővé teszi a számítógépe böngészését, és a multimédiás fájlok előnézetének megtekintését.

69 |

Index memungkinkan kamu untuk menavigasi pratinjau file-file multimedia dan komputermu.

70 |

Index ti consente di navigare il tuo computer e offre un'anteprima dei file multimediali.

71 |

Index 파일 관리자로 컴퓨터를 탐색하고 멀티미디어 파일을 미리 볼 수 있습니다.

72 |

Index biedt u het navigeren in uw computer en multimediabestanden te bekijken.

73 |

Index lèt deg bla gjennom filer på maskina og førehandsvisa multimediefiler.

74 |

ਇੰਡੈਕਸ ਤੁਹਾਨੂੰ ਤੁਹਾਡੇ ਕੰਪਿਊਟਰ ਨੂੰ ਫੋਲਣ ਤੇ ਮਲਟੀਮੀਡੀਆ ਫਾਇਲਾਂ ਦੀ ਝਲਕ ਵੇਖਣ ਲਈ ਮਦਦਗਾਰ ਹੈ।

75 |

O Índice permite-lhe navegar pelo seu computador e antever os ficheiros multimédia.

76 |

Index vă permite să răsfoiți calculatorul și să previzualizați fișiere multimedia.

77 |

Index vám umožní prechádzať váš počítač a prehliadať multimediálne súbory.

78 |

Kazalo omogoča krmarjenje po računalniku in predogled večpredstavnostnih datotek.

79 |

Index låter dig navigera på datorn och förhandsgranska multimediafiler.

80 |

За допомогою Index ви зможете здійснювати навігацію файловою системою вашого комп'ютера і попереднього переглядати файли мультимедійних даних.

81 |

xxIndex allows you to navigate your computer and preview multimedia files.xx

82 |
83 | https://mauikit.org/ 84 | https://invent.kde.org/maui/index-fm/-/issues 85 | https://www.kde.org/community/donations 86 | 87 | 88 | Index file manager 89 | Gestor de fitxers Índex 90 | Gestor de fitxers Índex 91 | Správce souborů indexů 92 | Index-Dateiverwaltung 93 | Index διαχειριστής αρχείων 94 | Index file manager 95 | Administrador de archivos Index 96 | Index fitxategi-kudeatzailea 97 | Index-tiedostonhallinta 98 | Gestionnaire de fichiers Index 99 | निर्देशिका (Index) फ़ाइल प्रबंधक 100 | Index fájlkezelő 101 | Pengelola file indeks 102 | Gestore dei file Index 103 | Index 파일 관리자 104 | Indexbestandsbeheerder 105 | Index filhandsamar 106 | ਇੰਡੈਕਸ ਫਾਇਲ ਮੈਨੇਜਰ 107 | Gestor de ficheiros Índice 108 | Gestionarul de fișiere Index 109 | Správca súborov Index 110 | Upravljalnik indeksa datotek 111 | Index filhanterare 112 | Програма для керування файлами Index 113 | xxIndex file managerxx 114 | 115 | https://invent.kde.org/websites/product-screenshots/-/raw/master/index/index.png 116 | 117 | 118 | 119 | 120 | index 121 | 122 | KDE 123 | 124 | 125 | 126 |
127 | -------------------------------------------------------------------------------- /screenshots/Screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/screenshots/Screenshot_1.png -------------------------------------------------------------------------------- /screenshots/Screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/screenshots/Screenshot_2.png -------------------------------------------------------------------------------- /screenshots/Screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/screenshots/Screenshot_3.png -------------------------------------------------------------------------------- /screenshots/Screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/screenshots/Screenshot_4.png -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | set(index_SRCS 7 | main.cpp 8 | index.cpp 9 | controllers/filepreviewer.cpp 10 | controllers/compressedfile.cpp 11 | controllers/dirinfo.cpp 12 | models/recentfilesmodel.cpp 13 | index_assets.qrc 14 | qml.qrc 15 | ) 16 | 17 | if(ANDROID) 18 | add_library(index SHARED ${index_SRCS}) 19 | else() 20 | add_executable(index ${index_SRCS}) 21 | endif() 22 | 23 | if(EMBEDDED_TERMINAL) 24 | target_compile_definitions(index PUBLIC EMBEDDED_TERMINAL) 25 | endif() 26 | 27 | if (ANDROID) 28 | target_link_libraries(index Qt5::AndroidExtras Qt5::QuickControls2) 29 | kde_source_files_enable_exceptions(index index.cpp) 30 | elseif(UNIX) 31 | target_link_libraries(index KF5::ConfigCore KF5::KIOCore KF5::KIOFileWidgets KF5::KIONTLM KF5::KIOWidgets) 32 | endif() 33 | 34 | target_compile_definitions(index 35 | PRIVATE $<$,$>:QT_QML_DEBUG>) 36 | 37 | target_link_libraries(index MauiKit Qt5::Sql Qt5::Quick Qt5::Qml Qt5::Svg KF5::Archive KF5::CoreAddons KF5::I18n) 38 | 39 | #TODO: port to ecm_install_icons() 40 | if(UNIX AND NOT APPLE AND NOT ANDROID) 41 | install(TARGETS index ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) 42 | install(FILES org.kde.index.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) 43 | 44 | install(FILES assets/index.svg DESTINATION ${KDE_INSTALL_ICONDIR}/hicolor/scalable/apps) 45 | endif() 46 | 47 | -------------------------------------------------------------------------------- /src/assets/application-x-zerosize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/src/assets/application-x-zerosize.png -------------------------------------------------------------------------------- /src/assets/application-x-zerosize.png.license: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | -------------------------------------------------------------------------------- /src/assets/application-x-zerosize.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 43 | 47 | 52 | 57 | 62 | 67 | 72 | 77 | 82 | 87 | 88 | 90 | 91 | 93 | image/svg+xml 94 | 96 | 97 | 98 | 99 | 100 | 105 | 189 | 197 | 205 | 206 | 207 | -------------------------------------------------------------------------------- /src/assets/application-x-zerosize.svg.license: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | -------------------------------------------------------------------------------- /src/assets/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/src/assets/index.png -------------------------------------------------------------------------------- /src/assets/index.png.license: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | -------------------------------------------------------------------------------- /src/assets/index.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 44 | 47 | 51 | 55 | 59 | 63 | 67 | 71 | 75 | 79 | 80 | 82 | 83 | 85 | image/svg+xml 86 | 88 | 89 | 90 | 91 | 92 | 97 | 195 | 201 | 207 | 213 | 219 | 225 | 231 | 237 | 243 | 249 | 250 | 251 | -------------------------------------------------------------------------------- /src/assets/index.svg.license: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | -------------------------------------------------------------------------------- /src/assets/index48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/src/assets/index48.png -------------------------------------------------------------------------------- /src/assets/index48.png.license: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | -------------------------------------------------------------------------------- /src/assets/index72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/src/assets/index72.png -------------------------------------------------------------------------------- /src/assets/index72.png.license: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | -------------------------------------------------------------------------------- /src/assets/index96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/src/assets/index96.png -------------------------------------------------------------------------------- /src/assets/index96.png.license: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | -------------------------------------------------------------------------------- /src/controllers/compressedfile.h: -------------------------------------------------------------------------------- 1 | #ifndef COMPRESSEDFILE_H 2 | #define COMPRESSEDFILE_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | class KArchive; 10 | class CompressedFileModel : public MauiList 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit CompressedFileModel(QObject *parent); 15 | const FMH::MODEL_LIST &items() const override final; 16 | 17 | void setUrl(const QUrl &url); 18 | 19 | private: 20 | FMH::MODEL_LIST m_list; 21 | }; 22 | 23 | class CompressedFile : public QObject 24 | { 25 | Q_OBJECT 26 | Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) 27 | Q_PROPERTY(CompressedFileModel *model READ model CONSTANT FINAL) 28 | 29 | public: 30 | explicit CompressedFile(QObject *parent = nullptr); 31 | static KArchive *getKArchiveObject(const QUrl &url); 32 | 33 | void setUrl(const QUrl &url); 34 | QUrl url() const; 35 | 36 | CompressedFileModel *model() const; 37 | 38 | private: 39 | QUrl m_url; 40 | CompressedFileModel *m_model; 41 | 42 | public slots: 43 | void extract(const QUrl &where, const QString &directory = QString()); 44 | bool compress(const QVariantList &files, const QUrl &where, const QString &fileName, const int &compressTypeSelected); 45 | 46 | signals: 47 | void urlChanged(); 48 | }; 49 | 50 | #endif // COMPRESSEDFILE_H 51 | -------------------------------------------------------------------------------- /src/controllers/dirinfo.cpp: -------------------------------------------------------------------------------- 1 | #include "dirinfo.h" 2 | 3 | #if defined Q_OS_LINUX && !defined Q_OS_ANDROID 4 | #include 5 | #include 6 | #endif 7 | 8 | #include 9 | #include 10 | 11 | DirInfo::DirInfo(QObject *parent) : QObject(parent) 12 | { 13 | #if defined Q_OS_LINUX && !defined Q_OS_ANDROID 14 | auto m_free = KIO::fileSystemFreeSpace (QUrl("file:///")); 15 | connect(m_free, &KIO::FileSystemFreeSpaceJob::result, [this, m_free](KJob *, KIO::filesize_t size, KIO::filesize_t available) 16 | { 17 | qDebug() << "got dir size info FREEE" << size << available; 18 | 19 | m_totalSpace = size; 20 | m_avaliableSpace = available; 21 | 22 | emit this->avaliableSpaceChanged(m_avaliableSpace); 23 | emit this->totalSpaceChanged(m_totalSpace); 24 | 25 | m_free->deleteLater(); 26 | 27 | }); 28 | #endif 29 | } 30 | 31 | QUrl DirInfo::url() const 32 | { 33 | return m_url; 34 | } 35 | 36 | quint64 DirInfo::size() const 37 | { 38 | return m_size; 39 | } 40 | 41 | quint64 DirInfo::dirCount() const 42 | { 43 | return m_dirCount; 44 | } 45 | 46 | quint64 DirInfo::filesCount() const 47 | { 48 | return m_filesCount; 49 | } 50 | 51 | QString DirInfo::sizeString() const 52 | { 53 | QLocale m_locale; 54 | return m_locale.formattedDataSize(m_size); 55 | } 56 | 57 | quint64 DirInfo::avaliableSpace() const 58 | { 59 | return m_avaliableSpace; 60 | } 61 | 62 | quint64 DirInfo::totalSpace() const 63 | { 64 | return m_totalSpace; 65 | } 66 | 67 | QString DirInfo::avaliableSpaceString() const 68 | { 69 | QLocale m_locale; 70 | return m_locale.formattedDataSize(m_avaliableSpace); 71 | } 72 | 73 | QString DirInfo::totalSpaceString() const 74 | { 75 | QLocale m_locale; 76 | return m_locale.formattedDataSize(m_totalSpace); 77 | } 78 | 79 | void DirInfo::setUrl(QUrl url) 80 | { 81 | if (m_url == url) 82 | return; 83 | 84 | m_url = url; 85 | this->getSize(); 86 | emit urlChanged(m_url); 87 | } 88 | 89 | void DirInfo::getSize() 90 | { 91 | if(!m_url.isValid() || m_url.isEmpty() || !m_url.isLocalFile()) 92 | return; 93 | qDebug() << "Askign for dir size" << m_url; 94 | 95 | #if defined Q_OS_LINUX && !defined Q_OS_ANDROID 96 | auto m_job = KIO::directorySize(m_url); 97 | 98 | // connect(m_job, &KIO::DirectorySizeJob::percent, [this, m_job](KJob *, unsigned long percent) 99 | // { 100 | // qDebug() << "got dir size info percent" << percent; 101 | // }); 102 | 103 | connect(m_job, &KIO::DirectorySizeJob::processedSize, [this, m_job](KJob *, qulonglong size) 104 | { 105 | qDebug() << "got dir size info processed size" << size; 106 | }); 107 | 108 | connect(m_job, &KIO::DirectorySizeJob::result, [this, m_job](KJob *) 109 | { 110 | qDebug() << "got dir size info" << m_job->totalSize(); 111 | m_size = m_job->totalSize(); 112 | m_filesCount = m_job->totalFiles(); 113 | m_dirCount = m_job->totalSubdirs(); 114 | 115 | emit this->sizeChanged(m_size); 116 | emit this->filesCountChanged(m_filesCount); 117 | emit this->dirsCountChanged(m_dirCount); 118 | 119 | m_job->deleteLater(); 120 | }); 121 | #endif 122 | } 123 | 124 | -------------------------------------------------------------------------------- /src/controllers/dirinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef DIRINFO_H 2 | #define DIRINFO_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class DirInfo : public QObject 9 | { 10 | // Q_INTERFACES(QQmlParserStatus) 11 | 12 | Q_OBJECT 13 | Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) 14 | Q_PROPERTY(quint64 size READ size NOTIFY sizeChanged CONSTANT) 15 | Q_PROPERTY(QString sizeString READ sizeString NOTIFY sizeChanged CONSTANT) 16 | 17 | Q_PROPERTY(quint64 filesCount READ filesCount NOTIFY filesCountChanged CONSTANT) 18 | Q_PROPERTY(quint64 dirCount READ dirCount NOTIFY dirsCountChanged CONSTANT) 19 | 20 | Q_PROPERTY(quint64 avaliableSpace READ avaliableSpace NOTIFY avaliableSpaceChanged CONSTANT) 21 | Q_PROPERTY(quint64 totalSpace READ totalSpace NOTIFY totalSpaceChanged CONSTANT) 22 | 23 | Q_PROPERTY(QString avaliableSpaceString READ avaliableSpaceString NOTIFY avaliableSpaceChanged CONSTANT) 24 | Q_PROPERTY(QString totalSpaceString READ totalSpaceString NOTIFY totalSpaceChanged CONSTANT) 25 | 26 | public: 27 | explicit DirInfo(QObject *parent = nullptr); 28 | 29 | QUrl url() const; 30 | 31 | quint64 size() const; 32 | 33 | quint64 dirCount() const; 34 | 35 | quint64 filesCount() const; 36 | 37 | QString sizeString() const; 38 | 39 | quint64 avaliableSpace() const; 40 | 41 | quint64 totalSpace() const; 42 | 43 | QString avaliableSpaceString() const; 44 | 45 | QString totalSpaceString() const; 46 | 47 | public slots: 48 | void setUrl(QUrl url); 49 | 50 | private: 51 | void getSize(); 52 | 53 | QUrl m_url; 54 | quint64 m_size = 0; 55 | quint64 m_filesCount = 0; 56 | quint64 m_dirCount = 0; 57 | 58 | quint64 m_avaliableSpace = 0; 59 | 60 | quint64 m_totalSpace = 0; 61 | 62 | signals: 63 | void urlChanged(QUrl url); 64 | void sizeChanged(quint64 size); 65 | void dirsCountChanged(quint64 dirCount); 66 | void filesCountChanged(quint64 filesCount); 67 | 68 | void avaliableSpaceChanged(quint64 avaliableSpace); 69 | void totalSpaceChanged(quint64 totalSpace); 70 | }; 71 | 72 | #endif // DIRINFO_H 73 | -------------------------------------------------------------------------------- /src/controllers/filepreviewer.cpp: -------------------------------------------------------------------------------- 1 | #include "filepreviewer.h" 2 | 3 | FilePreviewer::FilePreviewer(QObject *parent) 4 | : QObject(parent) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /src/controllers/filepreviewer.h: -------------------------------------------------------------------------------- 1 | #ifndef FILEPREVIEWER_H 2 | #define FILEPREVIEWER_H 3 | 4 | #include 5 | 6 | class FilePreviewer : public QObject 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit FilePreviewer(QObject *parent = nullptr); 11 | 12 | signals: 13 | }; 14 | 15 | #endif // FILEPREVIEWER_H 16 | -------------------------------------------------------------------------------- /src/index.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | #include "index.h" 7 | 8 | #if defined Q_OS_LINUX && !defined Q_OS_ANDROID 9 | #include "ktoolinvocation.h" 10 | #endif 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | Index::Index(QObject *parent) 20 | : QObject(parent) 21 | { 22 | } 23 | 24 | /* to be called to launch index with opening different paths */ 25 | void Index::openPaths(const QStringList &paths) 26 | { 27 | emit this->openPath(std::accumulate(paths.constBegin(), paths.constEnd(), QStringList(), [](QStringList &list, const QString &path) -> QStringList { 28 | const auto url = QUrl::fromUserInput(path); 29 | if (url.isLocalFile()) { 30 | const QFileInfo file(url.toLocalFile()); 31 | if (file.isDir()) 32 | list << url.toString(); 33 | else 34 | list << QUrl::fromLocalFile(file.dir().absolutePath()).toString(); 35 | } else 36 | list << url.toString(); 37 | 38 | return list; 39 | })); 40 | } 41 | 42 | void Index::openTerminal(const QUrl &url) 43 | { 44 | #if defined Q_OS_LINUX && !defined Q_OS_ANDROID 45 | if (url.isLocalFile()) { 46 | KToolInvocation::invokeTerminal(QString(), url.toLocalFile()); 47 | return; 48 | } 49 | 50 | // Nothing worked, just use $HOME 51 | KToolInvocation::invokeTerminal(QString(), QDir::homePath()); 52 | #else 53 | Q_UNUSED(url) 54 | #endif 55 | } 56 | 57 | QUrl Index::cameraPath() 58 | { 59 | const static auto paths = QStringList{FMH::HomePath + "/DCIM/Camera", FMH::HomePath + "/Camera"}; 60 | 61 | for (const auto &path : paths) { 62 | if (FMH::fileExists(path)) 63 | return QUrl(path); 64 | } 65 | 66 | return QUrl(); 67 | } 68 | 69 | QUrl Index::screenshotsPath() 70 | { 71 | const static auto paths = QStringList{FMH::HomePath + "/DCIM/Screenshots", FMH::HomePath + "/Screenshots"}; 72 | 73 | for (const auto &path : paths) { 74 | if (FMH::fileExists(path)) 75 | return QUrl(path); 76 | } 77 | 78 | return QUrl(); 79 | } 80 | -------------------------------------------------------------------------------- /src/index.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | #ifndef INDEX_H 7 | #define INDEX_H 8 | 9 | #include 10 | #include 11 | 12 | class Index : public QObject 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit Index(QObject *parent = nullptr); 17 | 18 | Q_INVOKABLE void openPaths(const QStringList &paths); 19 | 20 | signals: 21 | void openPath(QStringList paths); 22 | 23 | public slots: 24 | bool supportsEmbededTerminal() 25 | { 26 | #ifdef EMBEDDED_TERMINAL 27 | return true; 28 | #else 29 | return false; 30 | #endif 31 | } 32 | 33 | static QUrl cameraPath(); 34 | static QUrl screenshotsPath(); 35 | 36 | public slots: 37 | 38 | /** 39 | * @brief openTerminal 40 | * Open Terminal Windows 41 | * @param url 42 | * Path in which terminal should open 43 | */ 44 | static void openTerminal(const QUrl &url); 45 | }; 46 | 47 | 48 | #endif // INDEX_H 49 | -------------------------------------------------------------------------------- /src/index_assets.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | assets/index.svg 4 | widgets/views/BrowserView.qml 5 | widgets/views/HomeView.qml 6 | widgets/views/FavoritesSection.qml 7 | widgets/views/TagsSection.qml 8 | widgets/views/PlacesSection.qml 9 | widgets/views/RecentSection.qml 10 | widgets/views/DisksSection.qml 11 | widgets/views/home/AudioCard.qml 12 | widgets/views/home/Card.qml 13 | widgets/views/home/ImageCard.qml 14 | widgets/views/home/QuickCommonSection.qml 15 | widgets/views/home/SystemInfo.qml 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | #include "index.h" 13 | 14 | #ifdef Q_OS_ANDROID 15 | #include "mauiandroid.h" 16 | #include 17 | #else 18 | #include 19 | #endif 20 | 21 | #ifdef Q_OS_MACOS 22 | #include "mauimacos.h" 23 | #endif 24 | 25 | #include 26 | 27 | #if defined Q_OS_MACOS || defined Q_OS_WIN 28 | #include 29 | #else 30 | #include 31 | #endif 32 | 33 | #include "../index_version.h" 34 | 35 | #include "controllers/compressedfile.h" 36 | #include "controllers/filepreviewer.h" 37 | #include "controllers/dirinfo.h" 38 | 39 | #include "models/recentfilesmodel.h" 40 | 41 | #define INDEX_URI "org.maui.index" 42 | 43 | Q_DECL_EXPORT int main(int argc, char *argv[]) 44 | { 45 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 46 | QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); 47 | QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); 48 | QCoreApplication::setAttribute(Qt::AA_DisableSessionManager, true); 49 | 50 | #ifdef Q_OS_WIN32 51 | qputenv("QT_MULTIMEDIA_PREFERRED_PLUGINS", "w"); 52 | #endif 53 | 54 | #ifdef Q_OS_ANDROID 55 | QGuiApplication app(argc, argv); 56 | if (!MAUIAndroid::checkRunTimePermissions({"android.permission.WRITE_EXTERNAL_STORAGE"})) 57 | return -1; 58 | #else 59 | QApplication app(argc, argv); 60 | #endif 61 | 62 | app.setOrganizationName(QStringLiteral("Maui")); 63 | app.setWindowIcon(QIcon(":/index.png")); 64 | MauiApp::instance()->setHandleAccounts(false); // for now index can not handle cloud accounts 65 | MauiApp::instance()->setIconName("qrc:/assets/index.svg"); 66 | 67 | KLocalizedString::setApplicationDomain("index"); 68 | 69 | KAboutData about(QStringLiteral("index"), i18n("Index"), INDEX_VERSION_STRING, i18n("Index allows you to navigate your computer and preview multimedia files."), 70 | KAboutLicense::LGPL_V3, i18n("© 2019-%1 Nitrux Development Team", QString::number(QDate::currentDate().year()))); 71 | 72 | about.addAuthor(i18n("Camilo Higuita"), i18n("Developer"), QStringLiteral("milo.h@aol.com")); 73 | about.addAuthor(i18n("Gabriel Dominguez"), i18n("Developer"), QStringLiteral("gabriel@gabrieldominguez.es")); 74 | about.setHomepage("https://mauikit.org"); 75 | about.setProductName("maui/index"); 76 | about.setBugAddress("https://invent.kde.org/maui/index-fm/-/issues"); 77 | about.setOrganizationDomain(INDEX_URI); 78 | about.setProgramLogo(app.windowIcon()); 79 | 80 | KAboutData::setApplicationData(about); 81 | 82 | QCommandLineParser parser; 83 | parser.process(app); 84 | 85 | about.setupCommandLine(&parser); 86 | about.processCommandLine(&parser); 87 | 88 | const QStringList args = parser.positionalArguments(); 89 | QStringList paths; 90 | 91 | if (!args.isEmpty()) 92 | paths = args; 93 | 94 | Index index; 95 | QQmlApplicationEngine engine; 96 | const QUrl url(QStringLiteral("qrc:/main.qml")); 97 | QObject::connect( 98 | &engine, 99 | &QQmlApplicationEngine::objectCreated, 100 | &app, 101 | [url, paths, &index](QObject *obj, const QUrl &objUrl) { 102 | if (!obj && url == objUrl) 103 | QCoreApplication::exit(-1); 104 | 105 | if (!paths.isEmpty()) 106 | index.openPaths(paths); 107 | }, 108 | Qt::QueuedConnection); 109 | 110 | engine.rootContext()->setContextProperty("inx", &index); 111 | qmlRegisterType(INDEX_URI, 1, 0, "CompressedFile"); 112 | qmlRegisterType(INDEX_URI, 1, 0, "FilePreviewProvider"); 113 | qmlRegisterType(INDEX_URI, 1, 0, "RecentFiles"); 114 | qmlRegisterType(INDEX_URI, 1, 0, "DirInfo"); 115 | 116 | engine.load(url); 117 | 118 | #ifdef Q_OS_MACOS 119 | // MAUIMacOS::removeTitlebarFromWindow(); 120 | // MauiApp::instance()->setEnableCSD(true); //for now index can not handle cloud accounts 121 | #endif 122 | return app.exec(); 123 | } 124 | -------------------------------------------------------------------------------- /src/main.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | import QtQuick 2.13 7 | import QtQuick.Controls 2.13 8 | import QtQuick.Layouts 1.3 9 | 10 | import Qt.labs.settings 1.0 11 | import QtQml.Models 2.3 12 | 13 | import org.kde.kirigami 2.14 as Kirigami 14 | import org.kde.mauikit 1.3 as Maui 15 | 16 | import org.maui.index 1.0 as Index 17 | 18 | import "widgets" 19 | import "widgets/views" 20 | import "widgets/previewer" 21 | 22 | Maui.ApplicationWindow 23 | { 24 | id: root 25 | title: currentTab ? currentTab.title : "" 26 | altHeader: Kirigami.Settings.isMobile 27 | 28 | readonly property url currentPath : currentBrowser ? currentBrowser.currentPath : "" 29 | readonly property Maui.FileBrowser currentBrowser : currentTab && currentTab.browser ? currentTab.browser : null 30 | 31 | property alias dialog : dialogLoader.item 32 | property alias selectionBar : _browserView.selectionBar 33 | property alias openWithDialog : _openWithDialog 34 | property alias tagsDialog : _tagsDialog 35 | property alias currentTabIndex : _browserView.currentTabIndex 36 | property alias currentTab : _browserView.currentTab 37 | property alias viewTypeGroup : _browserView.viewTypeGroup 38 | property alias appSettings : settings 39 | 40 | property bool selectionMode: false 41 | 42 | Settings 43 | { 44 | id: settings 45 | category: "Browser" 46 | property bool showHiddenFiles: false 47 | property bool showThumbnails: true 48 | property bool singleClick : Kirigami.Settings.isMobile ? true : Maui.Handy.singleClick 49 | property bool previewFiles : Kirigami.Settings.isMobile 50 | property bool restoreSession: false 51 | property bool supportSplit : !Kirigami.Settings.isMobile 52 | property bool overview : false 53 | 54 | property int viewType : Maui.FMList.LIST_VIEW 55 | property int listSize : 0 // s-m-x-xl 56 | property int gridSize : 1 // s-m-x-xl 57 | 58 | property var lastSession : [[({'path': Maui.FM.homePath(), 'viewType': 1})]] 59 | property int lastTabIndex : 0 60 | } 61 | 62 | Settings 63 | { 64 | id: sortSettings 65 | category: "Sorting" 66 | property bool foldersFirst: true 67 | property int sortBy: Maui.FMList.MODIFIED 68 | property int sortOrder : Qt.AscendingOrder 69 | property bool group : false 70 | property bool globalSorting: Kirigami.Settings.isMobile 71 | } 72 | 73 | onCurrentPathChanged: 74 | { 75 | syncSidebar(currentBrowser.currentPath) 76 | } 77 | 78 | onClosing: 79 | { 80 | close.accepted = !settings.restoreSession 81 | var tabs = [] 82 | 83 | for(var i = 0; i 3 | #include 4 | 5 | RecentFilesModel::RecentFilesModel(QObject *parent) : 6 | MauiList(parent) 7 | , m_loader(new FMH::FileLoader) 8 | , m_watcher(new QFileSystemWatcher(this)) 9 | { 10 | // connect(m_loader, &FMH::FileLoader::itemsReady, [&](FMH::MODEL_LIST items) 11 | // { 12 | // emit preItemsAppended(items.size()); 13 | // this->m_list << items; 14 | // emit postItemAppended(); 15 | // }); 16 | 17 | connect(m_watcher, &QFileSystemWatcher::directoryChanged, this, &RecentFilesModel::setList); 18 | } 19 | 20 | 21 | const FMH::MODEL_LIST &RecentFilesModel::items() const 22 | { 23 | return m_list; 24 | } 25 | 26 | QUrl RecentFilesModel::url() const 27 | { 28 | return m_url; 29 | } 30 | 31 | void RecentFilesModel::setUrl(QUrl url) 32 | { 33 | if (m_url == url) 34 | return; 35 | 36 | m_url = url; 37 | m_watcher->removePaths(m_watcher->directories()); 38 | m_watcher->addPath(m_url.toLocalFile()); 39 | emit urlChanged(m_url); 40 | } 41 | 42 | void RecentFilesModel::setFilters(QStringList filters) 43 | { 44 | if (m_filters == filters) 45 | return; 46 | 47 | m_filters = filters; 48 | emit filtersChanged(m_filters); 49 | } 50 | 51 | void RecentFilesModel::setList() 52 | { 53 | if (!m_url.isLocalFile () || !m_url.isValid () || m_url.isEmpty ()) 54 | return; 55 | 56 | // m_loader->informer = &FMH::getFileInfoModel; 57 | // m_loader->requestPath({m_url}, true, m_filters.isEmpty () ? QStringList () : m_filters, QDir::Files, 50); 58 | 59 | QDir dir(m_url.toLocalFile ()); 60 | dir.setNameFilters (m_filters); 61 | dir.setFilter (QDir::Files); 62 | dir.setSorting (QDir::Time); 63 | int i = 0; 64 | 65 | this->m_list.clear(); 66 | emit this->preListChanged (); 67 | for(const auto &url : dir.entryInfoList ()) 68 | { 69 | if(i >= 6) 70 | break; 71 | qDebug() << "RECENT:" << url.filePath () << dir.path (); 72 | m_urls << QUrl::fromLocalFile (url.filePath ()).toString(); 73 | m_list << FMH::getFileInfoModel (QUrl::fromLocalFile (url.filePath ())); 74 | i++; 75 | } 76 | emit postListChanged (); 77 | emit urlsChanged(); 78 | } 79 | 80 | 81 | void RecentFilesModel::componentComplete() 82 | { 83 | connect(this, &RecentFilesModel::urlChanged, this, &RecentFilesModel::setList); 84 | connect(this, &RecentFilesModel::filtersChanged, this, &RecentFilesModel::setList); 85 | setList (); 86 | } 87 | 88 | QStringList RecentFilesModel::urls() const 89 | { 90 | return m_urls; 91 | } 92 | 93 | QStringList RecentFilesModel::filters() const 94 | { 95 | return m_filters; 96 | } 97 | -------------------------------------------------------------------------------- /src/models/recentfilesmodel.h: -------------------------------------------------------------------------------- 1 | #ifndef RECENTFILESMODEL_H 2 | #define RECENTFILESMODEL_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | class QFileSystemWatcher; 9 | namespace FMH 10 | { 11 | class FileLoader; 12 | } 13 | 14 | class RecentFilesModel : public MauiList 15 | { 16 | Q_OBJECT 17 | Q_PROPERTY(QUrl url WRITE setUrl READ url NOTIFY urlChanged) 18 | Q_PROPERTY(QStringList filters WRITE setFilters READ filters NOTIFY filtersChanged) 19 | Q_PROPERTY(QStringList urls READ urls NOTIFY urlsChanged CONSTANT) 20 | 21 | public: 22 | RecentFilesModel(QObject * parent = nullptr); 23 | 24 | const FMH::MODEL_LIST &items() const override final; 25 | 26 | QUrl url() const; 27 | QStringList filters() const; 28 | 29 | void componentComplete() override final; 30 | 31 | QStringList urls() const; 32 | 33 | public slots: 34 | void setUrl(QUrl url); 35 | 36 | void setFilters(QStringList filters); 37 | 38 | signals: 39 | void urlChanged(QUrl url); 40 | 41 | void filtersChanged(QStringList filters); 42 | 43 | void urlsChanged(); 44 | 45 | private: 46 | FMH::MODEL_LIST m_list; 47 | FMH::FileLoader * m_loader; 48 | QFileSystemWatcher *m_watcher; 49 | void setList(); 50 | 51 | QUrl m_url; 52 | QStringList m_filters; 53 | QStringList m_urls; 54 | }; 55 | 56 | #endif // RECENTFILESMODEL_H 57 | -------------------------------------------------------------------------------- /src/org.kde.index.desktop: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 Camilo Higuita 2 | # Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | # 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | [Desktop Entry] 8 | Name=Index 9 | Name[ca]=Índex 10 | Name[ca@valencia]=Índex 11 | Name[cs]=Rejstřík 12 | Name[de]=Index 13 | Name[el]=Δείκτης 14 | Name[en_GB]=Index 15 | Name[es]=Índice 16 | Name[et]=Index 17 | Name[eu]=Index 18 | Name[fi]=Index 19 | Name[fr]=Indice 20 | Name[hi]=निर्देशिका (Index) 21 | Name[hu]=Index 22 | Name[it]=Index 23 | Name[ko]=Index 24 | Name[lt]=Index 25 | Name[nl]=Index 26 | Name[nn]=Index 27 | Name[pa]=ਇੰਡੈਕਸ 28 | Name[pt]=Índice 29 | Name[pt_BR]=Index 30 | Name[sk]=Index 31 | Name[sl]=Indeks 32 | Name[sv]=Index 33 | Name[uk]=Індекс 34 | Name[x-test]=xxIndexxx 35 | Name[zh_TW]=索引 36 | Comment=File manager 37 | Comment[ca]=Gestor de fitxers 38 | Comment[ca@valencia]=Gestor de fitxers 39 | Comment[cs]=Správce souborů 40 | Comment[de]=Dateiverwaltung 41 | Comment[el]=Διαχειριστής αρχείων 42 | Comment[en_GB]=File manager 43 | Comment[es]=Gestor de archivos 44 | Comment[et]=Failihaldur 45 | Comment[eu]=Fitxategi-kudeatzailea 46 | Comment[fi]=Tiedostonhallinta 47 | Comment[fr]=Gestionnaire de fichiers 48 | Comment[hi]=फ़ाइल प्रबंधक 49 | Comment[hu]=Fájlkezelő 50 | Comment[it]=Gestore dei file 51 | Comment[ko]=파일 관리자 52 | Comment[lt]=Failų tvarkytuvė 53 | Comment[nl]=Bestandsbeheerder 54 | Comment[nn]=Filhandsamar 55 | Comment[pa]=ਫਾਇਲ ਮੈਨੇਜਰ 56 | Comment[pt]=Gestor de ficheiros 57 | Comment[pt_BR]=Gerenciador de arquivos 58 | Comment[sk]=Správca súborov 59 | Comment[sl]=Upravljalnik datotek 60 | Comment[sv]=Filhanterare 61 | Comment[uk]=Менеджер файлів 62 | Comment[x-test]=xxFile managerxx 63 | Comment[zh_TW]=檔案管理工具 64 | TryExec=index 65 | Exec=index %U 66 | Terminal=false 67 | Type=Application 68 | Categories=Qt;KDE;System;FileTools;FileManager; 69 | GenericName=File Manager 70 | GenericName[ca]=Gestor de fitxers 71 | GenericName[ca@valencia]=Gestor de fitxers 72 | GenericName[cs]=Správce souborů 73 | GenericName[de]=Dateiverwaltung 74 | GenericName[el]=Διαχειριστής αρχείων 75 | GenericName[en_GB]=File Manager 76 | GenericName[es]=Gestor de archivos 77 | GenericName[et]=Failihaldur 78 | GenericName[eu]=Fitxategi-kudeatzailea 79 | GenericName[fi]=Tiedostonhallinta 80 | GenericName[fr]=Gestionnaire de fichiers 81 | GenericName[hi]=फ़ाइल प्रबंधक 82 | GenericName[hu]=Fájlkezelő 83 | GenericName[it]=Gestore dei file 84 | GenericName[ko]=파일 관리자 85 | GenericName[lt]=Failų tvarkytuvė 86 | GenericName[nl]=Bestandsbeheerder 87 | GenericName[nn]=Filhandsamar 88 | GenericName[pa]=ਫਾਇਲ ਮੈਨੇਜਰ 89 | GenericName[pt]=Gestor de Ficheiros 90 | GenericName[pt_BR]=Gerenciador de Arquivos 91 | GenericName[sk]=Správca súborov 92 | GenericName[sl]=Upravljalnik datotek 93 | GenericName[sv]=Filhanterare 94 | GenericName[uk]=Менеджер файлів 95 | GenericName[x-test]=xxFile Managerxx 96 | GenericName[zh_TW]=檔案管理工具 97 | StartupNotify=true 98 | Icon=system-file-manager 99 | MimeType=inode/directory; 100 | -------------------------------------------------------------------------------- /src/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | widgets/views/Browser.qml 5 | widgets/views/Terminal.qml 6 | widgets/views/PlacesSideBar.qml 7 | widgets/views/BrowserLayout.qml 8 | widgets/views/SettingsDialog.qml 9 | widgets/previewer/DefaultPreview.qml 10 | widgets/previewer/DocumentPreview.qml 11 | widgets/previewer/FilePreviewer.qml 12 | widgets/previewer/ImagePreview.qml 13 | widgets/previewer/TextPreview.qml 14 | widgets/previewer/VideoPreview.qml 15 | widgets/previewer/AudioPreview.qml 16 | widgets/previewer/CompressedPreview.qml 17 | widgets/previewer/FontPreviewer.qml 18 | widgets/ColorsBar.qml 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/widgets/ColorsBar.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQuick.Controls 2.14 3 | import QtQuick.Layouts 1.3 4 | import org.kde.mauikit 1.0 as Maui 5 | import org.kde.kirigami 2.7 as Kirigami 6 | 7 | /** 8 | * ColorsBar 9 | * A global sidebar for the application window that can be collapsed. 10 | * 11 | * 12 | * 13 | * 14 | * 15 | * 16 | */ 17 | Row 18 | { 19 | id: control 20 | anchors.verticalCenter: parent.verticalCenter 21 | spacing: Maui.Style.space.medium 22 | 23 | /** 24 | * currentColor : string 25 | */ 26 | property string currentColor 27 | 28 | /** 29 | * size : int 30 | */ 31 | property int size : Maui.Style.iconSizes.medium 32 | 33 | /** 34 | * colorPicked : 35 | */ 36 | signal colorPicked(string color) 37 | 38 | Rectangle 39 | { 40 | color:"#f21b51" 41 | anchors.verticalCenter: parent.verticalCenter 42 | height: size 43 | width: height 44 | radius: Maui.Style.radiusV 45 | border.color: Qt.darker(color, 1.7) 46 | 47 | MouseArea 48 | { 49 | anchors.fill: parent 50 | onClicked: 51 | { 52 | currentColor = parent.color 53 | colorPicked("folder-red") 54 | } 55 | } 56 | } 57 | 58 | Rectangle 59 | { 60 | color:"#f9a32b" 61 | anchors.verticalCenter: parent.verticalCenter 62 | height: size 63 | width: height 64 | radius: Maui.Style.radiusV 65 | border.color: Qt.darker(color, 1.7) 66 | 67 | MouseArea 68 | { 69 | anchors.fill: parent 70 | onClicked: 71 | { 72 | currentColor = parent.color 73 | colorPicked("folder-orange") 74 | } 75 | } 76 | } 77 | 78 | Rectangle 79 | { 80 | color:"#3eb881" 81 | anchors.verticalCenter: parent.verticalCenter 82 | height: size 83 | width: height 84 | radius: Maui.Style.radiusV 85 | border.color: Qt.darker(color, 1.7) 86 | 87 | MouseArea 88 | { 89 | anchors.fill: parent 90 | onClicked: 91 | { 92 | currentColor = parent.color 93 | colorPicked("folder-green") 94 | } 95 | } 96 | } 97 | 98 | Rectangle 99 | { 100 | color:"#b2b9bd" 101 | anchors.verticalCenter: parent.verticalCenter 102 | height: size 103 | width: height 104 | radius: Maui.Style.radiusV 105 | border.color: Qt.darker(color, 1.7) 106 | 107 | MouseArea 108 | { 109 | anchors.fill: parent 110 | onClicked: 111 | { 112 | currentColor = parent.color 113 | colorPicked("folder-grey") 114 | } 115 | } 116 | } 117 | 118 | Rectangle 119 | { 120 | color:"#474747" 121 | anchors.verticalCenter: parent.verticalCenter 122 | height: size 123 | width: height 124 | radius: Maui.Style.radiusV 125 | border.color: Qt.darker(color, 1.7) 126 | 127 | MouseArea 128 | { 129 | anchors.fill: parent 130 | onClicked: 131 | { 132 | currentColor = parent.color 133 | colorPicked("folder-black") 134 | } 135 | } 136 | } 137 | 138 | Kirigami.Icon 139 | { 140 | anchors.verticalCenter: parent.verticalCenter 141 | height: size 142 | width: height 143 | 144 | source: "edit-clear" 145 | color: Kirigami.Theme.textColor 146 | 147 | MouseArea 148 | { 149 | anchors.fill: parent 150 | onClicked: 151 | { 152 | currentColor = "" 153 | colorPicked("folder") 154 | } 155 | } 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /src/widgets/previewer/AudioPreview.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.2 3 | import QtQuick.Layouts 1.3 4 | import QtMultimedia 5.8 5 | import org.kde.mauikit 1.2 as Maui 6 | import org.kde.kirigami 2.7 as Kirigami 7 | 8 | Maui.Page 9 | { 10 | id: control 11 | anchors.fill: parent 12 | headBar.visible: false 13 | 14 | property alias player: player 15 | 16 | MediaPlayer 17 | { 18 | id: player 19 | source: currentUrl 20 | autoLoad: true 21 | autoPlay: true 22 | property string title : player.metaData.title 23 | 24 | onTitleChanged: 25 | { 26 | infoModel.append({key:"Title", value: player.metaData.title}) 27 | infoModel.append({key:"Artist", value: player.metaData.albumArtist}) 28 | infoModel.append({key:"Album", value: player.metaData.albumTitle}) 29 | infoModel.append({key:"Author", value: player.metaData.author}) 30 | infoModel.append({key:"Codec", value: player.metaData.audioCodec}) 31 | infoModel.append({key:"Copyright", value: player.metaData.copyright}) 32 | infoModel.append({key:"Duration", value: player.metaData.duration}) 33 | infoModel.append({key:"Track", value: player.metaData.trackNumber}) 34 | infoModel.append({key:"Year", value: player.metaData.year}) 35 | infoModel.append({key:"Rating", value: player.metaData.userRating}) 36 | infoModel.append({key:"Lyrics", value: player.metaData.lyrics}) 37 | infoModel.append({key:"Genre", value: player.metaData.genre}) 38 | infoModel.append({key:"Artwork", value: player.metaData.coverArtUrlLarge}) 39 | } 40 | } 41 | 42 | Item 43 | { 44 | anchors.fill: parent 45 | anchors.margins: Maui.Style.space.big 46 | 47 | ColumnLayout 48 | { 49 | anchors.centerIn: parent 50 | width: Math.min(parent.width, 200) 51 | height: Math.min(200, parent.height) 52 | spacing: Maui.Style.space.big 53 | 54 | Item 55 | { 56 | Layout.fillWidth: true 57 | Layout.fillHeight: true 58 | 59 | Kirigami.Icon 60 | { 61 | height: parent.height 62 | width: parent.width 63 | source: iteminfo.icon 64 | smooth: true 65 | } 66 | } 67 | 68 | Maui.ListItemTemplate 69 | { 70 | Layout.fillWidth: true 71 | label1.text: player.metaData.title 72 | label1.font.pointSize: Maui.Style.fontSizes.huge 73 | label2.font.pointSize: Maui.Style.fontSizes.big 74 | label1.horizontalAlignment:Qt.AlignHCenter 75 | label2.horizontalAlignment:Qt.AlignHCenter 76 | 77 | label2.text: player.metaData.albumArtist || player.metaData.albumTitle 78 | } 79 | } 80 | } 81 | 82 | footBar.visible: true 83 | footerBackground.color: "transparent" 84 | footBar.leftContent: ToolButton 85 | { 86 | icon.name: player.playbackState === MediaPlayer.PlayingState ? "media-playback-pause" : "media-playback-start" 87 | onClicked: player.playbackState === MediaPlayer.PlayingState ? player.pause() : player.play() 88 | } 89 | 90 | footBar.rightContent: Label 91 | { 92 | text: Maui.FM.formatTime((player.duration - player.position)/1000) 93 | } 94 | 95 | footBar.middleContent : Slider 96 | { 97 | id: _slider 98 | Layout.fillWidth: true 99 | orientation: Qt.Horizontal 100 | from: 0 101 | to: 1000 102 | value: (1000 * player.position) / player.duration 103 | onMoved: player.seek((_slider.value / 1000) * player.duration) 104 | } 105 | } 106 | 107 | 108 | -------------------------------------------------------------------------------- /src/widgets/previewer/CompressedPreview.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQuick.Controls 2.14 3 | import QtQuick.Layouts 1.3 4 | import org.kde.mauikit 1.0 as Maui 5 | import org.kde.kirigami 2.7 as Kirigami 6 | import org.maui.index 1.0 as Index 7 | 8 | Maui.Page 9 | { 10 | id: control 11 | headBar.visible: false 12 | footBar.visible: true 13 | footerBackground.color: "transparent" 14 | footBar.rightContent: Button 15 | { 16 | text: i18n("Extract") 17 | onClicked: 18 | { 19 | dialogLoader.sourceComponent= _extractDialogComponent 20 | dialog.open() 21 | _compressedFile.extract(browser.currentPath, dialogLoader.textEntry.text) 22 | } 23 | } 24 | 25 | Component.onCompleted: 26 | { 27 | _compressedFile.url = currentUrl 28 | } 29 | 30 | Maui.ListBrowser 31 | { 32 | id: _listView 33 | anchors.fill: parent 34 | model: Maui.BaseModel 35 | { 36 | list: _compressedFile.model 37 | } 38 | 39 | margins: Maui.Style.space.medium 40 | 41 | delegate: Maui.ItemDelegate 42 | { 43 | height: Maui.Style.rowHeight* 1.5 44 | width: ListView.view.width 45 | 46 | Maui.ListItemTemplate 47 | { 48 | anchors.fill: parent 49 | iconSource: model.icon 50 | iconSizeHint: Maui.Style.iconSizes.medium 51 | label1.text: model.label 52 | label2.text: model.date 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/widgets/previewer/DefaultPreview.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.2 3 | import QtQuick.Layouts 1.3 4 | import org.kde.kirigami 2.7 as Kirigami 5 | import org.kde.mauikit 1.0 as Maui 6 | 7 | Item 8 | { 9 | anchors.fill: parent 10 | Kirigami.Icon 11 | { 12 | anchors.centerIn: parent 13 | source: iteminfo.icon 14 | height: Maui.Style.iconSizes.huge 15 | width: height 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/widgets/previewer/DocumentPreview.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.2 3 | import QtQuick.Layouts 1.3 4 | import org.kde.mauikit 1.0 as Maui 5 | import org.kde.kirigami 2.7 as Kirigami 6 | //import QtQuick.Pdf 5.15 7 | 8 | Maui.Page 9 | { 10 | id: control 11 | headBar.visible: false 12 | 13 | property int currentPage; 14 | property int pageCount; 15 | property var pagesModel; 16 | // title: documentItem.title 17 | 18 | // footBar.visible: true 19 | // footBar.middleContent: [ 20 | // ToolButton 21 | // { 22 | // icon.name: "go-previous" 23 | // enabled: documentItem.currentPage > 0 24 | // onClicked: 25 | // { 26 | // if(documentItem.currentPage - 1 > -1) 27 | // documentItem.currentPage -- 28 | // } 29 | // }, 30 | 31 | // ToolButton 32 | // { 33 | // icon.name: "go-next" 34 | //// enabled: documentItem.pageCount > 1 && documentItem.currentPage + 1 < documentItem.pageCount 35 | // onClicked: 36 | // { 37 | 38 | //// if(documentItem.currentPage +1 < documentItem.pageCount) 39 | //// documentItem.currentPage ++ 40 | // _viewer.source = _viewer.source+"#1" 41 | // } 42 | // } 43 | // ] 44 | 45 | Maui.ImageViewer 46 | { 47 | id: _viewer 48 | anchors.fill: parent 49 | source: currentUrl 50 | } 51 | 52 | // PdfDocument 53 | // { 54 | // id: documentItem 55 | //// height: 100 56 | //// width: 100 57 | // source : currentUrl 58 | // // onWindowTitleForDocumentChanged: { 59 | // // fileBrowserRoot.title = windowTitleForDocument 60 | // // } 61 | 62 | // } 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/widgets/previewer/FilePreviewer.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQml 2.14 3 | import QtQuick.Controls 2.14 4 | import QtQuick.Layouts 1.3 5 | import org.kde.kirigami 2.7 as Kirigami 6 | import org.kde.mauikit 1.2 as Maui 7 | 8 | Maui.Page 9 | { 10 | id: control 11 | 12 | property url currentUrl: "" 13 | 14 | property alias listView : _listView 15 | property alias model : _listView.model 16 | property alias currentIndex: _listView.currentIndex 17 | 18 | property bool isFav : false 19 | property bool isDir : false 20 | property bool showInfo: true 21 | 22 | property alias tagBar : _tagsBar 23 | 24 | title: _listView.currentItem.title 25 | 26 | headerBackground.color: "transparent" 27 | headBar.rightContent: ToolButton 28 | { 29 | icon.name: "documentinfo" 30 | checkable: true 31 | checked: control.showInfo 32 | onClicked: control.showInfo = !control.showInfo 33 | } 34 | 35 | ListView 36 | { 37 | id: _listView 38 | anchors.fill: parent 39 | orientation: ListView.Horizontal 40 | currentIndex: -1 41 | clip: true 42 | focus: true 43 | spacing: 0 44 | interactive: Maui.Handy.isTouch 45 | highlightFollowsCurrentItem: true 46 | highlightMoveDuration: 0 47 | highlightResizeDuration : 0 48 | snapMode: ListView.SnapOneItem 49 | cacheBuffer: width 50 | keyNavigationEnabled : true 51 | keyNavigationWraps : true 52 | onMovementEnded: currentIndex = indexAt(contentX, contentY) 53 | 54 | delegate: Item 55 | { 56 | id: _delegate 57 | 58 | height: ListView.view.height 59 | width: ListView.view.width 60 | 61 | property bool isCurrentItem : ListView.isCurrentItem 62 | property url currentUrl: model.path 63 | property var iteminfo : model 64 | property alias infoModel : _infoModel 65 | readonly property string title: model.label 66 | 67 | Loader 68 | { 69 | id: previewLoader 70 | active: _delegate.isCurrentItem 71 | visible: !control.showInfo 72 | width: parent.width 73 | height: parent.height 74 | onActiveChanged: if(active) show(currentUrl) 75 | } 76 | 77 | Kirigami.ScrollablePage 78 | { 79 | id: _infoContent 80 | anchors.fill: parent 81 | visible: control.showInfo 82 | 83 | Kirigami.Theme.backgroundColor: "transparent" 84 | padding: 0 85 | leftPadding: padding 86 | rightPadding: padding 87 | topPadding: padding 88 | bottomPadding: padding 89 | 90 | ColumnLayout 91 | { 92 | width: parent.width 93 | spacing: 0 94 | 95 | Item 96 | { 97 | Layout.fillWidth: true 98 | Layout.preferredHeight: 100 99 | 100 | Kirigami.Icon 101 | { 102 | height: Maui.Style.iconSizes.large 103 | width: height 104 | anchors.centerIn: parent 105 | source: iteminfo.icon 106 | } 107 | } 108 | 109 | Maui.Separator 110 | { 111 | position: Qt.Horizontal 112 | Layout.fillWidth: true 113 | } 114 | 115 | Repeater 116 | { 117 | model: ListModel { id: _infoModel } 118 | delegate: Maui.AlternateListItem 119 | { 120 | visible: model.value 121 | Layout.preferredHeight: visible ? _delegateColumnInfo.label1.implicitHeight + _delegateColumnInfo.label2.implicitHeight + Maui.Style.space.large : 0 122 | Layout.fillWidth: true 123 | lastOne: index === _infoModel.count-1 124 | 125 | Maui.ListItemTemplate 126 | { 127 | id: _delegateColumnInfo 128 | 129 | iconSource: "documentinfo" 130 | iconSizeHint: Maui.Style.iconSizes.medium 131 | 132 | anchors.fill: parent 133 | anchors.margins: Maui.Style.space.medium 134 | 135 | label1.text: model.key 136 | label1.font.weight: Font.Bold 137 | label1.font.bold: true 138 | label2.text: model.value 139 | label2.elide: Qt.ElideMiddle 140 | label2.wrapMode: Text.Wrap 141 | label2.font.weight: Font.Light 142 | } 143 | } 144 | } 145 | } 146 | } 147 | 148 | function show(path) 149 | { 150 | console.log("Init model for ", path, previewLoader.active, _delegate.isCurrentItem) 151 | initModel() 152 | 153 | control.isDir = model.isdir == "true" 154 | control.currentUrl = path 155 | control.isFav = _tagsBar.list.contains("fav") 156 | 157 | var source = "DefaultPreview.qml" 158 | if(Maui.FM.checkFileType(Maui.FMList.AUDIO, iteminfo.mime)) 159 | { 160 | source = "AudioPreview.qml" 161 | }else if(Maui.FM.checkFileType(Maui.FMList.VIDEO, iteminfo.mime)) 162 | { 163 | source = "VideoPreview.qml" 164 | }else if(Maui.FM.checkFileType(Maui.FMList.TEXT, iteminfo.mime)) 165 | { 166 | source = "TextPreview.qml" 167 | }else if(Maui.FM.checkFileType(Maui.FMList.IMAGE, iteminfo.mime)) 168 | { 169 | source = "ImagePreview.qml" 170 | }else if(Maui.FM.checkFileType(Maui.FMList.DOCUMENT, iteminfo.mime)) 171 | { 172 | source = "DocumentPreview.qml" 173 | }else if(Maui.FM.checkFileType(Maui.FMList.COMPRESSED, iteminfo.mime)) 174 | { 175 | source = "CompressedPreview.qml" 176 | }else if(Maui.FM.checkFileType(Maui.FMList.FONT, iteminfo.mime)) 177 | { 178 | source = "FontPreviewer.qml" 179 | }else 180 | { 181 | source = "DefaultPreview.qml" 182 | } 183 | 184 | console.log("previe mime", iteminfo.mime) 185 | previewLoader.source = source 186 | control.showInfo = source === "DefaultPreview.qml" 187 | } 188 | 189 | function initModel() 190 | { 191 | infoModel.clear() 192 | infoModel.append({key: "Type", value: iteminfo.mime}) 193 | infoModel.append({key: "Date", value: Qt.formatDateTime(new Date(model.date), "d MMM yyyy")}) 194 | infoModel.append({key: "Modified", value: Qt.formatDateTime(new Date(model.modified), "d MMM yyyy")}) 195 | infoModel.append({key: "Last Read", value: Qt.formatDateTime(new Date(model.lastread), "d MMM yyyy")}) 196 | infoModel.append({key: "Owner", value: iteminfo.owner}) 197 | infoModel.append({key: "Group", value: iteminfo.group}) 198 | infoModel.append({key: "Size", value: Maui.FM.formatSize(iteminfo.size)}) 199 | infoModel.append({key: "Symbolic Link", value: iteminfo.symlink}) 200 | infoModel.append({key: "Path", value: iteminfo.path}) 201 | infoModel.append({key: "Thumbnail", value: iteminfo.thumbnail}) 202 | infoModel.append({key: "Icon Name", value: iteminfo.icon}) 203 | } 204 | } 205 | } 206 | 207 | footerColumn: [ 208 | Maui.TagsBar 209 | { 210 | id: _tagsBar 211 | position: ToolBar.Footer 212 | width: parent.width 213 | list.urls: [control.currentUrl] 214 | list.strict: false 215 | allowEditMode: true 216 | onTagRemovedClicked: list.removeFromUrls(index) 217 | onTagsEdited: list.updateToUrls(tags) 218 | Kirigami.Theme.textColor: control.Kirigami.Theme.textColor 219 | Kirigami.Theme.backgroundColor: control.Kirigami.Theme.backgroundColor 220 | 221 | onAddClicked: 222 | { 223 | tagsDialog.composerList.urls = [ previewer.currentUrl] 224 | tagsDialog.open() 225 | } 226 | }, 227 | 228 | Maui.ToolBar 229 | { 230 | width: parent.width 231 | position: ToolBar.Bottom 232 | background: null 233 | leftContent: Maui.ToolActions 234 | { 235 | expanded: true 236 | autoExclusive: false 237 | checkable: false 238 | 239 | Action 240 | { 241 | text: i18n("Previous") 242 | icon.name: "go-previous" 243 | onTriggered : _listView.decrementCurrentIndex() 244 | } 245 | 246 | Action 247 | { 248 | text: i18n("Next") 249 | icon.name: "go-next" 250 | onTriggered: _listView.incrementCurrentIndex() 251 | } 252 | } 253 | 254 | rightContent: [ 255 | ToolButton 256 | { 257 | icon.name: "document-open" 258 | onClicked: 259 | { 260 | currentBrowser.openFile(control.currentUrl) 261 | } 262 | }, 263 | 264 | ToolButton 265 | { 266 | icon.name: "love" 267 | checkable: true 268 | checked: control.isFav 269 | onClicked: 270 | { 271 | if(control.isFav) 272 | _tagsBar.list.removeFromUrls("fav") 273 | else 274 | _tagsBar.list.insertToUrls("fav") 275 | 276 | control.isFav = !control.isFav 277 | } 278 | }, 279 | 280 | ToolButton 281 | { 282 | visible: !isDir 283 | icon.name: "document-share" 284 | onClicked: 285 | { 286 | Maui.Platform.shareFiles([control.currentUrl]) 287 | } 288 | } 289 | ] 290 | } 291 | 292 | ] 293 | 294 | 295 | Connections 296 | { 297 | target: tagsDialog 298 | enabled: tagsDialog 299 | ignoreUnknownSignals: true 300 | 301 | function onTagsReady(tags) 302 | { 303 | tagsDialog.composerList.updateToUrls(tags) 304 | tagBar.list.refresh() 305 | } 306 | } 307 | } 308 | -------------------------------------------------------------------------------- /src/widgets/previewer/FontPreviewer.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQuick.Controls 2.14 3 | import QtQuick.Layouts 1.3 4 | import org.kde.mauikit 1.0 as Maui 5 | import org.kde.kirigami 2.7 as Kirigami 6 | import org.maui.index 1.0 as Index 7 | 8 | Maui.Page 9 | { 10 | id: control 11 | headBar.visible: false 12 | 13 | FontLoader 14 | { 15 | id: _font 16 | source: currentUrl 17 | } 18 | 19 | readonly property string abc : "a b c d e f g h i j k l m n o p q r s t u v w x y z" 20 | readonly property string nums : "1 2 3 4 5 6 7 8 9 0" 21 | readonly property string symbols : "~ ! @ # $ % ^ & * ( ) _ + { } < > , . ? / ; ' [ ] \ \ | `" 22 | 23 | readonly property string paragraph : "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur faucibus, arcu quis interdum congue, ligula nisl facilisis felis, id faucibus urna lacus at ipsum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse nec enim augue. Nullam in convallis odio, quis commodo lectus. Nulla id facilisis nulla. Mauris cursus pulvinar mi in facilisis. Phasellus id venenatis nibh. Etiam eget dignissim nulla." 24 | 25 | footBar.visible: true 26 | footerBackground.color: "transparent" 27 | footBar.rightContent: Button 28 | { 29 | text: i18n("Install") 30 | onClicked: 31 | { 32 | Maui.FM.copy([currentUrl], Maui.FM.homePath()+"/.fonts") 33 | } 34 | } 35 | 36 | Kirigami.ScrollablePage 37 | { 38 | anchors.fill: parent 39 | 40 | ColumnLayout 41 | { 42 | width: parent.width 43 | spacing: Maui.Style.space.medium 44 | 45 | Label 46 | { 47 | font.family: _font.name 48 | Layout.fillWidth: true 49 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere 50 | text: abc.toUpperCase() 51 | color: Kirigami.Theme.textColor 52 | font.pointSize: 30 53 | } 54 | 55 | Label 56 | { 57 | font.family: _font.name 58 | Layout.fillWidth: true 59 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere 60 | text: abc 61 | color: Kirigami.Theme.textColor 62 | font.pointSize: 20 63 | } 64 | 65 | Label 66 | { 67 | font.family: _font.name 68 | Layout.fillWidth: true 69 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere 70 | text: nums 71 | color: Kirigami.Theme.textColor 72 | font.pointSize: 30 73 | } 74 | 75 | Label 76 | { 77 | font.family: _font.name 78 | Layout.fillWidth: true 79 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere 80 | text: paragraph 81 | color: Kirigami.Theme.textColor 82 | font.pointSize: Maui.Style.fontSizes.huge 83 | } 84 | 85 | Label 86 | { 87 | font.family: _font.name 88 | Layout.fillWidth: true 89 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere 90 | text: symbols 91 | color: Kirigami.Theme.textColor 92 | font.pointSize: 15 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/widgets/previewer/ImagePreview.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.2 3 | import QtQuick.Layouts 1.3 4 | import org.kde.mauikit 1.0 as Maui 5 | import org.kde.kirigami 2.7 as Kirigami 6 | 7 | Maui.ImageViewer 8 | { 9 | id: control 10 | anchors.fill: parent 11 | source: currentUrl 12 | animated: iteminfo.mime === "image/gif" 13 | } 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/widgets/previewer/TextPreview.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.2 3 | import QtQuick.Layouts 1.3 4 | import org.kde.mauikit 1.0 as Maui 5 | import org.kde.kirigami 2.7 as Kirigami 6 | 7 | Maui.Editor 8 | { 9 | id: control 10 | anchors.fill: parent 11 | headBar.visible: false 12 | footBar.visible: false 13 | body.readOnly: true 14 | document.enableSyntaxHighlighting: true 15 | Kirigami.Theme.backgroundColor: "transparent" 16 | 17 | // Component.onCompleted: document.load(currentUrl) 18 | fileUrl: currentUrl 19 | Connections 20 | { 21 | target: control.document 22 | 23 | function onLoaded() 24 | { 25 | infoModel.insert(0, {key:"Length", value: control.body.length.toString()}) 26 | infoModel.insert(0, {key:"Line Count", value: control.body.lineCount.toString()}) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/widgets/previewer/VideoPreview.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.2 3 | import QtQuick.Layouts 1.3 4 | import QtMultimedia 5.8 5 | import org.kde.mauikit 1.0 as Maui 6 | import org.kde.kirigami 2.7 as Kirigami 7 | 8 | Maui.Page 9 | { 10 | id: control 11 | property alias player : player 12 | headBar.visible: false 13 | anchors.fill: parent 14 | Video 15 | { 16 | id: player 17 | anchors.fill: parent 18 | source: currentUrl 19 | autoLoad: true 20 | autoPlay: true 21 | loops: 3 22 | property string codec : player.metaData.videoCodec 23 | 24 | onCodecChanged: 25 | { 26 | infoModel.append({key:"Title", value: player.metaData.title}) 27 | infoModel.append({key:"Camera", value: player.metaData.cameraModel}) 28 | infoModel.append({key:"Zoom Ratio", value: player.metaData.digitalZoomRatio}) 29 | infoModel.append({key:"Author", value: player.metaData.author}) 30 | infoModel.append({key:"Audio Codec", value: player.metaData.audioCodec}) 31 | infoModel.append({key:"Video Codec", value: player.metaData.videoCodec}) 32 | infoModel.append({key:"Copyright", value: player.metaData.copyright}) 33 | infoModel.append({key:"Duration", value: player.metaData.duration}) 34 | infoModel.append({key:"Framerate", value: player.metaData.videoFrameRate}) 35 | infoModel.append({key:"Year", value: player.metaData.year}) 36 | infoModel.append({key:"Aspect Ratio", value: player.metaData.pixelAspectRatio}) 37 | infoModel.append({key:"Resolution", value: player.metaData.resolution}) 38 | } 39 | 40 | ToolButton 41 | { 42 | visible: player.playbackState == MediaPlayer.StoppedState 43 | anchors.centerIn: parent 44 | icon.color: "transparent" 45 | flat: true 46 | icon.width: Maui.Style.iconSizes.huge 47 | icon.name: iteminfo.icon 48 | } 49 | 50 | focus: true 51 | Keys.onSpacePressed: player.playbackState == MediaPlayer.PlayingState ? player.pause() : player.play() 52 | Keys.onLeftPressed: player.seek(player.position - 5000) 53 | Keys.onRightPressed: player.seek(player.position + 5000) 54 | 55 | RowLayout 56 | { 57 | anchors.fill: parent 58 | 59 | MouseArea 60 | { 61 | Layout.fillWidth: true 62 | Layout.fillHeight: true 63 | onDoubleClicked: player.seek(player.position - 5000) 64 | } 65 | 66 | MouseArea 67 | { 68 | Layout.fillWidth: true 69 | Layout.fillHeight: true 70 | onClicked: player.playbackState === MediaPlayer.PlayingState ? player.pause() : player.play() 71 | } 72 | 73 | MouseArea 74 | { 75 | Layout.fillWidth: true 76 | Layout.fillHeight: true 77 | onDoubleClicked: player.seek(player.position + 5000) 78 | } 79 | } 80 | } 81 | 82 | footBar.visible: true 83 | footBar.leftContent: ToolButton 84 | { 85 | icon.name: player.playbackState === MediaPlayer.PlayingState ? "media-playback-pause" : "media-playback-start" 86 | onClicked: player.playbackState === MediaPlayer.PlayingState ? player.pause() : player.play() 87 | } 88 | 89 | footBar.rightContent: Label 90 | { 91 | text: Maui.FM.formatTime((player.duration - player.position)/1000) 92 | } 93 | 94 | footBar.middleContent : Slider 95 | { 96 | id: _slider 97 | Layout.fillWidth: true 98 | orientation: Qt.Horizontal 99 | from: 0 100 | to: 1000 101 | value: (1000 * player.position) / player.duration 102 | 103 | onMoved: player.seek((_slider.value / 1000) * player.duration) 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/widgets/views/BrowserLayout.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.14 8 | import QtQml 2.12 9 | import QtQuick.Controls 2.13 10 | import QtQuick.Layouts 1.3 11 | import org.kde.kirigami 2.7 as Kirigami 12 | import org.kde.mauikit 1.0 as Maui 13 | import QtQml.Models 2.3 14 | 15 | Item 16 | { 17 | id: control 18 | height: _browserView.browserList.height 19 | width: _browserView.browserList.width 20 | 21 | property url path 22 | 23 | property alias orientation : _splitView.orientation 24 | property alias currentIndex : _splitView.currentIndex 25 | property alias count : _splitView.count 26 | readonly property alias currentItem : _splitView.currentItem 27 | readonly property alias model : splitObjectModel 28 | readonly property string title : count === 2 ? model.get(0).browser.title + " - " + model.get(1).browser.title : browser.title 29 | 30 | readonly property Maui.FileBrowser browser : currentItem.browser 31 | 32 | ObjectModel { id: splitObjectModel } 33 | 34 | SplitView 35 | { 36 | id: _splitView 37 | 38 | anchors.fill: parent 39 | orientation: width > 600 ? Qt.Horizontal : Qt.Vertical 40 | 41 | clip: true 42 | focus: true 43 | 44 | handle: Rectangle 45 | { 46 | implicitWidth: Maui.Handy.isTouch ? 10 : 6 47 | implicitHeight: Maui.Handy.isTouch ? 10 : 6 48 | 49 | color: SplitHandle.pressed ? Kirigami.Theme.highlightColor 50 | : (SplitHandle.hovered ? Qt.lighter(Kirigami.Theme.backgroundColor, 1.1) : Kirigami.Theme.backgroundColor) 51 | 52 | Rectangle 53 | { 54 | anchors.centerIn: parent 55 | height: _splitView.orientation == Qt.Horizontal ? 48 : parent.height 56 | width: _splitView.orientation == Qt.Horizontal ? parent.width : 48 57 | color: _splitSeparator1.color 58 | } 59 | 60 | states: [ State 61 | { 62 | when: _splitView.orientation === Qt.Horizontal 63 | 64 | AnchorChanges 65 | { 66 | target: _splitSeparator1 67 | anchors.top: parent.top 68 | anchors.bottom: parent.bottom 69 | anchors.left: parent.left 70 | anchors.right: undefined 71 | } 72 | 73 | AnchorChanges 74 | { 75 | target: _splitSeparator2 76 | anchors.top: parent.top 77 | anchors.bottom: parent.bottom 78 | anchors.right: parent.right 79 | anchors.left: undefined 80 | } 81 | }, 82 | 83 | State 84 | { 85 | when: _splitView.orientation === Qt.Vertical 86 | 87 | AnchorChanges 88 | { 89 | target: _splitSeparator1 90 | anchors.top: parent.top 91 | anchors.bottom: undefined 92 | anchors.left: parent.left 93 | anchors.right: parent.right 94 | } 95 | 96 | AnchorChanges 97 | { 98 | target: _splitSeparator2 99 | anchors.top: undefined 100 | anchors.bottom: parent.bottom 101 | anchors.right: parent.right 102 | anchors.left: parent.left 103 | } 104 | } 105 | ] 106 | 107 | Kirigami.Separator 108 | { 109 | id: _splitSeparator1 110 | } 111 | 112 | Kirigami.Separator 113 | { 114 | id: _splitSeparator2 115 | } 116 | } 117 | 118 | onCurrentItemChanged: 119 | { 120 | currentItem.forceActiveFocus() 121 | } 122 | 123 | Component.onCompleted: split(control.path, Qt.Vertical) 124 | } 125 | 126 | function split(path, orientation) 127 | { 128 | // _splitView.orientaion = orientation 129 | 130 | if(_splitView.count === 1 && !settings.supportSplit) 131 | { 132 | return 133 | } 134 | 135 | if(_splitView.count === 2) 136 | { 137 | return 138 | } 139 | console.log("ERROR") 140 | 141 | const component = Qt.createComponent("qrc:/widgets/views/Browser.qml"); 142 | console.log("ERROR", component.errorString()) 143 | 144 | if (component.status === Component.Ready) 145 | { 146 | const object = component.createObject(splitObjectModel, {'browser.currentPath': path, 'browser.settings.viewType': viewTypeGroup.currentIndex}); 147 | splitObjectModel.append(object) 148 | _splitView.insertItem(splitObjectModel.count, object) // duplicating object insertion due to bug on android not picking the repeater 149 | _splitView.currentIndex = splitObjectModel.count - 1 150 | } 151 | } 152 | 153 | function pop() 154 | { 155 | if(_splitView.count === 1) 156 | { 157 | return //can not pop all the browsers, leave at least 1 158 | } 159 | const index = _splitView.currentIndex === 1 ? 0 : 1 160 | splitObjectModel.remove(index) 161 | var item = _splitView.takeItem(index) 162 | item.destroy() 163 | _splitView.currentIndex = 0 164 | } 165 | } 166 | 167 | 168 | -------------------------------------------------------------------------------- /src/widgets/views/DisksSection.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Slike Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.14 8 | import QtQuick.Controls 2.14 9 | import QtQuick.Layouts 1.3 10 | import org.kde.mauikit 1.3 as Maui 11 | import org.kde.kirigami 2.14 as Kirigami 12 | 13 | import TagsList 1.0 14 | 15 | ColumnLayout 16 | { 17 | 18 | Maui.SectionDropDown 19 | { 20 | id: _dropDown 21 | Layout.fillWidth: true 22 | label1.text: i18n("Devices and Remote") 23 | label2.text: i18n("Remote locations and devices like disks, phones and cameras") 24 | checked: _favsGrid.count > 0 25 | enabled: _favsGrid.count > 0 26 | } 27 | 28 | Maui.GridView 29 | { 30 | id: _othersGrid 31 | Layout.fillWidth: true 32 | visible: _dropDown.checked 33 | itemSize: Math.min(width * 0.3, 180) 34 | itemHeight: 180 35 | 36 | model: Maui.BaseModel 37 | { 38 | list: Maui.PlacesList 39 | { 40 | groups: [Maui.FMList.DRIVES_PATH, Maui.FMList.REMOTE_PATH] 41 | } 42 | } 43 | 44 | delegate: Item 45 | { 46 | width: _othersGrid.cellWidth 47 | height: _othersGrid.itemHeight 48 | 49 | Maui.GridBrowserDelegate 50 | { 51 | anchors.fill: parent 52 | anchors.margins: Maui.Style.space.medium 53 | 54 | iconSizeHint: height * 0.7 55 | label1.text: model.label 56 | iconSource: model.icon 57 | iconVisible: true 58 | 59 | onClicked: 60 | { 61 | _othersGrid.currentIndex = index 62 | open(model.path) 63 | } 64 | 65 | // Kirigami.ImageColors 66 | // { 67 | // id: _colors 68 | // source: model.icon 69 | // } 70 | 71 | background: Rectangle 72 | { 73 | color: Qt.tint(Kirigami.Theme.textColor, Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.9)) 74 | opacity: 0.8 75 | radius: Maui.Style.radiusV 76 | } 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/widgets/views/FavoritesSection.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Slike Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.14 8 | import QtQuick.Controls 2.14 9 | import QtQuick.Layouts 1.3 10 | import org.kde.mauikit 1.3 as Maui 11 | import org.kde.kirigami 2.14 as Kirigami 12 | 13 | import TagsList 1.0 14 | 15 | ColumnLayout 16 | { 17 | id: control 18 | 19 | signal itemClicked(url url) 20 | 21 | Maui.SectionDropDown 22 | { 23 | id: _dropDown 24 | Layout.fillWidth: true 25 | label1.text: i18n("Favorite files") 26 | 27 | label2.text: i18n("Your files marked as favorites") 28 | checked: _favsGrid.count > 0 29 | enabled: _favsGrid.count > 0 30 | template.iconSource: "love" 31 | template.iconSizeHint: Maui.Style.iconSizes.medium 32 | } 33 | 34 | Maui.ListBrowser 35 | { 36 | id: _favsGrid 37 | Layout.fillWidth: true 38 | visible: _dropDown.checked 39 | enableLassoSelection: true 40 | 41 | implicitHeight: 180 42 | orientation: ListView.Horizontal 43 | verticalScrollBarPolicy: ScrollBar.AlwaysOff 44 | 45 | model: Maui.BaseModel 46 | { 47 | list: Maui.FMList 48 | { 49 | path: "tags:///fav" 50 | } 51 | } 52 | 53 | delegate: Item 54 | { 55 | property bool isCurrentItem : ListView.isCurrentItem 56 | width: 140 57 | height: width 58 | anchors.verticalCenter: parent.verticalCenter 59 | 60 | Maui.GridBrowserDelegate 61 | { 62 | anchors.fill: parent 63 | anchors.margins: Maui.Style.space.medium 64 | label1.text: model.label 65 | iconSource: model.icon 66 | imageSource: model.thumbnail 67 | template.fillMode: Image.PreserveAspectFit 68 | iconSizeHint: height * 0.5 69 | checkable: selectionMode 70 | 71 | onClicked: control.itemClicked(model.url) 72 | 73 | template.content: Label 74 | { 75 | visible: parent.height > 100 76 | opacity: 0.5 77 | color: Kirigami.Theme.textColor 78 | font.pointSize: Maui.Style.fontSizes.tiny 79 | horizontalAlignment: Qt.AlignHCenter 80 | Layout.fillWidth: true 81 | text: model.mime ? (model.mime === "inode/directory" ? (model.count ? model.count + i18n(" items") : "") : Maui.FM.formatSize(model.size)) : "" 82 | } 83 | } 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/widgets/views/HomeView.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Slike Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.14 8 | import QtQuick.Controls 2.14 9 | import QtQuick.Layouts 1.3 10 | import org.kde.mauikit 1.2 as Maui 11 | import org.kde.kirigami 2.14 as Kirigami 12 | import org.maui.index 1.0 as Index 13 | 14 | import TagsList 1.0 15 | import "home" 16 | 17 | Maui.Page 18 | { 19 | id: control 20 | 21 | headBar.visible: false 22 | 23 | Menu 24 | { 25 | id: _fileItemMenu 26 | property url url 27 | 28 | MenuItem 29 | { 30 | text: i18n("Open") 31 | onTriggered: currentBrowser.openFile(_fileItemMenu.url) 32 | } 33 | 34 | MenuItem 35 | { 36 | text: i18n("Open with") 37 | onTriggered: openWith([_fileItemMenu.url]) 38 | } 39 | 40 | MenuItem 41 | { 42 | text: i18n("Share") 43 | onTriggered: shareFiles([_fileItemMenu.url]) 44 | } 45 | 46 | MenuItem 47 | { 48 | text: i18n("Open folder") 49 | onTriggered: openTab(Maui.FM.fileDir(_fileItemMenu.url)) 50 | } 51 | } 52 | 53 | Kirigami.ScrollablePage 54 | { 55 | anchors.fill: parent 56 | contentHeight: _layout.implicitHeight 57 | background: null 58 | padding: 0 59 | leftPadding: padding 60 | rightPadding: padding 61 | topPadding: padding 62 | 63 | property int itemWidth : Math.min(140, _layout.width * 0.3) 64 | 65 | ColumnLayout 66 | { 67 | id: _layout 68 | width: parent.width 69 | spacing: 0 70 | 71 | 72 | Maui.AlternateListItem 73 | { 74 | Layout.fillWidth: true 75 | implicitHeight: _favSection.implicitHeight + Maui.Style.space.huge 76 | 77 | FavoritesSection 78 | { 79 | id: _favSection 80 | width: parent.width 81 | anchors.centerIn: parent 82 | 83 | onItemClicked: 84 | { 85 | _fileItemMenu.url = url 86 | _fileItemMenu.popup() 87 | } 88 | } 89 | } 90 | 91 | Maui.AlternateListItem 92 | { 93 | alt: true 94 | Layout.fillWidth: true 95 | implicitHeight: _recentSection.implicitHeight + Maui.Style.space.huge 96 | 97 | RecentSection 98 | { 99 | id:_recentSection 100 | width: parent.width 101 | anchors.centerIn: parent 102 | 103 | onItemClicked: 104 | { 105 | _fileItemMenu.url = url 106 | _fileItemMenu.popup() 107 | } 108 | } 109 | } 110 | 111 | Maui.AlternateListItem 112 | { 113 | Layout.fillWidth: true 114 | implicitHeight: _sysInfoSection.implicitHeight + Maui.Style.space.huge 115 | 116 | SystemInfo 117 | { 118 | id: _sysInfoSection 119 | width: parent.width 120 | anchors.centerIn: parent 121 | } 122 | } 123 | 124 | Maui.AlternateListItem 125 | { 126 | Layout.fillWidth: true 127 | implicitHeight: _tagsSection.implicitHeight + Maui.Style.space.huge 128 | 129 | TagsSection 130 | { 131 | id: _tagsSection 132 | width: parent.width 133 | anchors.centerIn: parent 134 | 135 | } 136 | } 137 | 138 | Maui.AlternateListItem 139 | { 140 | alt: true 141 | lastOne: true 142 | Layout.fillWidth: true 143 | implicitHeight: _disksSection.implicitHeight + Maui.Style.space.huge 144 | 145 | DisksSection 146 | { 147 | id: _disksSection 148 | width: parent.width 149 | anchors.centerIn: parent 150 | 151 | } 152 | } 153 | } 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /src/widgets/views/PlacesSection.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Slike Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.14 8 | import QtQuick.Controls 2.14 9 | import QtQuick.Layouts 1.3 10 | import org.kde.mauikit 1.3 as Maui 11 | import org.kde.kirigami 2.14 as Kirigami 12 | import "home" 13 | 14 | ColumnLayout 15 | { 16 | id: control 17 | 18 | Maui.SectionDropDown 19 | { 20 | id: _dropDown 21 | Layout.fillWidth: true 22 | label1.text: i18n("Bookmarks") 23 | label2.text: i18n("Quick access to most common places and bookmarks") 24 | checked: true 25 | } 26 | 27 | Maui.GridView 28 | { 29 | id: _placesGrid 30 | visible: _dropDown.checked 31 | Layout.fillWidth: true 32 | itemSize: Math.min(width, 180) 33 | itemHeight: 80 34 | 35 | model: Maui.BaseModel 36 | { 37 | list: Maui.PlacesList 38 | { 39 | id: placesList 40 | 41 | groups: [Maui.FMList.PLACES_PATH] 42 | } 43 | } 44 | 45 | delegate: Item 46 | { 47 | width: _placesGrid.cellWidth 48 | height: _placesGrid.itemHeight 49 | 50 | Card 51 | { 52 | anchors.fill: parent 53 | anchors.margins: Maui.Style.space.medium 54 | 55 | iconSizeHint: Maui.Style.iconSizes.big 56 | label1.text: model.label 57 | label2.text: Qt.formatDateTime(new Date(model.modified), "d MMM yyyy") 58 | iconSource: model.icon 59 | checkable: selectionMode 60 | 61 | Maui.Badge 62 | { 63 | visible: model.count > 0 64 | text: model.count 65 | } 66 | 67 | onClicked: 68 | { 69 | _placesGrid.currentIndex = index 70 | model.count = 0 71 | _stackView.pop() 72 | currentBrowser.openFolder(model.path) 73 | } 74 | } 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/widgets/views/PlacesSideBar.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.14 8 | import QtQuick.Controls 2.14 9 | import QtQuick.Layouts 1.3 10 | import org.kde.mauikit 1.2 as Maui 11 | import org.kde.kirigami 2.6 as Kirigami 12 | 13 | Maui.SideBar 14 | { 15 | id: control 16 | 17 | property alias list : placesList 18 | 19 | signal placeClicked (string path) 20 | 21 | collapsible: true 22 | collapsed : !root.isWide 23 | preferredWidth: Kirigami.Units.gridUnit * (Maui.Handy.isWindows ? 15 : 11) 24 | 25 | onPlaceClicked: 26 | { 27 | currentBrowser.openFolder(path) 28 | if(placesSidebar.collapsed) 29 | placesSidebar.close() 30 | 31 | if(_stackView.depth === 2) 32 | _stackView.pop() 33 | } 34 | 35 | listView.flickable.header: Maui.ListDelegate 36 | { 37 | width: parent.width 38 | iconSize: Maui.Style.iconSizes.small 39 | label: i18n("Overview") 40 | iconName: "start-here-symbolic" 41 | iconVisible: true 42 | isCurrentItem: _stackView.depth === 2 43 | onClicked: 44 | { 45 | if(placesSidebar.collapsed) 46 | placesSidebar.close() 47 | 48 | _stackView.push(_homeViewComponent) 49 | } 50 | } 51 | 52 | model: Maui.BaseModel 53 | { 54 | list: Maui.PlacesList 55 | { 56 | id: placesList 57 | 58 | groups: [ 59 | Maui.FMList.QUICK_PATH, 60 | Maui.FMList.PLACES_PATH, 61 | Maui.FMList.REMOTE_PATH, 62 | Maui.FMList.REMOVABLE_PATH, 63 | Maui.FMList.DRIVES_PATH] 64 | 65 | onBookmarksChanged: 66 | { 67 | syncSidebar(currentPath) 68 | } 69 | } 70 | } 71 | 72 | delegate: Maui.ListDelegate 73 | { 74 | isCurrentItem: ListView.isCurrentItem && _stackView.depth === 1 75 | width: ListView.view.width 76 | iconSize: Maui.Style.iconSizes.small 77 | label: model.label 78 | count: model.count > 0 ? model.count : "" 79 | iconName: model.icon + (Qt.platform.os == "android" || Qt.platform.os == "osx" ? ("-sidebar") : "") 80 | iconVisible: true 81 | 82 | template.content: ToolButton 83 | { 84 | visible: placesList.isDevice(index) && placesList.setupNeeded(index) 85 | icon.name: "media-mount" 86 | flat: true 87 | 88 | onClicked: placesList.requestSetup(index) 89 | } 90 | 91 | function mount() 92 | { 93 | placesList.requestSetup(index); 94 | } 95 | 96 | onClicked: 97 | { 98 | control.currentIndex = index 99 | 100 | if( placesList.isDevice(index) && placesList.setupNeeded(index)) 101 | { 102 | notify(model.icon, model.label, i18n("This device needs to be mounted before accessing it. Do you want to set up this device?"), mount) 103 | } 104 | 105 | placesList.clearBadgeCount(index) 106 | 107 | placeClicked(model.path) 108 | if(control.collapsed) 109 | control.close() 110 | } 111 | 112 | onRightClicked: 113 | { 114 | control.currentIndex = index 115 | _menu.popup() 116 | } 117 | 118 | onPressAndHold: 119 | { 120 | control.currentIndex = index 121 | _menu.popup() 122 | } 123 | } 124 | 125 | section.property: "type" 126 | section.criteria: ViewSection.FullString 127 | section.delegate: Maui.LabelDelegate 128 | { 129 | id: delegate 130 | width: control.width 131 | label: section 132 | labelTxt.font.pointSize: Maui.Style.fontSizes.big 133 | isSection: true 134 | height: Maui.Style.toolBarHeightAlt 135 | } 136 | 137 | onContentDropped: 138 | { 139 | placesList.addPlace(drop.text) 140 | } 141 | 142 | Menu 143 | { 144 | id: _menu 145 | 146 | MenuItem 147 | { 148 | text: i18n("Open in new tab") 149 | icon.name: "tab-new" 150 | onTriggered: openTab(control.model.get(placesSidebar.currentIndex).path) 151 | } 152 | 153 | MenuItem 154 | { 155 | visible: root.currentTab.count === 1 && settings.supportSplit 156 | text: i18n("Open in split view") 157 | icon.name: "view-split-left-right" 158 | onTriggered: currentTab.split(control.model.get(placesSidebar.currentIndex).path, Qt.Horizontal) 159 | } 160 | 161 | MenuSeparator{} 162 | 163 | MenuItem 164 | { 165 | text: i18n("Remove") 166 | Kirigami.Theme.textColor: Kirigami.Theme.negativeTextColor 167 | onTriggered: list.removePlace(control.currentIndex) 168 | } 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /src/widgets/views/RecentSection.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Camilo Higuita 2 | // Copyright 2020 Slike Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | import QtQuick 2.14 7 | import QtQuick.Controls 2.14 8 | import QtQuick.Layouts 1.3 9 | import org.kde.mauikit 1.3 as Maui 10 | import org.kde.kirigami 2.14 as Kirigami 11 | import org.maui.index 1.0 as Index 12 | import Qt.labs.platform 1.1 13 | 14 | import "home" 15 | 16 | ColumnLayout 17 | { 18 | id: control 19 | 20 | spacing: Maui.Style.space.medium 21 | 22 | signal itemClicked(url url) 23 | 24 | Maui.SectionDropDown 25 | { 26 | id: _dropDown 27 | Layout.fillWidth: true 28 | label1.text: i18n("Downloads, Audio & Pictures") 29 | label2.text: i18n("Your most recent downloaded files, audio and images") 30 | checked: true 31 | template.iconSource: "view-media-recent" 32 | template.iconSizeHint: Maui.Style.iconSizes.medium 33 | } 34 | 35 | Maui.ListBrowser 36 | { 37 | id: _recentGrid 38 | Layout.fillWidth: true 39 | enableLassoSelection: true 40 | visible: _dropDown.checked && count > 0 41 | implicitHeight: 180 42 | orientation: ListView.Horizontal 43 | verticalScrollBarPolicy: ScrollBar.AlwaysOff 44 | 45 | flickable.footer: Item 46 | { 47 | height: 140 48 | width: height 49 | 50 | ToolButton 51 | { 52 | anchors.centerIn: parent 53 | icon.name: "list-add" 54 | display: ToolButton.TextUnderIcon 55 | flat: true 56 | text: i18n("Downloads") 57 | onClicked: openTab(_recentGrid.model.list.url) 58 | } 59 | } 60 | 61 | model: Maui.BaseModel 62 | { 63 | list: Index.RecentFiles 64 | { 65 | url: StandardPaths.writableLocation(StandardPaths.DownloadLocation) 66 | // filters: Maui.FM.nameFilters(Maui.FMList.AUDIO_TYPE) 67 | } 68 | } 69 | 70 | delegate: Item 71 | { 72 | property bool isCurrentItem : ListView.isCurrentItem 73 | 74 | width: 140 75 | height: width 76 | anchors.verticalCenter: parent.verticalCenter 77 | 78 | Maui.GridBrowserDelegate 79 | { 80 | anchors.fill: parent 81 | anchors.margins: Maui.Style.space.medium 82 | label1.text: model.label 83 | iconSource: model.icon 84 | imageSource: model.thumbnail 85 | template.fillMode: Image.PreserveAspectFit 86 | iconSizeHint: height * 0.5 87 | checkable: selectionMode 88 | 89 | onClicked: 90 | { 91 | control.itemClicked(model.url) 92 | } 93 | 94 | template.content: Label 95 | { 96 | visible: parent.height > 100 97 | opacity: 0.5 98 | color: Kirigami.Theme.textColor 99 | font.pointSize: Maui.Style.fontSizes.tiny 100 | horizontalAlignment: Qt.AlignHCenter 101 | Layout.fillWidth: true 102 | text: Qt.formatDateTime(new Date(model.modified), "d MMM yyyy") 103 | } 104 | } 105 | } 106 | } 107 | 108 | Maui.ListBrowser 109 | { 110 | id: _recentGridAudio 111 | Layout.fillWidth: true 112 | enableLassoSelection: true 113 | visible: _dropDown.checked && count > 0 114 | implicitHeight: 120 115 | orientation: ListView.Horizontal 116 | verticalScrollBarPolicy: ScrollBar.AlwaysOff 117 | 118 | flickable.footer: Item 119 | { 120 | height: 80 121 | width: height 122 | 123 | ToolButton 124 | { 125 | anchors.centerIn: parent 126 | icon.name: "list-add" 127 | display: ToolButton.TextUnderIcon 128 | flat: true 129 | text: i18n("Music") 130 | onClicked: openTab(_recentGridAudio.model.list.url) 131 | } 132 | } 133 | 134 | model: Maui.BaseModel 135 | { 136 | list: Index.RecentFiles 137 | { 138 | url: StandardPaths.writableLocation(StandardPaths.MusicLocation) 139 | filters: Maui.FM.nameFilters(Maui.FMList.AUDIO) 140 | } 141 | } 142 | 143 | delegate: Item 144 | { 145 | property bool isCurrentItem : ListView.isCurrentItem 146 | width: 220 147 | height: 80 148 | anchors.verticalCenter: parent.verticalCenter 149 | 150 | AudioCard 151 | { 152 | anchors.fill: parent 153 | anchors.margins: Maui.Style.space.medium 154 | iconSource: model.icon 155 | iconSizeHint: Maui.Style.iconSizes.big 156 | player.source: model.url 157 | checkable: selectionMode 158 | 159 | onClicked: control.itemClicked(model.url) 160 | } 161 | } 162 | } 163 | 164 | Maui.ListBrowser 165 | { 166 | id: _recentGridPictures 167 | orientation: ListView.Horizontal 168 | Layout.fillWidth: true 169 | implicitHeight: 180 170 | enableLassoSelection: true 171 | visible: _dropDown.checked && count > 0 172 | verticalScrollBarPolicy: ScrollBar.AlwaysOff 173 | 174 | flickable.footer: Item 175 | { 176 | height: 140 177 | width: height 178 | 179 | ToolButton 180 | { 181 | anchors.centerIn: parent 182 | icon.name: "list-add" 183 | display: ToolButton.TextUnderIcon 184 | flat: true 185 | text: i18n("Pictures") 186 | onClicked: openTab(_recentGridPictures.model.list.url) 187 | } 188 | } 189 | 190 | 191 | model: Maui.BaseModel 192 | { 193 | list: Index.RecentFiles 194 | { 195 | url: StandardPaths.writableLocation(StandardPaths.PicturesLocation) 196 | filters: Maui.FM.nameFilters(Maui.FMList.IMAGE) 197 | } 198 | } 199 | 200 | delegate: Item 201 | { 202 | property bool isCurrentItem : ListView.isCurrentItem 203 | width: 140 204 | height: width 205 | anchors.verticalCenter: parent.verticalCenter 206 | 207 | ImageCard 208 | { 209 | anchors.fill: parent 210 | anchors.margins: Maui.Style.space.medium 211 | imageSource: model.thumbnail 212 | // checkable: selectionMode 213 | onClicked: control.itemClicked(model.url) 214 | } 215 | } 216 | } 217 | 218 | Maui.ListBrowser 219 | { 220 | id: _recentCamera 221 | orientation: ListView.Horizontal 222 | Layout.fillWidth: true 223 | implicitHeight: 180 224 | enableLassoSelection: true 225 | visible: _dropDown.checked && count > 0 226 | verticalScrollBarPolicy: ScrollBar.AlwaysOff 227 | 228 | flickable.footer: Item 229 | { 230 | height: 140 231 | width: height 232 | 233 | ToolButton 234 | { 235 | anchors.centerIn: parent 236 | icon.name: "list-add" 237 | display: ToolButton.TextUnderIcon 238 | flat: true 239 | text: i18n("Camera") 240 | onClicked: openTab(_recentCamera.model.list.url) 241 | } 242 | } 243 | 244 | 245 | model: Maui.BaseModel 246 | { 247 | list: Index.RecentFiles 248 | { 249 | url: inx.cameraPath() 250 | filters: Maui.FM.nameFilters(Maui.FMList.IMAGE) 251 | } 252 | } 253 | 254 | delegate: Item 255 | { 256 | property bool isCurrentItem : ListView.isCurrentItem 257 | width: 140 258 | height: width 259 | anchors.verticalCenter: parent.verticalCenter 260 | 261 | ImageCard 262 | { 263 | anchors.fill: parent 264 | anchors.margins: Maui.Style.space.medium 265 | imageSource: model.thumbnail 266 | onClicked: control.itemClicked(model.url) 267 | } 268 | } 269 | } 270 | 271 | Maui.ListBrowser 272 | { 273 | id: _recentScreenshots 274 | orientation: ListView.Horizontal 275 | Layout.fillWidth: true 276 | implicitHeight: 180 277 | enableLassoSelection: true 278 | visible: _dropDown.checked && count > 0 279 | verticalScrollBarPolicy: ScrollBar.AlwaysOff 280 | 281 | flickable.footer: Item 282 | { 283 | height: 140 284 | width: height 285 | 286 | ToolButton 287 | { 288 | anchors.centerIn: parent 289 | icon.name: "list-add" 290 | display: ToolButton.TextUnderIcon 291 | flat: true 292 | text: i18n("Screenshots") 293 | onClicked: openTab(_recentScreenshots.model.list.url) 294 | } 295 | } 296 | 297 | 298 | model: Maui.BaseModel 299 | { 300 | list: Index.RecentFiles 301 | { 302 | url: inx.screenshotsPath() 303 | filters: Maui.FM.nameFilters(Maui.FMList.IMAGE) 304 | } 305 | } 306 | 307 | delegate: Item 308 | { 309 | property bool isCurrentItem : ListView.isCurrentItem 310 | width: 140 311 | height: width 312 | anchors.verticalCenter: parent.verticalCenter 313 | 314 | ImageCard 315 | { 316 | anchors.fill: parent 317 | anchors.margins: Maui.Style.space.medium 318 | imageSource: model.thumbnail 319 | onClicked: control.itemClicked(model.url) 320 | } 321 | } 322 | } 323 | } 324 | 325 | -------------------------------------------------------------------------------- /src/widgets/views/SettingsDialog.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQuick.Controls 2.14 3 | import QtQml 2.14 4 | import QtQuick.Layouts 1.3 5 | 6 | import org.kde.kirigami 2.7 as Kirigami 7 | import org.kde.mauikit 1.2 as Maui 8 | 9 | Maui.SettingsDialog 10 | { 11 | Maui.SettingsSection 12 | { 13 | // alt: true 14 | title: i18n("Navigation") 15 | description: i18n("Configure the app plugins and behavior.") 16 | 17 | Maui.SettingTemplate 18 | { 19 | label1.text: i18n("Thumbnails") 20 | label2.text: i18n("Show previews of images, videos and PDF files") 21 | onClicked: settings.showThumbnails = ! settings.showThumbnails 22 | 23 | Switch 24 | { 25 | Layout.fillHeight: true 26 | checkable: true 27 | checked: settings.showThumbnails 28 | onToggled: settings.showThumbnails = ! settings.showThumbnails 29 | } 30 | } 31 | 32 | Maui.SettingTemplate 33 | { 34 | label1.text: i18n("Hidden Files") 35 | label2.text: i18n("List hidden files") 36 | onClicked: settings.showHiddenFiles = !settings.showHiddenFiles 37 | 38 | Switch 39 | { 40 | Layout.fillHeight: true 41 | checkable: true 42 | checked: settings.showHiddenFiles 43 | onToggled: settings.showHiddenFiles = !settings.showHiddenFiles 44 | } 45 | } 46 | 47 | Maui.SettingTemplate 48 | { 49 | label1.text: i18n("Single Click") 50 | label2.text: i18n("Open files with a single or double click") 51 | onClicked: settings.singleClick = !settings.singleClick 52 | 53 | Switch 54 | { 55 | Layout.fillHeight: true 56 | checkable: true 57 | checked: settings.singleClick 58 | onToggled: settings.singleClick = !settings.singleClick 59 | } 60 | } 61 | 62 | Maui.SettingTemplate 63 | { 64 | label1.text: i18n("Save Session") 65 | label2.text: i18n("Save and restore tabs") 66 | onClicked: settings.restoreSession = !settings.restoreSession 67 | 68 | Switch 69 | { 70 | Layout.fillHeight: true 71 | checkable: true 72 | checked: settings.restoreSession 73 | onToggled: settings.restoreSession = !settings.restoreSession 74 | } 75 | } 76 | 77 | Maui.SettingTemplate 78 | { 79 | label1.text: i18n("Preview Files") 80 | label2.text: i18n("Opens a quick preview with information of the file instead of opening it with an external application.") 81 | onClicked: settings.previewFiles = !settings.previewFiles 82 | 83 | Switch 84 | { 85 | Layout.fillHeight: true 86 | checkable: true 87 | checked: settings.previewFiles 88 | onToggled: settings.previewFiles = !settings.previewFiles 89 | } 90 | } 91 | 92 | Maui.SettingTemplate 93 | { 94 | label1.text: i18n("Split Views") 95 | label2.text: i18n("Support split views horizontally or vertically depending on the available space.") 96 | onClicked: settings.supportSplit = !settings.supportSplit 97 | 98 | Switch 99 | { 100 | Layout.fillHeight: true 101 | checkable: true 102 | checked: settings.supportSplit 103 | onToggled: settings.supportSplit = !settings.supportSplit 104 | } 105 | } 106 | } 107 | 108 | Maui.SettingsSection 109 | { 110 | // alt: false 111 | title: i18n("Sorting") 112 | description: i18n("Sorting order and behavior.") 113 | 114 | Maui.SettingTemplate 115 | { 116 | label1.text: i18n("Global Sorting") 117 | label2.text: i18n("Use the sorting preferences globally for all the tabs and splits.") 118 | onClicked: sortSettings.globalSorting = !sortSettings.globalSorting 119 | 120 | Switch 121 | { 122 | Layout.fillHeight: true 123 | checkable: true 124 | checked: sortSettings.globalSorting 125 | onToggled: sortSettings.globalSorting = !sortSettings.globalSorting 126 | } 127 | } 128 | 129 | Maui.SettingTemplate 130 | { 131 | enabled: sortSettings.globalSorting 132 | label1.text: i18n("Folders first") 133 | label2.text: i18n("Show folders first.") 134 | onClicked: sortSettings.foldersFirst = !sortSettings.foldersFirst 135 | 136 | Switch 137 | { 138 | Layout.fillHeight: true 139 | checkable: true 140 | checked: sortSettings.foldersFirst 141 | onToggled: sortSettings.foldersFirst = !sortSettings.foldersFirst 142 | } 143 | } 144 | 145 | Maui.SettingTemplate 146 | { 147 | enabled: sortSettings.globalSorting 148 | label1.text: i18n("Group") 149 | label2.text: i18n("Groups by the sort category.") 150 | onClicked: sortSettings.group = !sortSettings.group 151 | 152 | Switch 153 | { 154 | Layout.fillHeight: true 155 | checkable: true 156 | checked: sortSettings.group 157 | onToggled: sortSettings.group = !sortSettings.group 158 | } 159 | } 160 | 161 | Maui.SettingTemplate 162 | { 163 | enabled: sortSettings.globalSorting 164 | label1.text: i18n("Sorting by") 165 | label2.text: i18n("Change the sorting key.") 166 | 167 | Maui.ToolActions 168 | { 169 | expanded: true 170 | autoExclusive: true 171 | display: ToolButton.TextOnly 172 | 173 | Binding on currentIndex 174 | { 175 | value: switch(sortSettings.sortBy) 176 | { 177 | case Maui.FMList.LABEL: return 0; 178 | case Maui.FMList.MODIFIED: return 1; 179 | case Maui.FMList.SIZE: return 2; 180 | case Maui.FMList.TYPE: return 2; 181 | default: return -1; 182 | } 183 | restoreMode: Binding.RestoreValue 184 | } 185 | 186 | Action 187 | { 188 | text: i18n("Title") 189 | onTriggered: sortSettings.sortBy = Maui.FMList.LABEL 190 | } 191 | 192 | Action 193 | { 194 | text: i18n("Date") 195 | onTriggered: sortSettings.sortBy = Maui.FMList.MODIFIED 196 | } 197 | 198 | Action 199 | { 200 | text: i18n("Size") 201 | onTriggered: sortSettings.sortBy = Maui.FMList.SIZE 202 | } 203 | 204 | Action 205 | { 206 | text: i18n("Type") 207 | onTriggered: sortSettings.sortBy = Maui.FMList.MIME 208 | } 209 | } 210 | } 211 | 212 | Maui.SettingTemplate 213 | { 214 | enabled: sortSettings.globalSorting 215 | label1.text: i18n("Sort order") 216 | label2.text: i18n("Change the sorting order.") 217 | 218 | Maui.ToolActions 219 | { 220 | expanded: true 221 | autoExclusive: true 222 | display: ToolButton.IconOnly 223 | 224 | Binding on currentIndex 225 | { 226 | value: switch(sortSettings.sortOrder) 227 | { 228 | case Qt.AscendingOrder: return 0; 229 | case Qt.DescendingOrder: return 1; 230 | default: return -1; 231 | } 232 | restoreMode: Binding.RestoreValue 233 | } 234 | 235 | Action 236 | { 237 | text: i18n("Ascending") 238 | icon.name: "view-sort-ascending" 239 | onTriggered: sortSettings.sortOrder = Qt.AscendingOrder 240 | } 241 | 242 | Action 243 | { 244 | text: i18n("Descending") 245 | icon.name: "view-sort-descending" 246 | onTriggered: sortSettings.sortOrder = Qt.DescendingOrder 247 | } 248 | } 249 | } 250 | } 251 | 252 | Maui.SettingsSection 253 | { 254 | title: i18n("Interface") 255 | description: i18n("Configure the app UI.") 256 | lastOne: true 257 | 258 | Maui.SettingTemplate 259 | { 260 | label1.text: i18n("Grid Items Size") 261 | label2.text: i18n("Size of the grid and list view thumbnails.") 262 | 263 | Maui.ToolActions 264 | { 265 | expanded: true 266 | autoExclusive: true 267 | display: ToolButton.TextOnly 268 | 269 | currentIndex: appSettings.gridSize 270 | 271 | Action 272 | { 273 | text: i18n("S") 274 | onTriggered: appSettings.gridSize = 0 275 | } 276 | 277 | Action 278 | { 279 | text: i18n("M") 280 | onTriggered: appSettings.gridSize = 1 281 | } 282 | 283 | Action 284 | { 285 | text: i18n("L") 286 | onTriggered: appSettings.gridSize = 2 287 | } 288 | 289 | Action 290 | { 291 | text: i18n("X") 292 | onTriggered: appSettings.gridSize = 3 293 | } 294 | 295 | Action 296 | { 297 | text: i18n("XL") 298 | onTriggered: appSettings.gridSize = 4 299 | } 300 | } 301 | } 302 | 303 | Maui.SettingTemplate 304 | { 305 | label1.text: i18n("List Items Size") 306 | label2.text: i18n("Size of the grid and list view thumbnails.") 307 | 308 | Maui.ToolActions 309 | { 310 | expanded: true 311 | autoExclusive: true 312 | display: ToolButton.TextOnly 313 | 314 | currentIndex: appSettings.listSize 315 | 316 | Action 317 | { 318 | text: i18n("S") 319 | onTriggered: appSettings.listSize = 0 320 | } 321 | 322 | Action 323 | { 324 | text: i18n("M") 325 | onTriggered: appSettings.listSize = 1 326 | } 327 | 328 | Action 329 | { 330 | text: i18n("L") 331 | onTriggered: appSettings.listSize = 2 332 | } 333 | 334 | Action 335 | { 336 | text: i18n("X") 337 | onTriggered: appSettings.listSize = 3 338 | } 339 | 340 | Action 341 | { 342 | text: i18n("XL") 343 | onTriggered: appSettings.listSize = 4 344 | } 345 | } 346 | } 347 | 348 | Maui.SettingTemplate 349 | { 350 | label1.text: i18n("Overview") 351 | label2.text: i18n("Use overview mode as default on launch.") 352 | onClicked: settings.overview = !settings.overview 353 | 354 | Switch 355 | { 356 | Layout.fillHeight: true 357 | onClicked: settings.overview = !settings.overview 358 | } 359 | } 360 | 361 | Maui.SettingTemplate 362 | { 363 | label1.text: i18n("Dark Mode") 364 | enabled: false 365 | 366 | Switch 367 | { 368 | Layout.fillHeight: true 369 | } 370 | } 371 | } 372 | } 373 | -------------------------------------------------------------------------------- /src/widgets/views/TagsSection.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Slike Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.14 8 | import QtQuick.Controls 2.14 9 | import QtQuick.Layouts 1.3 10 | import org.kde.mauikit 1.3 as Maui 11 | import org.kde.kirigami 2.14 as Kirigami 12 | 13 | import TagsList 1.0 14 | 15 | ColumnLayout 16 | { 17 | 18 | Maui.SectionDropDown 19 | { 20 | id: _dropDown 21 | Layout.fillWidth: true 22 | label1.text: i18n("Tags") 23 | label2.text: i18n("Tagged files for quick access") 24 | checked: true 25 | template.iconSource: "tag" 26 | template.iconSizeHint: Maui.Style.iconSizes.medium 27 | } 28 | 29 | Maui.GridView 30 | { 31 | id: _tagsGrid 32 | Layout.fillWidth: true 33 | itemSize: 140 34 | itemHeight: Maui.Style.rowHeight * 2 35 | 36 | model: Maui.BaseModel 37 | { 38 | list: TagsList {urls: []; strict: false } 39 | } 40 | 41 | delegate: Item 42 | { 43 | width: _tagsGrid.cellWidth 44 | height: _tagsGrid.itemHeight 45 | 46 | Maui.ListBrowserDelegate 47 | { 48 | anchors.fill: parent 49 | anchors.margins: Maui.Style.space.medium 50 | 51 | iconSizeHint: Maui.Style.iconSizes.big 52 | label1.text: model.tag 53 | iconSource: model.icon 54 | iconVisible: true 55 | template.leftMargin: Maui.Style.space.small 56 | 57 | onClicked: 58 | { 59 | _tagsGrid.currentIndex = index 60 | openTab("tags:///"+model.tag) 61 | } 62 | 63 | background: Rectangle 64 | { 65 | color: Qt.tint(Kirigami.Theme.textColor, Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.9)) 66 | opacity: 0.8 67 | radius: Maui.Style.radiusV 68 | } 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/widgets/views/Terminal.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Nitrux Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.0 8 | import org.kde.mauikit 1.0 as Maui 9 | 10 | Maui.Terminal 11 | { 12 | id: control 13 | kterminal.colorScheme: "DarkPastels" 14 | onKeyPressed: 15 | { 16 | if ((event.key == Qt.Key_V) && (event.modifiers & Qt.ControlModifier) && (event.modifiers & Qt.ShiftModifier)) 17 | { 18 | kterminal.pasteClipboard() 19 | } 20 | 21 | if ((event.key == Qt.Key_C) && (event.modifiers & Qt.ControlModifier) && (event.modifiers & Qt.ShiftModifier)) 22 | { 23 | kterminal.copyClipboard() 24 | } 25 | 26 | if ((event.key == Qt.Key_F) && (event.modifiers & Qt.ControlModifier) && (event.modifiers & Qt.ShiftModifier)) 27 | { 28 | footBar.visible = !footBar.visible 29 | } 30 | } 31 | 32 | onTitleChanged: 33 | { 34 | // var path = "file://"+control.title.slice(control.title.indexOf(":")+1).trim(); 35 | // console.log("yea", path) 36 | // root.currentBrowser.currentPath = path; 37 | 38 | // if(Maui.FM.fileExists(path)) 39 | // { 40 | // root.currentBrowser.currentPath = path; 41 | // } 42 | } 43 | 44 | onUrlsDropped: 45 | { 46 | var str = "" 47 | for(var i in urls) 48 | str = str + urls[i].replace("file://", "")+ " " 49 | 50 | control.session.sendText(str) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/widgets/views/home/AudioCard.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQuick.Controls 2.14 3 | import QtQuick.Layouts 1.3 4 | import org.kde.kirigami 2.14 as Kirigami 5 | import org.kde.mauikit 1.2 as Maui 6 | import QtMultimedia 5.8 7 | 8 | Card 9 | { 10 | id: control 11 | 12 | property alias player : _player 13 | 14 | MediaPlayer 15 | { 16 | id: _player 17 | autoLoad: true 18 | } 19 | 20 | label1.text: player.metaData.title 21 | label2.text: player.metaData.albumArtist || player.metaData.albumTitle 22 | 23 | template.leftLabels.data: Slider 24 | { 25 | id: _slider 26 | visible: _player.playbackState === MediaPlayer.PlayingState 27 | Layout.fillWidth: true 28 | orientation: Qt.Horizontal 29 | from: 0 30 | to: 1000 31 | value: (1000 * _player.position) / _player.duration 32 | onMoved: _player.seek((_slider.value / 1000) * _player.duration) 33 | } 34 | 35 | template.content: ToolButton 36 | { 37 | flat: true 38 | icon.name: _player.playbackState === MediaPlayer.PlayingState ? "media-playback-pause" : "media-playback-start" 39 | onClicked: _player.playbackState === MediaPlayer.PlayingState ? _player.pause() : _player.play() 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/widgets/views/home/Card.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQuick.Controls 2.14 3 | import QtQuick.Layouts 1.3 4 | import org.kde.kirigami 2.14 as Kirigami 5 | import org.kde.mauikit 1.2 as Maui 6 | import QtGraphicalEffects 1.0 7 | 8 | Maui.ItemDelegate 9 | { 10 | id: control 11 | 12 | property alias label1 : _template.label1 13 | property alias label2 : _template.label2 14 | property alias label3 : _template.label3 15 | property alias iconSource : _template.iconSource 16 | property alias iconSizeHint: _template.iconSizeHint 17 | property alias template : _template 18 | property alias checkable: _template.checkable 19 | 20 | background: Rectangle 21 | { 22 | radius: Maui.Style.radiusV 23 | color: Qt.tint(control.Kirigami.Theme.textColor, Qt.rgba(control.Kirigami.Theme.backgroundColor.r, control.Kirigami.Theme.backgroundColor.g, control.Kirigami.Theme.backgroundColor.b, 0.9)) 24 | 25 | border.color: control.isCurrentItem || control.hovered ? Kirigami.Theme.highlightColor : "transparent" 26 | 27 | } 28 | 29 | Rectangle 30 | { 31 | id: _iconRec 32 | opacity: 0.3 33 | anchors.fill: parent 34 | color: Kirigami.Theme.backgroundColor 35 | clip: true 36 | 37 | FastBlur 38 | { 39 | id: fastBlur 40 | height: parent.height * 2 41 | width: parent.width * 2 42 | anchors.centerIn: parent 43 | source: _template.iconItem 44 | radius: 64 45 | transparentBorder: true 46 | cached: true 47 | } 48 | 49 | Rectangle 50 | { 51 | anchors.fill: parent 52 | opacity: 0.5 53 | color: Qt.tint(control.Kirigami.Theme.textColor, Qt.rgba(control.Kirigami.Theme.backgroundColor.r, control.Kirigami.Theme.backgroundColor.g, control.Kirigami.Theme.backgroundColor.b, 0.9)) 54 | } 55 | } 56 | 57 | OpacityMask 58 | { 59 | source: mask 60 | maskSource: _iconRec 61 | } 62 | 63 | LinearGradient 64 | { 65 | id: mask 66 | anchors.fill: parent 67 | gradient: Gradient { 68 | GradientStop { position: 0.2; color: "transparent"} 69 | GradientStop { position: 0.5; color: control.background.color} 70 | } 71 | 72 | start: Qt.point(0, 0) 73 | end: Qt.point(_iconRec.width, _iconRec.height) 74 | } 75 | 76 | Maui.ListItemTemplate 77 | { 78 | id: _template 79 | anchors.fill: parent 80 | label1.font.pointSize: Maui.Style.fontSizes.big 81 | label1.font.weight: Font.Bold 82 | label1.font.bold: true 83 | } 84 | 85 | Rectangle 86 | { 87 | Kirigami.Theme.inherit: false 88 | anchors.fill: parent 89 | color: "transparent" 90 | radius: Maui.Style.radiusV 91 | border.color: control.isCurrentItem || control.hovered ? Kirigami.Theme.highlightColor : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.2) 92 | 93 | Rectangle 94 | { 95 | anchors.fill: parent 96 | color: "transparent" 97 | radius: parent.radius - 0.5 98 | border.color: Qt.lighter(Kirigami.Theme.backgroundColor, 2) 99 | opacity: 0.2 100 | anchors.margins: 1 101 | } 102 | } 103 | 104 | layer.enabled: true 105 | layer.effect: OpacityMask 106 | { 107 | maskSource: Item 108 | { 109 | width: control.width 110 | height: control.height 111 | 112 | Rectangle 113 | { 114 | anchors.fill: parent 115 | radius: Maui.Style.radiusV 116 | } 117 | } 118 | } 119 | 120 | } 121 | -------------------------------------------------------------------------------- /src/widgets/views/home/ImageCard.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQuick.Controls 2.14 3 | import QtQuick.Layouts 1.3 4 | import org.kde.kirigami 2.14 as Kirigami 5 | import org.kde.mauikit 1.2 as Maui 6 | 7 | Maui.ItemDelegate 8 | { 9 | id: control 10 | 11 | property alias template : _template 12 | property alias imageSource: _template.imageSource 13 | 14 | Maui.GridItemTemplate 15 | { 16 | id: _template 17 | anchors.fill: parent 18 | labelsVisible: false 19 | imageSizeHint: height 20 | fillMode: Image.PreserveAspectCrop 21 | // imageWidth: width 22 | imageHeight: height 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/widgets/views/home/QuickCommonSection.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Camilo Higuita 2 | // Copyright 2020 Slike Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | import QtQuick 2.14 7 | import QtQuick.Controls 2.14 8 | import QtQuick.Layouts 1.3 9 | import org.kde.mauikit 1.3 as Maui 10 | import org.kde.kirigami 2.14 as Kirigami 11 | import org.maui.index 1.0 as Index 12 | import Qt.labs.platform 1.1 13 | 14 | ColumnLayout 15 | { 16 | id: control 17 | 18 | Maui.SectionDropDown 19 | { 20 | id: _dropDown 21 | Layout.fillWidth: true 22 | label1.text: i18n("Collections") 23 | label1.font.pointSize: Maui.Style.fontSizes.huge 24 | label2.text: i18n("Quick access to common collections") 25 | checked: true 26 | } 27 | 28 | Maui.GridView 29 | { 30 | id: _recentGrid 31 | Layout.fillWidth: true 32 | enableLassoSelection: true 33 | visible: _dropDown.checked 34 | itemSize: 180 35 | itemHeight: 180 36 | 37 | model: ["camera", "screenshots", "videos", "fonts", "applications"] 38 | 39 | delegate: Item 40 | { 41 | property bool isCurrentItem : GridView.isCurrentItem 42 | width: _recentGrid.cellWidth 43 | height: _recentGrid.itemHeight 44 | 45 | Index.RecentFiles 46 | { 47 | id: _collectionFiles 48 | url: StandardPaths.writableLocation(StandardPaths.PicturesLocation) 49 | filters: Maui.FM.nameFilters(Maui.FMList.IMAGE) 50 | // onUrlsChanged: _collage.urls = urls 51 | } 52 | Maui.GalleryRollItem 53 | { 54 | id:_collage 55 | anchors.fill: parent 56 | anchors.margins: Maui.Style.space.medium 57 | 58 | template.label1.text: modelData 59 | // iconSource: model.icon 60 | // imageSource: model.thumbnail 61 | // template.fillMode: Image.PreserveAspectFit 62 | // iconSizeHint: height * 0.4 63 | // checkable: selectionMode 64 | 65 | onClicked: console.log(images) 66 | 67 | images: _collectionFiles.urls 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/widgets/views/home/SystemInfo.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2020 Camilo Higuita 2 | // Copyright 2018-2020 Slike Latinoamericana S.C. 3 | // 4 | // SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | 7 | import QtQuick 2.14 8 | import QtQuick.Controls 2.14 9 | import QtQuick.Layouts 1.3 10 | import org.kde.mauikit 1.3 as Maui 11 | import org.kde.kirigami 2.14 as Kirigami 12 | import Qt.labs.platform 1.1 13 | import QtGraphicalEffects 1.0 14 | 15 | import org.maui.index 1.0 as Index 16 | 17 | Maui.ListBrowser 18 | { 19 | id: control 20 | orientation: ListView.Horizontal 21 | implicitHeight: 260 22 | verticalScrollBarPolicy: ScrollBar.AlwaysOff 23 | // horizontalScrollBarPolicy: ScrollBar.AlwaysOff 24 | 25 | model: [StandardPaths.writableLocation(StandardPaths.MusicLocation), StandardPaths.writableLocation(StandardPaths.DownloadLocation), StandardPaths.writableLocation(StandardPaths.MoviesLocation), StandardPaths.writableLocation(StandardPaths.DocumentsLocation)] 26 | 27 | delegate: Maui.ItemDelegate 28 | { 29 | id: _delegate 30 | property bool isCurrentItem : ListView.isCurrentItem 31 | anchors.verticalCenter: parent.verticalCenter 32 | width: 250 33 | height: _layout.implicitHeight + Maui.Style.space.huge 34 | // color: Kirigami.Theme.backgroundColor 35 | // radius: Maui.Style.radiusV 36 | 37 | property var info : Maui.FM.getFileInfo(modelData) 38 | 39 | background: Item {} 40 | 41 | onClicked: openTab(modelData) 42 | 43 | Index.DirInfo 44 | { 45 | id: _dirInfo 46 | url: modelData 47 | } 48 | 49 | Rectangle 50 | { 51 | id: _iconRec 52 | opacity: 0.3 53 | anchors.fill: parent 54 | color: Kirigami.Theme.backgroundColor 55 | clip: true 56 | 57 | FastBlur 58 | { 59 | id: fastBlur 60 | height: parent.height * 2 61 | width: parent.width * 2 62 | anchors.centerIn: parent 63 | source: _icon 64 | radius: 64 65 | transparentBorder: true 66 | cached: true 67 | } 68 | 69 | Rectangle 70 | { 71 | anchors.fill: parent 72 | opacity: 0.5 73 | color: Qt.tint(control.Kirigami.Theme.textColor, Qt.rgba(control.Kirigami.Theme.backgroundColor.r, control.Kirigami.Theme.backgroundColor.g, control.Kirigami.Theme.backgroundColor.b, 0.9)) 74 | } 75 | } 76 | 77 | OpacityMask 78 | { 79 | source: mask 80 | maskSource: _iconRec 81 | } 82 | 83 | LinearGradient 84 | { 85 | id: mask 86 | anchors.fill: parent 87 | gradient: Gradient { 88 | GradientStop { position: 0.2; color: "transparent"} 89 | GradientStop { position: 0.5; color: _iconRec.color} 90 | } 91 | 92 | start: Qt.point(0, 0) 93 | end: Qt.point(_iconRec.width, _iconRec.height) 94 | } 95 | 96 | ColumnLayout 97 | { 98 | anchors.fill: parent 99 | anchors.margins: Maui.Style.space.big 100 | id: _layout 101 | 102 | Kirigami.Icon 103 | { 104 | id: _icon 105 | Layout.leftMargin: Maui.Style.space.medium 106 | implicitHeight: Maui.Style.iconSizes.big 107 | implicitWidth: height 108 | source: info.icon 109 | } 110 | 111 | Maui.FlexListItem 112 | { 113 | Layout.fillWidth: true 114 | label1.font.pointSize: Maui.Style.fontSizes.huge 115 | label1.font.weight: Font.Bold 116 | label1.font.bold: true 117 | label1.text: info.label 118 | label2.text: i18n("%1 Directories - %2 Files", _dirInfo.dirCount, _dirInfo.filesCount) 119 | 120 | Rectangle 121 | { 122 | radius: Maui.Style.radiusV 123 | color: "#333" 124 | Layout.preferredWidth: _sizeLabel.implicitWidth + Maui.Style.space.big 125 | implicitHeight: 36 126 | 127 | Label 128 | { 129 | id: _sizeLabel 130 | font.pointSize: Maui.Style.fontSizes.huge 131 | font.bold: true 132 | font.weight: Font.Bold 133 | anchors.centerIn: parent 134 | text: _dirInfo.sizeString 135 | color: "#fafafa" 136 | } 137 | } 138 | } 139 | 140 | ProgressBar 141 | { 142 | Layout.fillWidth: true 143 | value: Math.round((_dirInfo.size * 100) / _dirInfo.totalSpace) 144 | from: 0 145 | to : 100 146 | } 147 | } 148 | 149 | layer.enabled: true 150 | layer.effect: OpacityMask 151 | { 152 | maskSource: Item 153 | { 154 | width: _delegate.width 155 | height: _delegate.height 156 | 157 | Rectangle 158 | { 159 | anchors.fill: parent 160 | radius: Maui.Style.radiusV 161 | } 162 | } 163 | } 164 | 165 | Rectangle 166 | { 167 | Kirigami.Theme.inherit: false 168 | anchors.fill: parent 169 | color: "transparent" 170 | radius: Maui.Style.radiusV 171 | border.color: _delegate.isCurrentItem || _delegate.hovered ? Kirigami.Theme.highlightColor : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.2) 172 | 173 | Rectangle 174 | { 175 | anchors.fill: parent 176 | color: "transparent" 177 | radius: parent.radius - 0.5 178 | border.color: Qt.lighter(Kirigami.Theme.backgroundColor, 2) 179 | opacity: 0.2 180 | anchors.margins: 1 181 | } 182 | } 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /windows_files/README: -------------------------------------------------------------------------------- 1 | Shows how to add an entry to the Windows start menu. 2 | 3 | Generate installer with 4 | 5 | binarycreator --offline-only -c config/config.xml -p packages installer 6 | C:\Qt\QtIFW2.0.1\bin\binarycreator.exe --offline-only -c config\config.xml -p packages VvaveInstaller.exe 7 | -------------------------------------------------------------------------------- /windows_files/config/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Index 4 | 1.2.0 5 | Index File Manager 6 | Maui 7 | Index 8 | @ApplicationsDir@/Index 9 | 10 | -------------------------------------------------------------------------------- /windows_files/index.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauikit/index/547464bffb56a16ef4bcac7809dc1149cdf275c0/windows_files/index.ico -------------------------------------------------------------------------------- /windows_files/packages/org.maui.index/meta/installscript.qs: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | ** 3 | ** Copyright (C) 2015 The Qt Company Ltd. 4 | ** Contact: http://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the Qt Installer Framework. 7 | ** 8 | ** $QT_BEGIN_LICENSE:LGPL$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see http://qt.io/terms-conditions. For further 15 | ** information use the contact form at http://www.qt.io/contact-us. 16 | ** 17 | ** GNU Lesser General Public License Usage 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser 19 | ** General Public License version 2.1 or version 3 as published by the Free 20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and 21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the 22 | ** following information to ensure the GNU Lesser General Public License 23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and 24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 25 | ** 26 | ** As a special exception, The Qt Company gives you certain additional 27 | ** rights. These rights are described in The Qt Company LGPL Exception 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 29 | ** 30 | ** 31 | ** $QT_END_LICENSE$ 32 | ** 33 | **************************************************************************/ 34 | 35 | function Component() 36 | { 37 | // default constructor 38 | } 39 | 40 | Component.prototype.createOperations = function() 41 | { 42 | component.createOperations(); 43 | if (systemInfo.productType === "windows") { 44 | component.addOperation("CreateShortcut", 45 | "@TargetDir@/index.exe",// target 46 | "@DesktopDir@/Index.lnk",// link-path 47 | "workingDirectory=@TargetDir@",// working-dir 48 | "iconPath=@TargetDir@/index.ico", "iconId=0",// icon 49 | "description=File Manager");// description 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /windows_files/packages/org.maui.index/meta/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Index 4 | Index File Manager 5 | 1.2.0 6 | 2020-11-20 7 | 8 | 9 | 10 | true 11 | 12 | 13 | --------------------------------------------------------------------------------