diff --git a/src/controls/ListItemTemplate.qml b/src/controls/ListItemTemplate.qml new file mode 100644 index 0000000..68dfe53 --- /dev/null +++ b/src/controls/ListItemTemplate.qml @@ -0,0 +1,208 @@ +/* + * Copyright 2018 Camilo Higuita + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.9 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.3 +import QtGraphicalEffects 1.0 + +import org.kde.kirigami 2.7 as Kirigami +import org.kde.mauikit 1.0 as Maui + +Item +{ + id: control + + property alias label1 : _label1 + property alias label2 : _label2 + property alias label3 : _label3 + property alias label4 : _label4 + property alias iconItem : _iconLoader.item + property alias iconVisible : _iconContainer.visible + property int iconSizeHint : Maui.Style.iconSizes.big + property string imageSource + property string iconSource + + Component + { + id: _imgComponent + + Item + { + anchors.fill: parent + Image + { + id: img + anchors.centerIn: parent + source: control.imageSource + height: Math.min(parent.height, control.iconSizeHint) + width: height + sourceSize.width: width + sourceSize.height: height + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + fillMode: Image.PreserveAspectCrop + cache: false + asynchronous: true + smooth: !Kirigami.Settings.isMobile + + layer.enabled: true + layer.effect: OpacityMask + { + maskSource: Item + { + width: img.width + height: img.height + Rectangle + { + anchors.centerIn: parent + width: img.width + height: img.height + radius: Maui.Style.radiusV + } + } + } + } + + Loader + { + anchors.centerIn: parent + sourceComponent: img.status === Image.Ready ? undefined : _iconComponent + } + } + } + + + Component + { + id: _iconComponent + + Kirigami.Icon + { + source: control.iconSource + anchors.centerIn: parent + fallback: "qrc:/assets/application-x-zerosize.svg" + height: Math.min(parent.height, control.iconSizeHint) + width: height + } + } + + + RowLayout + { + id: _layout + anchors.fill: parent + + spacing: Maui.Style.space.small + + Item + { + id: _iconContainer + visible: (control.width > Kirigami.Units.gridUnit * 15) + Layout.preferredWidth: Math.max(control.height, control.iconSizeHint) + Layout.fillHeight: true + + Loader + { + id: _iconLoader + anchors.fill: parent + anchors.margins: Maui.Style.space.tiny + sourceComponent: control.imageSource ? _imgComponent : (control.iconSource ? _iconComponent : undefined) + } + } + + + ColumnLayout + { + Layout.fillHeight: visible + Layout.fillWidth: visible + Layout.margins: Maui.Style.space.small + + Label + { + id: _label1 + visible: text.length + Layout.fillWidth: visible + Layout.fillHeight: visible + verticalAlignment: _label2.visible ? Qt.AlignBottom : Qt.AlignVCenter + + elide: Text.ElideMiddle + wrapMode: Text.NoWrap + color: control.Kirigami.Theme.textColor + font.weight: Font.Normal + font.pointSize: Maui.Style.fontSizes.default + } + + Label + { + id: _label2 + visible: text.length + Layout.fillWidth: visible + Layout.fillHeight: visible + font.weight: Font.Normal + font.pointSize: Maui.Style.fontSizes.medium + wrapMode: Text.NoWrap + verticalAlignment: _label1.visible ? Qt.AlignTop : Qt.AlignVCenter + elide: Text.ElideRight + color: control.Kirigami.Theme.textColor + opacity: control.isCurrentItem || hovered ? 0.8 : 0.6 + } + } + + ColumnLayout + { + visible: control.width > Kirigami.Units.gridUnit * 30 + Layout.fillHeight: visible + Layout.fillWidth: visible + Layout.margins: Maui.Style.space.small + + Label + { + id: _label3 + visible: text.length > 0 + Layout.fillHeight: visible + Layout.fillWidth: visible + Layout.alignment: Qt.AlignRight + horizontalAlignment: Qt.AlignRight + font.pointSize: Maui.Style.fontSizes.small + font.weight: Font.Light + wrapMode: Text.WrapAnywhere + elide: Text.ElideMiddle + color: control.Kirigami.Theme.textColor + } + + Label + { + id: _label4 + visible: text.length > 0 + Layout.fillHeight: visible + Layout.fillWidth: visible + Layout.alignment: Qt.AlignRight + horizontalAlignment: Qt.AlignRight + font.pointSize: Maui.Style.fontSizes.small + font.weight: Font.Light + wrapMode: Text.WrapAnywhere + elide: Text.ElideMiddle + color: control.Kirigami.Theme.textColor + } + + } + } + +} diff --git a/src/controls/SwipeBrowserDelegate.qml b/src/controls/SwipeBrowserDelegate.qml index 89844f4..5e7ce60 100644 --- a/src/controls/SwipeBrowserDelegate.qml +++ b/src/controls/SwipeBrowserDelegate.qml @@ -1,221 +1,48 @@ /* * Copyright 2018 Camilo Higuita * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.9 import QtQuick.Layouts 1.3 import QtQuick.Controls 2.3 import QtGraphicalEffects 1.0 import org.kde.kirigami 2.7 as Kirigami import org.kde.mauikit 1.0 as Maui Maui.SwipeItemDelegate { id: control - property alias label1 : _label1 - property alias label2 : _label2 - property alias label3 : _label3 - property alias label4 : _label4 - property alias iconItem : _iconLoader.item - property alias iconVisible : _iconContainer.visible - property int iconSizeHint : Maui.Style.iconSizes.big - property string imageSource - property string iconSource - - Component - { - id: _imgComponent - - Item - { - anchors.fill: parent - Image - { - id: img - anchors.centerIn: parent - source: control.imageSource - height: Math.min(parent.height, control.iconSizeHint) - width: height - sourceSize.width: width - sourceSize.height: height - horizontalAlignment: Qt.AlignHCenter - verticalAlignment: Qt.AlignVCenter - fillMode: Image.PreserveAspectCrop - cache: false - asynchronous: true - smooth: !Kirigami.Settings.isMobile - - layer.enabled: true - layer.effect: OpacityMask - { - maskSource: Item - { - width: img.width - height: img.height - Rectangle - { - anchors.centerIn: parent - width: img.width - height: img.height - radius: Maui.Style.radiusV - } - } - } - } - - Loader - { - anchors.centerIn: parent - sourceComponent: img.status === Image.Ready ? undefined : _iconComponent - } - } - } - - - Component - { - id: _iconComponent - - Kirigami.Icon - { - source: control.iconSource - anchors.centerIn: parent - fallback: "qrc:/assets/application-x-zerosize.svg" - height: Math.min(parent.height, control.iconSizeHint) - width: height - } - } - - - RowLayout - { - id: _layout - anchors.fill: parent - spacing: Maui.Style.space.small - - Item - { - id: _iconContainer - visible: (control.width > Kirigami.Units.gridUnit * 10) - Layout.preferredWidth: control.iconSizeHint - Layout.fillHeight: true - - Loader - { - id: _iconLoader - anchors.fill: parent - anchors.margins: Maui.Style.space.tiny - sourceComponent: control.imageSource ? _imgComponent : (control.iconSource ? _iconComponent : undefined) - } - - DropShadow - { - anchors.fill: _iconLoader - - horizontalOffset: 0 - verticalOffset: 0 - radius: 8.0 - samples: 17 - color: "#80000000" - source: _iconLoader - } - } - - - ColumnLayout - { - - Layout.fillHeight: visible - Layout.fillWidth: visible - Layout.topMargin: Maui.Style.space.small - Layout.bottomMargin: Maui.Style.space.small - Layout.leftMargin: _iconContainer.visible ? 0 : Maui.Style.space.small - Label - { - id: _label1 - visible: text.length - Layout.fillWidth: visible - Layout.fillHeight: visible - verticalAlignment: _label2.visible ? Qt.AlignBottom : Qt.AlignVCenter - - elide: Text.ElideMiddle - wrapMode: Text.NoWrap - color: control.Kirigami.Theme.textColor - font.weight: Font.Normal - font.pointSize: Maui.Style.fontSizes.default - } - - Label - { - id: _label2 - visible: text.length - Layout.fillWidth: visible - Layout.fillHeight: visible - font.weight: Font.Normal - font.pointSize: Maui.Style.fontSizes.medium - wrapMode: Text.NoWrap - verticalAlignment: _label1.visible ? Qt.AlignTop : Qt.AlignVCenter - elide: Text.ElideRight - color: control.Kirigami.Theme.textColor - opacity: control.isCurrentItem || hovered ? 0.8 : 0.6 - } - } - - ColumnLayout - { - visible: control.width > Kirigami.Units.gridUnit * 30 - Layout.fillHeight: visible - Layout.fillWidth: visible - Layout.margins: Maui.Style.space.small - - Label - { - id: _label3 - visible: text.length > 0 - Layout.fillHeight: visible - Layout.fillWidth: visible - Layout.alignment: Qt.AlignRight - horizontalAlignment: Qt.AlignRight - font.pointSize: Maui.Style.fontSizes.small - font.weight: Font.Light - wrapMode: Text.WrapAnywhere - elide: Text.ElideMiddle - color: control.Kirigami.Theme.textColor - } - - Label - { - id: _label4 - visible: text.length > 0 - Layout.fillHeight: visible - Layout.fillWidth: visible - Layout.alignment: Qt.AlignRight - horizontalAlignment: Qt.AlignRight - font.pointSize: Maui.Style.fontSizes.small - font.weight: Font.Light - wrapMode: Text.WrapAnywhere - elide: Text.ElideMiddle - color: control.Kirigami.Theme.textColor - } - - } - } + property alias label1 : _template.label1 + property alias label2 : _template.label2 + property alias label3 : _template.label3 + property alias label4 : _template.label4 + property alias iconItem : _template.iconItem + property alias iconVisible : _template.iconVisible + property alias iconSizeHint : _template.iconSizeHint + property alias imageSource : _template.imageSource + property alias iconSource : _template.iconSource + + Maui.ListItemTemplate + { + id: _template + anchors.fill: parent + } } diff --git a/src/controls/qmldir b/src/controls/qmldir index 1611209..6695187 100644 --- a/src/controls/qmldir +++ b/src/controls/qmldir @@ -1,61 +1,62 @@ module org.kde.mauikit plugin MauiKit classname MauiKit depends QtQuick.Controls 1.4 depends QtQuick.Controls.Private 1.0 depends QtQuick.Controls 2.0 depends QtGraphicalEffects 1.0 designersupported typeinfo plugins.qmltypes singleton Style 1.0 Style.qml ApplicationWindow 1.0 ApplicationWindow.qml ToolBar 1.0 ToolBar.qml Page 1.0 Page.qml ShareDialog 1.0 ShareDialog.qml PieButton 1.0 PieButton.qml SideBar 1.0 SideBar.qml AbstractSideBar 1.0 AbstractSideBar.qml GlobalDrawer 1.0 GlobalDrawer.qml ListDelegate 1.0 ListDelegate.qml ItemDelegate 1.0 ItemDelegate.qml SwipeItemDelegate 1.0 SwipeItemDelegate.qml SwipeBrowserDelegate 1.0 SwipeBrowserDelegate.qml ListBrowserDelegate 1.0 ListBrowserDelegate.qml GridBrowserDelegate 1.0 GridBrowserDelegate.qml SelectionBar 1.0 SelectionBar.qml LabelDelegate 1.0 LabelDelegate.qml NewDialog 1.0 NewDialog.qml TagsBar 1.0 TagsBar.qml TagsDialog 1.0 TagsDialog.qml Taglist 1.0 private/TagList.qml GridBrowser 1.0 GridBrowser.qml ListBrowser 1.0 ListBrowser.qml FileBrowser 1.0 FileBrowser.qml FilePreviewer 1.0 FilePreviewer.qml FileDialog 1.0 FileDialog.qml PlacesSidebar 1.0 PlacesSidebar.qml PlacesListBrowser 1.0 PlacesListBrowser.qml PathBar 1.0 PathBar.qml Dialog 1.0 Dialog.qml Popup 1.0 Popup.qml AboutDialog 1.0 AboutDialog.qml TextField 1.0 TextField.qml Badge 1.0 Badge.qml GridView 1.0 GridView.qml Terminal 1.0 Terminal.qml SyncDialog 1.0 SyncDialog.qml SyncDialog 1.0 SyncDialogA.qml Editor 1.0 Editor.qml ColorsBar 1.0 ColorsBar.qml Holder 1.0 Holder.qml ImageViewer 1.0 ImageViewer.qml TabBar 1.0 TabBar.qml TabButton 1.0 TabButton.qml ActionGroup 1.0 ActionGroup.qml ActionSideBar 1.0 ActionSideBar.qml ToolActions 1.0 ToolActions.qml DocumentPreview 1.0 DocumentPreview.qml ToolButtonMenu 1.0 ToolButtonMenu.qml +ListItemTemplate 1.0 ListItemTemplate.qml diff --git a/src/mauikit.cpp b/src/mauikit.cpp index 4ee17ff..144692c 100644 --- a/src/mauikit.cpp +++ b/src/mauikit.cpp @@ -1,232 +1,233 @@ /* * Copyright 2018 Camilo Higuita * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mauikit.h" #include #include "handy.h" #include "mauimodel.h" #include "mauilist.h" #include "pathlist.h" #include "mauiapp.h" #include "fmstatic.h" #ifdef COMPONENT_ACCOUNTS #include "mauiaccounts.h" #endif #ifdef COMPONENT_FM #include "fm.h" #include "placeslist.h" #include "fmlist.h" #endif #ifdef COMPONENT_TAGGING #include "tagsmodel.h" #include "tagslist.h" #endif #ifdef COMPONENT_STORE #include "storemodel.h" #include "storelist.h" #endif #ifdef COMPONENT_EDITOR #include "documenthandler.h" #include "syntaxhighlighterutil.h" #ifdef STATIC_MAUIKIT #include "kquicksyntaxhighlighter/kquicksyntaxhighlighter.h" #endif #endif #ifdef Q_OS_ANDROID #include "mauiandroid.h" #else #include "mauikde.h" #endif #if defined Q_OS_ANDROID || defined APPIMAGE_PACKAGE || defined MAUIKIT_STYLE #include #include #endif QUrl MauiKit::componentUrl(const QString &fileName) const { #ifdef MAUI_APP return QUrl(QStringLiteral("qrc:/maui/kit/") + fileName); #else return QUrl(resolveFileUrl(fileName)); #endif } void MauiKit::registerTypes(const char *uri) { Q_ASSERT(uri == QLatin1String("org.kde.mauikit")); qmlRegisterSingletonType(componentUrl(QStringLiteral("Style.qml")), uri, 1, 0, "Style"); qmlRegisterType(componentUrl(QStringLiteral("ToolBar.qml")), uri, 1, 0, "ToolBar"); qmlRegisterType(componentUrl(QStringLiteral("ApplicationWindow.qml")), uri, 1, 0, "ApplicationWindow"); qmlRegisterType(componentUrl(QStringLiteral("Page.qml")), uri, 1, 0, "Page"); qmlRegisterType(componentUrl(QStringLiteral("ShareDialog.qml")), uri, 1, 0, "ShareDialog"); qmlRegisterType(componentUrl(QStringLiteral("PieButton.qml")), uri, 1, 0, "PieButton"); qmlRegisterType(componentUrl(QStringLiteral("SideBar.qml")), uri, 1, 0, "SideBar"); qmlRegisterType(componentUrl(QStringLiteral("AbstractSideBar.qml")), uri, 1, 0, "AbstractSideBar"); qmlRegisterType(componentUrl(QStringLiteral("Holder.qml")), uri, 1, 0, "Holder"); qmlRegisterType(componentUrl(QStringLiteral("GlobalDrawer.qml")), uri, 1, 0, "GlobalDrawer"); qmlRegisterType(componentUrl(QStringLiteral("ListDelegate.qml")), uri, 1, 0, "ListDelegate"); qmlRegisterType(componentUrl(QStringLiteral("ListBrowserDelegate.qml")), uri, 1, 0, "ListBrowserDelegate"); qmlRegisterType(componentUrl(QStringLiteral("SwipeItemDelegate.qml")), uri, 1, 0, "SwipeItemDelegate"); qmlRegisterType(componentUrl(QStringLiteral("SwipeBrowserDelegate.qml")), uri, 1, 0, "SwipeBrowserDelegate"); qmlRegisterType(componentUrl(QStringLiteral("ItemDelegate.qml")), uri, 1, 0, "ItemDelegate"); qmlRegisterType(componentUrl(QStringLiteral("GridBrowserDelegate.qml")), uri, 1, 0, "GridBrowserDelegate"); qmlRegisterType(componentUrl(QStringLiteral("SelectionBar.qml")), uri, 1, 0, "SelectionBar"); qmlRegisterType(componentUrl(QStringLiteral("LabelDelegate.qml")), uri, 1, 0, "LabelDelegate"); qmlRegisterType(componentUrl(QStringLiteral("NewDialog.qml")), uri, 1, 0, "NewDialog"); qmlRegisterType(componentUrl(QStringLiteral("Dialog.qml")), uri, 1, 0, "Dialog"); qmlRegisterType(componentUrl(QStringLiteral("AboutDialog.qml")), uri, 1, 0, "AboutDialog"); qmlRegisterType(componentUrl(QStringLiteral("Popup.qml")), uri, 1, 0, "Popup"); qmlRegisterType(componentUrl(QStringLiteral("TextField.qml")), uri, 1, 0, "TextField"); qmlRegisterType(componentUrl(QStringLiteral("Badge.qml")), uri, 1, 0, "Badge"); qmlRegisterType(componentUrl(QStringLiteral("GridView.qml")), uri, 1, 0, "GridView"); qmlRegisterType(componentUrl(QStringLiteral("ColorsBar.qml")), uri, 1, 0, "ColorsBar"); qmlRegisterType(componentUrl(QStringLiteral("ImageViewer.qml")), uri, 1, 0, "ImageViewer"); qmlRegisterType(componentUrl(QStringLiteral("TabBar.qml")), uri, 1, 0, "TabBar"); qmlRegisterType(componentUrl(QStringLiteral("TabButton.qml")), uri, 1, 0, "TabButton"); qmlRegisterType(componentUrl(QStringLiteral("ActionGroup.qml")), uri, 1, 0, "ActionGroup"); qmlRegisterType(componentUrl(QStringLiteral("ActionSideBar.qml")), uri, 1, 0, "ActionSideBar"); qmlRegisterType(componentUrl(QStringLiteral("ToolActions.qml")), uri, 1, 0, "ToolActions"); - qmlRegisterType(componentUrl(QStringLiteral("ToolButtonMenu.qml")), uri, 1, 0, "ToolButtonMenu"); - + qmlRegisterType(componentUrl(QStringLiteral("ToolButtonMenu.qml")), uri, 1, 0, "ToolButtonMenu"); + qmlRegisterType(componentUrl(QStringLiteral("ListItemTemplate.qml")), uri, 1, 0, "ListItemTemplate"); + qmlRegisterType(componentUrl(QStringLiteral("PathBar.qml")), uri, 1, 0, "PathBar"); qmlRegisterType(uri, 1, 0, "PathList"); /** STORE CONTROLS, MODELS AND INTERFACES **/ #ifdef COMPONENT_STORE qmlRegisterType("StoreList", 1, 0, "StoreList"); qmlRegisterType("StoreModel", 1, 0, "StoreModel"); qmlRegisterType(componentUrl(QStringLiteral("private/StoreDelegate.qml")), uri, 1, 0, "StoreDelegate"); qmlRegisterType(componentUrl(QStringLiteral("Store.qml")), uri, 1, 0, "Store"); #endif /** BROWSING CONTROLS **/ qmlRegisterType(componentUrl(QStringLiteral("ListBrowser.qml")), uri, 1, 0, "ListBrowser"); qmlRegisterType(componentUrl(QStringLiteral("GridBrowser.qml")), uri, 1, 0, "GridBrowser"); /** FM CONTROLS, MODELS AND INTERFACES **/ #ifdef COMPONENT_FM qmlRegisterType(uri, 1, 0, "PlacesList"); qmlRegisterType(uri, 1, 0, "FMList"); qmlRegisterSingletonType(uri, 1, 0, "FM", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* { Q_UNUSED(engine) Q_UNUSED(scriptEngine) return new FMStatic; }); // qmlRegisterSingletonType(componentUrl(QStringLiteral("private/FileBrowser.qml")), uri, 1, 0, "FileMenu"); qmlRegisterType(componentUrl(QStringLiteral("FileBrowser.qml")), uri, 1, 0, "FileBrowser"); qmlRegisterType(componentUrl(QStringLiteral("PlacesSidebar.qml")), uri, 1, 0, "PlacesSidebar"); qmlRegisterType(componentUrl(QStringLiteral("PlacesListBrowser.qml")), uri, 1, 0, "PlacesListBrowser"); qmlRegisterType(componentUrl(QStringLiteral("FilePreviewer.qml")), uri, 1, 0, "FilePreviewer"); qmlRegisterType(componentUrl(QStringLiteral("FileDialog.qml")), uri, 1, 0, "FileDialog"); #endif #ifdef COMPONENT_EDITOR /** EDITOR CONTROLS **/ qmlRegisterType(uri, 1, 0, "DocumentHandler"); qmlRegisterType(); qmlRegisterType(componentUrl(QStringLiteral("Editor.qml")), uri, 1, 0, "Editor"); qmlRegisterType(componentUrl(QStringLiteral("private/DocumentPreview.qml")), uri, 1, 0, "DocumentPreview"); #ifdef STATIC_MAUIKIT qmlRegisterType("org.kde.kquicksyntaxhighlighter", 0, 1, "KQuickSyntaxHighlighter"); #endif #endif /** PLATFORMS SPECIFIC CONTROLS **/ #ifdef Q_OS_ANDROID qmlRegisterSingletonType(uri, 1, 0, "Android", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* { Q_UNUSED(engine) Q_UNUSED(scriptEngine) return new MAUIAndroid; }); #else qmlRegisterType(componentUrl(QStringLiteral("Terminal.qml")), uri, 1, 0, "Terminal"); qmlRegisterSingletonType(uri, 1, 0, "KDE", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* { Q_UNUSED(engine) Q_UNUSED(scriptEngine) return new MAUIKDE; }); #endif /** DATA MODELING TEMPLATED INTERFACES **/ qmlRegisterType(); //ABSTRACT BASE LIST qmlRegisterType(uri, 1, 0, "BaseModel"); //BASE MODEL /** TAGGING INTERFACES AND MODELS **/ #ifdef COMPONENT_TAGGING qmlRegisterType("TagsList", 1, 0, "TagsList"); qmlRegisterType("TagsModel", 1, 0, "TagsModel"); qmlRegisterType(componentUrl(QStringLiteral("private/TagList.qml")), uri, 1, 0, "TagList"); qmlRegisterType(componentUrl(QStringLiteral("TagsBar.qml")), uri, 1, 0, "TagsBar"); qmlRegisterType(componentUrl(QStringLiteral("TagsDialog.qml")), uri, 1, 0, "TagsDialog"); #endif /** MAUI APPLICATION SPECIFIC PROPS **/ #ifdef COMPONENT_ACCOUNTS qmlRegisterType(); qmlRegisterType(componentUrl(QStringLiteral("SyncDialog.qml")), uri, 1, 0, "SyncDialog"); //to be rename to accountsDialog #endif qmlRegisterUncreatableType(uri, 1, 0, "App", "Cannot be created App"); /** HELPERS **/ qmlRegisterSingletonType(uri, 1, 0, "Handy", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* { Q_UNUSED(engine) Q_UNUSED(scriptEngine) return new Handy; }); #if defined Q_OS_ANDROID || defined APPIMAGE_PACKAGE || defined MAUIKIT_STYLE this->initResources(); #endif qmlProtectModule(uri, 1); } void MauiKit::initResources() { #if defined QICON_H && defined QQUICKSTYLE_H Q_INIT_RESOURCE(mauikit); Q_INIT_RESOURCE(icons); Q_INIT_RESOURCE(style); QIcon::setThemeSearchPaths({":/icons/luv-icon-theme"}); QIcon::setThemeName("Luv"); QQuickStyle::setStyle(":/style"); #endif } #include "moc_mauikit.cpp" diff --git a/src/mauikit.qrc b/src/mauikit.qrc index e61f8b6..1b3cc0e 100644 --- a/src/mauikit.qrc +++ b/src/mauikit.qrc @@ -1,68 +1,69 @@ controls/ToolBar.qml controls/AbstractSideBar.qml controls/SideBar.qml controls/ApplicationWindow.qml controls/Style.qml controls/ShareDialog.qml controls/PieButton.qml controls/Page.qml controls/private/PathBarDelegate.qml controls/private/EdgeShadow.qml controls/private/BrowserMenu.qml controls/private/BrowserView.qml controls/private/BrowserSettings.qml controls/private/BrowserHolder.qml controls/private/FileMenu.qml controls/private/AudioPreview.qml controls/private/ImagePreview.qml controls/private/TextPreview.qml controls/private/VideoPreview.qml controls/private/DocumentPreview.qml controls/private/DefaultPreview.qml controls/private/AccountsHelper.qml controls/Holder.qml controls/ListDelegate.qml controls/ItemDelegate.qml controls/SwipeItemDelegate.qml controls/SwipeBrowserDelegate.qml controls/GridBrowserDelegate.qml controls/ListBrowserDelegate.qml controls/GlobalDrawer.qml controls/SelectionBar.qml controls/LabelDelegate.qml controls/NewDialog.qml controls/TagsBar.qml controls/TagsDialog.qml controls/private/TagList.qml controls/private/TagDelegate.qml controls/ColorsBar.qml controls/FileBrowser.qml controls/FilePreviewer.qml controls/FileDialog.qml controls/ListBrowser.qml controls/PathBar.qml controls/GridBrowser.qml controls/Dialog.qml controls/AboutDialog.qml controls/Popup.qml controls/TextField.qml controls/Badge.qml controls/GridView.qml controls/SyncDialog.qml controls/Terminal.qml controls/Editor.qml controls/PlacesSidebar.qml controls/PlacesListBrowser.qml controls/Store.qml controls/ImageViewer.qml controls/TabBar.qml controls/TabButton.qml controls/ActionGroup.qml controls/ActionSideBar.qml controls/private/StoreDelegate.qml - controls/ToolActions.qml - controls/ToolButtonMenu.qml - + controls/ToolActions.qml + controls/ToolButtonMenu.qml + controls/ListItemTemplate.qml +