Advance Wayland and KDE package bring-up
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
find_package(Qt6 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets)
|
||||
|
||||
set(applicationitemapp_SRCS
|
||||
main.cpp
|
||||
)
|
||||
|
||||
qt_add_resources(RESOURCES resources.qrc)
|
||||
|
||||
add_executable(applicationitemapp ${applicationitemapp_SRCS} ${RESOURCES})
|
||||
target_link_libraries(applicationitemapp
|
||||
Qt6::Core
|
||||
Qt6::Qml
|
||||
Qt6::Quick
|
||||
Qt6::Svg
|
||||
Qt6::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS applicationitemapp ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
#include <QQuickView>
|
||||
#include <QUrl>
|
||||
#ifdef Q_OS_ANDROID
|
||||
#include <QGuiApplication>
|
||||
#else
|
||||
#include <QApplication>
|
||||
#endif
|
||||
|
||||
Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef Q_OS_ANDROID
|
||||
QGuiApplication app(argc, argv);
|
||||
#else
|
||||
QApplication app(argc, argv);
|
||||
#endif
|
||||
|
||||
QQuickView view;
|
||||
view.setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
view.setSource(QUrl(QStringLiteral("qrc:///main.qml")));
|
||||
view.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
Kirigami.ApplicationItem {
|
||||
id: root
|
||||
|
||||
globalDrawer: Kirigami.GlobalDrawer {
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: "View"
|
||||
icon.name: "view-list-icons"
|
||||
Kirigami.Action {
|
||||
text: "action 1"
|
||||
}
|
||||
Kirigami.Action {
|
||||
text: "action 2"
|
||||
}
|
||||
Kirigami.Action {
|
||||
text: "action 3"
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: "action 3"
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: "action 4"
|
||||
}
|
||||
]
|
||||
handleVisible: true
|
||||
}
|
||||
contextDrawer: Kirigami.ContextDrawer {
|
||||
id: contextDrawer
|
||||
|
||||
actions: (pageStack.currentItem as Kirigami.Page)?.actions ?? []
|
||||
}
|
||||
|
||||
pageStack.initialPage: mainPageComponent
|
||||
|
||||
Component {
|
||||
id: mainPageComponent
|
||||
Kirigami.Page {
|
||||
title: "Hello"
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: "action 1"
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: "action 2"
|
||||
}
|
||||
]
|
||||
Rectangle {
|
||||
color: "#aaff7f"
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="main.qml">main.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Reference in New Issue
Block a user