Commit eec7c588 authored by Camilo Higuita's avatar Camilo Higuita

initial migration to MauiKit

parent 5c7046ff
......@@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "./3rdparty/kirigami/src/kirigamiplugin.h"
#endif
#include "mauikit/src/mauikit.h"
QStringList getFolderImages(const QString &path)
{
QStringList urls;
......@@ -121,6 +123,10 @@ int main(int argc, char *argv[])
context->setContextProperty("android", &android);
#endif
#ifdef MAUI_APP
MauiKit::getInstance().registerTypes();
#endif
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
......
/home/camilo/Coding/qml/buho/mauikit
\ No newline at end of file
......@@ -27,6 +27,8 @@ linux:unix:!android {
message("Unknown configuration")
}
include($$PWD/mauikit/mauikit.pri)
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
......
This diff is collapsed.
......@@ -20,7 +20,7 @@ ToolButton
icon.width: size
icon.height: size
icon.color: !isMask ? "transparent" : (down ? highlightColor : (iconColor || defaultColor))
display: wideMode ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly
display: isWide ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly
onClicked: if(anim) animIcon.running = true
......
......@@ -16,41 +16,7 @@ Kirigami.GlobalDrawer
leftPadding: 0
rightPadding: 0
bannerImageSource: "qrc:/img/assets/banner.png"
actions: [
Kirigami.Action
{
text: "Settings..."
iconName: "view-media-config"
},
Kirigami.Action
{
text: "Collection..."
iconName: "database-index"
Kirigami.Action
{
text: "Rescan..."
}
Kirigami.Action
{
text: "Refresh..."
iconName: "view-refresh"
}
},
Kirigami.Action
{
text: "About..."
iconName: "help-about"
}
]
}
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../view_models"
import org.kde.maui 1.0 as Maui
import "../widgets/views/Viewer/Viewer.js" as VIEWER
ToolBar
Row
{
spacing: space.medium
id: footerToolbar
visible: !pixViewer.holder.visible && currentView === views.viewer
position: ToolBar.Footer
RowLayout
{
anchors.fill: parent
Item
{
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize * 2
PixButton
{
anchors.centerIn: parent
iconName: "document-share"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Share")
onClicked: isAndroid ? android.shareDialog(pixViewer.currentPic.url) :
shareDialog.show(pixViewer.currentPic.url)
}
}
Item { Layout.fillWidth: true }
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize*2
PixButton
{
anchors.centerIn: parent
iconName: "go-previous"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Previous")
onClicked: VIEWER.previous()
}
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize*2
PixButton
{
id: favIcon
anchors.centerIn: parent
iconName: "love"
iconColor: pixViewer.currentPicFav? pix.pixColor() : textColor
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Fav")
onClicked: pixViewer.currentPicFav = VIEWER.fav(pixViewer.currentPic.url)
}
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize*2
PixButton
{
anchors.centerIn: parent
iconName: "go-next"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Next")
onClicked: VIEWER.next()
}
}
Item { Layout.fillWidth: true }
Item
{
Layout.alignment: Qt.AlignRight
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize * 2
PixButton
{
anchors.centerIn: parent
iconName: fullScreen? "window-close" : "view-fullscreen"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Fullscreen")
onClicked: goFullScreen()
}
}
Maui.ToolButton
{
iconName: "go-previous"
onClicked: VIEWER.previous()
}
Maui.ToolButton
{
id: favIcon
iconName: "love"
iconColor: pixViewer.currentPicFav? pix.pixColor() : textColor
onClicked: pixViewer.currentPicFav = VIEWER.fav(pixViewer.currentPic.url)
}
function goFullScreen()
Maui.ToolButton
{
fullScreen = !fullScreen
iconName: "go-next"
onClicked: VIEWER.next()
}
}
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../utils"
import "../view_models"
import org.kde.maui 1.0 as Maui
ToolBar
Row
{
position: ToolBar.Header
spacing: space.medium
property string accentColor : pix.pixColor()
property int currentIndex : 0
signal viewerViewClicked()
signal galleryViewClicked()
signal albumsViewClicked()
......@@ -20,171 +16,44 @@ ToolBar
signal foldersViewClicked()
signal searchViewClicked()
signal menuClicked()
id: pixBar
RowLayout
Maui.ToolButton
{
anchors.fill: parent
spacing: space.medium
Item
{
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize*2
PixButton
{
anchors.centerIn: parent
iconName: "application-menu"
onClicked: menuClicked()
iconColor: globalDrawer.visible ? accentColor : textColor
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Menu")
}
}
Item
{
Layout.fillWidth: true
Layout.minimumWidth: 0
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: galleryBtn.implicitWidth * 1.3
PixButton
{
id: galleryBtn
anchors.centerIn: parent
text: qsTr("Gallery")
iconColor: currentIndex === views.gallery? accentColor : textColor
iconName: "image-multiple"
onClicked: galleryViewClicked()
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Gallery")
}
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: foldersView.implicitWidth * 1.3
PixButton
{
id: foldersView
anchors.centerIn: parent
text: qsTr("Folders")
iconColor: currentIndex === views.folders? accentColor : textColor
display: root.isWide ? ToolButton.TextBesideIcon : ToolButton.IconOnly
iconName: "image-folder-view"
onClicked: foldersViewClicked()
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Folders")
}
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: albumsView.implicitWidth * 1.3
PixButton
{
id: albumsView
anchors.centerIn: parent
text: qsTr("Albums")
iconColor: currentIndex === views.albums? accentColor : textColor
iconName: "image-frames"
onClicked: albumsViewClicked()
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Albums")
}
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: tagsView.implicitWidth * 1.3
PixButton
{
id: tagsView
anchors.centerIn: parent
text: qsTr("Tags")
iconColor: currentIndex === views.tags? accentColor : textColor
iconName: "tag"
onClicked: tagsViewClicked()
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Tags")
}
}
text: qsTr("Gallery")
iconColor: currentView === views.gallery? accentColor : textColor
iconName: "image-multiple"
onClicked: galleryViewClicked()
}
Item
{
Layout.fillWidth: true
Layout.minimumWidth: 0
}
Maui.ToolButton
{
display: root.isWide ? ToolButton.TextBesideIcon : ToolButton.IconOnly
Item
{
Layout.alignment: Qt.AlignRight
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize*2
text: qsTr("Folders")
iconColor: currentView === views.folders? accentColor : textColor
iconName: "image-folder-view"
onClicked: foldersViewClicked()
}
PixButton
{
id: searchView
anchors.centerIn: parent
Maui.ToolButton
{
display: root.isWide ? ToolButton.TextBesideIcon : ToolButton.IconOnly
iconColor: currentIndex === views.search? accentColor : textColor
text: qsTr("Albums")
iconColor: currentView === views.albums? accentColor : textColor
iconName: "image-frames"
onClicked: albumsViewClicked()
}
iconName: "edit-find"
onClicked: searchViewClicked()
Maui.ToolButton
{
display: root.isWide ? ToolButton.TextBesideIcon : ToolButton.IconOnly
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Search")
}
}
text: qsTr("Tags")
iconColor: currentView === views.tags? accentColor : textColor
iconName: "tag"
onClicked: tagsViewClicked()
}
}
......@@ -114,7 +114,7 @@ PixPage
id: editTools
width: parent.width * 0.4
height: parent.height - headerBar.height - pixFooter.height - toolBar.height
height: parent.height - headerBar.height - pixFooter.height - headBar.height
y: headerBar.height + pixFooter.height
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment