diff --git a/.gitmodules b/.gitmodules index 2e18ba138d069e5b8b6eeead1122c328e63f6331..963a78d4941cc5d3bfc70e6bff136c5fc1a1362c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ -[submodule "KelvinGUI"] - path = KelvinGUI +[submodule "libdap-qt-ui-qml"] + path = libdap-qt-ui-qml url = git://github.com/kelvinblockchain/libdap-qt-ui-qml.git branch = master diff --git a/DapUiQmlListModelWidgets.qml b/DapUiQmlListModelWidgets.qml deleted file mode 100644 index c97243ad31ec076f6d006354bdcb7e0f5e85eca5..0000000000000000000000000000000000000000 --- a/DapUiQmlListModelWidgets.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.0 - -ListModel { - id: listModelMenu - - ListElement { - name: qsTr("Blockchain explorer") - page: "DapUiQmlWidgetChainBlockExplorer.ui.qml" - } - ListElement { - name: qsTr("Exchanges") - page: "DapUiQmlWidgetChainExchanges.ui.qml" - } - ListElement { - name: qsTr("Services client") - page: "DapUiQmlWidgetChainServicesClient.ui.qml" - } - ListElement { - name: qsTr("Services share control") - page: "DapUiQmlWidgetChainServicesShareControl.ui.qml" - } - ListElement { - name: qsTr("Settings") - page: "DapUiQmlWidgetChainSettings.ui.qml" - } - ListElement { - name: qsTr("Wallet") - page: "DapUiQmlWidgetChainWallet.ui.qml" - } -} diff --git a/DapUiQmlScreenDashboard.cpp b/DapUiQmlScreenDashboard.cpp deleted file mode 100644 index ea06dd6231bea21f54cd8fcab6330af89513af25..0000000000000000000000000000000000000000 --- a/DapUiQmlScreenDashboard.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlScreenDashboard.h" - -DapUiQmlScreenDashboard::DapUiQmlScreenDashboard() -{ - -} diff --git a/DapUiQmlScreenDashboard.h b/DapUiQmlScreenDashboard.h deleted file mode 100644 index 1417dcb673466a1f62c6d5663d79f3bfdec3c939..0000000000000000000000000000000000000000 --- a/DapUiQmlScreenDashboard.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef DAPUIQMLSCREENDASHBOARD_H -#define DAPUIQMLSCREENDASHBOARD_H - - -class DapUiQmlScreenDashboard -{ -public: - DapUiQmlScreenDashboard(); -}; - -#endif // DAPUIQMLSCREENDASHBOARD_H \ No newline at end of file diff --git a/DapUiQmlScreenDashboard.qml b/DapUiQmlScreenDashboard.qml deleted file mode 100644 index e2461bbb00a7171e3855e9f702dfac200350d0da..0000000000000000000000000000000000000000 --- a/DapUiQmlScreenDashboard.qml +++ /dev/null @@ -1,82 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 1.4 -import QtQuick.Controls 2.2 -import QtQuick.Controls.Styles 1.4 - -Page { - id: dapUiQmlScreenDashboard - title: qsTr("General") - ListView { - id: listViewTabs - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - width: dapUiQmlScreenDashboard.width/5 - model: listModelTabs - - ListModel { - id: listModelTabs - - ListElement { - name: qsTr("Login") - page: "DapUiQmlScreenLogin.ui.qml" - } - ListElement { - name: qsTr("Dashboard") - page: "DapUiQmlScreenDialog.qml" - } - } - - - - delegate: - Component { - id: componentTab - Item { - width: listViewTabs.width - height: textTab.height + 10 - Rectangle { - id: canvas - border.color: "whitesmoke" - color: "Transparent" - anchors.fill: parent - Row { - anchors.margins: 5 - anchors.fill: parent - - Text - { - id: textTab - text: qsTr(name) - } - } - } - - MouseArea { - anchors.fill: parent - onClicked: - { - listViewTabs.currentIndex = index - stackViewScreenDashboard.setSource(Qt.resolvedUrl(page)) - } - } - } - } - - highlight: Rectangle { color: "aliceblue"; radius: 1 } - focus: true - } - Rectangle { - anchors.left: listViewTabs.right - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.right: parent.right - border.color: "whitesmoke" - Loader { - id: stackViewScreenDashboard - anchors.fill: parent - anchors.margins: 1 - source: "DapUiQmlScreenLogin.ui.qml" - } - } -} diff --git a/DapUiQmlScreenDialog.cpp b/DapUiQmlScreenDialog.cpp deleted file mode 100644 index c237cc216b8a746ed3427d163120b5aac94d4bdf..0000000000000000000000000000000000000000 --- a/DapUiQmlScreenDialog.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlScreenDialog.h" - -DapUiQmlScreenDialog::DapUiQmlScreenDialog() -{ - -} diff --git a/DapUiQmlScreenDialog.h b/DapUiQmlScreenDialog.h deleted file mode 100644 index c3a5028c8c1f0b82f82674fbbdfdcf1f77a0a0c3..0000000000000000000000000000000000000000 --- a/DapUiQmlScreenDialog.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef DAPUIQMLSCREENDIALOG_H -#define DAPUIQMLSCREENDIALOG_H - - -class DapUiQmlScreenDialog -{ -public: - DapUiQmlScreenDialog(); -}; - -#endif // DAPUIQMLSCREENDIALOG_H diff --git a/DapUiQmlScreenDialog.qml b/DapUiQmlScreenDialog.qml deleted file mode 100644 index a6d222603c18deecc4e0a3b567d185798c59ddb9..0000000000000000000000000000000000000000 --- a/DapUiQmlScreenDialog.qml +++ /dev/null @@ -1,63 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 2.4 - -Page { - id: dapUiQmlScreenDialog - title: qsTr("Dashboard") - anchors.fill: parent - - Rectangle { - color: "white" - anchors.fill: parent - - GridView { - id: gridViewDashboard - anchors.fill: parent - cellWidth: width/3; cellHeight: height/2 - focus: true - model: DapUiQmlListModelWidgets {} - - highlight: Rectangle { width: gridViewDashboard.cellWidth; height: gridViewDashboard.cellHeight; radius: width/50; color: "aliceblue" } - - delegate: Item { - width: gridViewDashboard.cellWidth - height: gridViewDashboard.cellHeight - Rectangle { - anchors.fill: parent - border.color: "grey" - color: "transparent" - radius: width/50 - anchors.margins: 5 - clip: true - - Column { - width: parent.width - anchors.centerIn: parent - spacing: width / 10 - anchors.margins: width / 10 - Image { - id: iconWidget - source: "qrc:/Resources/Icons/add.png" - width: parent.width * 2/3 - height: width - anchors.horizontalCenter: parent.horizontalCenter - } - Text { - text: name - color: "darkgrey" - anchors.horizontalCenter: parent.horizontalCenter - } - } - } - MouseArea { - anchors.fill: parent - onClicked: - { - parent.GridView.view.currentIndex = index; - stackView.push(Qt.resolvedUrl(page), StackView.Immediate); - } - } - } - } - } -} diff --git a/DapUiQmlScreenLogin.ui.qml b/DapUiQmlScreenLogin.ui.qml deleted file mode 100644 index 2d51f82771685791be2359c3f879bf2381314aad..0000000000000000000000000000000000000000 --- a/DapUiQmlScreenLogin.ui.qml +++ /dev/null @@ -1,27 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 2.2 - -Page { - id: dapUiQmlScreenLogin - - title: qsTr("Login") - - - Column { - anchors.centerIn: parent - spacing: 10 - - TextField { - id: textFieldPassword - placeholderText: "Password" - echoMode: TextInput.Password - } - - Button { - text: "Log in" - width: textFieldPassword.width - anchors.horizontalCenter: parent.horizontalCenter - } - } - -} diff --git a/DapUiQmlScreenMainWindow.ui.qml b/DapUiQmlScreenMainWindow.ui.qml deleted file mode 100644 index edc520024fe0c426c223257aabc8d72763a3dc28..0000000000000000000000000000000000000000 --- a/DapUiQmlScreenMainWindow.ui.qml +++ /dev/null @@ -1,8 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 1.4 -import QtQuick.Controls 2.4 - -Page { - - title: qsTr("General") -} diff --git a/DapUiQmlWidgeChainOperations.cpp b/DapUiQmlWidgeChainOperations.cpp deleted file mode 100644 index 4703312d80e18f19902bea450ef54d881871785a..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgeChainOperations.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlWidgeChainOperations.h" - -DapUiQmlWidgeChainOperations::DapUiQmlWidgeChainOperations() -{ - -} diff --git a/DapUiQmlWidgeChainOperations.h b/DapUiQmlWidgeChainOperations.h deleted file mode 100644 index 458778325c376405de920d752b0470aa3148de9d..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgeChainOperations.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DAPUIQMLWIDGECHAINOPERATIONS_H -#define DAPUIQMLWIDGECHAINOPERATIONS_H - -#include "DapUiQmlWidget.h" - -class DapUiQmlWidgeChainOperations : public DapUiQmlWidget -{ -public: - DapUiQmlWidgeChainOperations(); -}; - -#endif // DAPUIQMLWIDGECHAINOPERATIONS_H diff --git a/DapUiQmlWidget.cpp b/DapUiQmlWidget.cpp deleted file mode 100644 index 59598aa4c5a19e72e3b861108185800ed5c57aa5..0000000000000000000000000000000000000000 --- a/DapUiQmlWidget.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlWidget.h" - -DapUiQmlWidget::DapUiQmlWidget() -{ - -} diff --git a/DapUiQmlWidget.h b/DapUiQmlWidget.h deleted file mode 100644 index 06ebafdc6182a1d48bfc9c9b6202a5e281ed6de8..0000000000000000000000000000000000000000 --- a/DapUiQmlWidget.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef DAPUIQMLWIDGET_H -#define DAPUIQMLWIDGET_H - - -class DapUiQmlWidget -{ -public: - DapUiQmlWidget(); -}; - -#endif // DAPUIQMLWIDGET_H \ No newline at end of file diff --git a/DapUiQmlWidgetChainBallance.cpp b/DapUiQmlWidgetChainBallance.cpp deleted file mode 100644 index 68da31745da72d965fa4cd3bce1b461968246a83..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainBallance.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlWidgetChainBallance.h" - -DapUiQmlWidgetChainBallance::DapUiQmlWidgetChainBallance() -{ - -} diff --git a/DapUiQmlWidgetChainBallance.h b/DapUiQmlWidgetChainBallance.h deleted file mode 100644 index be7239552f011864e4c2ef5ecb6b74e9cc257da9..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainBallance.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DAPUIQMLWIDGETCHAINBALLANCE_H -#define DAPUIQMLWIDGETCHAINBALLANCE_H - -#include "DapUiQmlWidget.h" - -class DapUiQmlWidgetChainBallance : public DapUiQmlWidget -{ -public: - DapUiQmlWidgetChainBallance(); -}; - -#endif // DAPUIQMLWIDGETCHAINBALLANCE_H diff --git a/DapUiQmlWidgetChainBlockExplorer.cpp b/DapUiQmlWidgetChainBlockExplorer.cpp deleted file mode 100644 index 28ce99bd360f5a368f4cbef43a65fa945b9b4c56..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainBlockExplorer.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlWidgetChainBlockExplorer.h" - -DapUiQmlWidgetChainBlockExplorer::DapUiQmlWidgetChainBlockExplorer() -{ - -} diff --git a/DapUiQmlWidgetChainBlockExplorer.h b/DapUiQmlWidgetChainBlockExplorer.h deleted file mode 100644 index dfcb58894dc748f019d925f59d88b7e4b9a55286..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainBlockExplorer.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DAPUIQMLWIDGETCHAINBLOCKEXPLORER_H -#define DAPUIQMLWIDGETCHAINBLOCKEXPLORER_H - -#include "DapUiQmlWidget.h" - -class DapUiQmlWidgetChainBlockExplorer : public DapUiQmlWidget -{ -public: - DapUiQmlWidgetChainBlockExplorer(); -}; - -#endif // DAPUIQMLWIDGETCHAINBLOCKEXPLORER_H diff --git a/DapUiQmlWidgetChainBlockExplorer.ui.qml b/DapUiQmlWidgetChainBlockExplorer.ui.qml deleted file mode 100644 index 33225cc2eacc68742842b14aee75c6030ccf256b..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainBlockExplorer.ui.qml +++ /dev/null @@ -1,15 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 2.2 - -Page { - id: dapUiQmlWidgetChainBlockExplorer - - title: qsTr("Blockchain explorer") - - Text { - id: name - anchors.centerIn: parent - text: qsTr("Blockchain explorer") - } - -} diff --git a/DapUiQmlWidgetChainExchanges.ui.qml b/DapUiQmlWidgetChainExchanges.ui.qml deleted file mode 100644 index fef680a80689e2c520e8aea2af322b9a714b1b71..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainExchanges.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 2.2 - -Page { - id: dapUiQmlWidgetChainExchanges - - title: qsTr("Exchanges") - - Text { - id: name - anchors.centerIn: parent - text: qsTr("Exchanges") - } -} diff --git a/DapUiQmlWidgetChainNodeLogs.cpp b/DapUiQmlWidgetChainNodeLogs.cpp deleted file mode 100644 index 36ef984482f16eb614708b017e7c83d38d68a850..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainNodeLogs.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlWidgetChainNodeLogs.h" - -DapUiQmlWidgetChainNodeLogs::DapUiQmlWidgetChainNodeLogs() -{ - -} diff --git a/DapUiQmlWidgetChainNodeLogs.h b/DapUiQmlWidgetChainNodeLogs.h deleted file mode 100644 index 07123ebffdfde9cbfbad6995112402936ce5e188..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainNodeLogs.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DAPUIQMLWIDGETCHAINNODELOGS_H -#define DAPUIQMLWIDGETCHAINNODELOGS_H - -#include "DapUiQmlWidget.h" - -class DapUiQmlWidgetChainNodeLogs : public DapUiQmlWidget -{ -public: - DapUiQmlWidgetChainNodeLogs(); -}; - -#endif // DAPUIQMLWIDGETCHAINNODELOGS_H diff --git a/DapUiQmlWidgetChainServicesClient.ui.qml b/DapUiQmlWidgetChainServicesClient.ui.qml deleted file mode 100644 index 61065a0d44f5023cb061d719c59cf036cef79d23..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainServicesClient.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 2.2 - -Page { - id: dapUiQmlWidgetChainServicesClient - - title: qsTr("Services client") - - Text { - id: name - anchors.centerIn: parent - text: qsTr("Services client") - } -} diff --git a/DapUiQmlWidgetChainServicesShareControl.ui.qml b/DapUiQmlWidgetChainServicesShareControl.ui.qml deleted file mode 100644 index 194f89e2ec45552e72ab39c7f89846a1c2e0e06b..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainServicesShareControl.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 2.2 - -Page { - id: dapUiQmlWidgetChainServicesShareControl - - title: qsTr("Services share control") - - Text { - id: name - anchors.centerIn: parent - text: qsTr("Services share control") - } -} diff --git a/DapUiQmlWidgetChainSettings.ui.qml b/DapUiQmlWidgetChainSettings.ui.qml deleted file mode 100644 index 54d6ac5b4a03c2ebe6d3a3e8fdba3347e4800bf7..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainSettings.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 2.2 - -Page { - id: dapUiQmlWidgetChainSettings - - title: qsTr("Settings") - - Text { - id: name - anchors.centerIn: parent - text: qsTr("Settings") - } -} diff --git a/DapUiQmlWidgetChainTransctions.cpp b/DapUiQmlWidgetChainTransctions.cpp deleted file mode 100644 index 654f78de1a143a15b28efcca5628566d6ede75b4..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainTransctions.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlWidgetChainTransctions.h" - -DapUiQmlWidgetChainTransctions::DapUiQmlWidgetChainTransctions() -{ - -} diff --git a/DapUiQmlWidgetChainTransctions.h b/DapUiQmlWidgetChainTransctions.h deleted file mode 100644 index 2595d04e62de3aba2535b29b6dfa330adb3fc637..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainTransctions.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DAPUIQMLWIDGETCHAINTRANSCTIONS_H -#define DAPUIQMLWIDGETCHAINTRANSCTIONS_H - -#include "DapUiQmlWidget.h" - -class DapUiQmlWidgetChainTransctions : public DapUiQmlWidget -{ -public: - DapUiQmlWidgetChainTransctions(); -}; - -#endif // DAPUIQMLWIDGETCHAINTRANSCTIONS_H diff --git a/DapUiQmlWidgetChainWallet.ui.qml b/DapUiQmlWidgetChainWallet.ui.qml deleted file mode 100644 index 465499b497235b5b058c80b1d46e28a589f29662..0000000000000000000000000000000000000000 --- a/DapUiQmlWidgetChainWallet.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 2.2 - -Page { - id: dapUiQmlWidgetChainWallet - - title: qsTr("Wallet") - - Text { - id: name - anchors.centerIn: parent - text: qsTr("Wallet") - } -} diff --git a/kelvin.conf b/kelvin.conf deleted file mode 100644 index 75b2cb8fffb69c8cb04c1192f9425a11789972d0..0000000000000000000000000000000000000000 --- a/kelvin.conf +++ /dev/null @@ -1,6 +0,0 @@ -; This file can be edited to change the style of the application -; Read "Qt Quick Controls 2 Configuration File" for details: -; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html - -[Controls] -Style=Default diff --git a/kelvin.pro b/kelvin.pro deleted file mode 100644 index 5356854e25566c28a8f263bbb5572ef3da1bb008..0000000000000000000000000000000000000000 --- a/kelvin.pro +++ /dev/null @@ -1,48 +0,0 @@ -QT += quick quick widgets quickwidgets -CONFIG += c++11 - -# 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 -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS -ICON = icon.ico -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp \ - DapUiQmlWidget.cpp \ - DapUiQmlWidgetChainBallance.cpp \ - DapUiQmlScreenDialog.cpp \ - DapUiQmlWidgeChainOperations.cpp \ - DapUiQmlWidgetChainBlockExplorer.cpp \ - DapUiQmlWidgetChainNodeLogs.cpp \ - DapUiQmlWidgetChainTransctions.cpp - -RESOURCES += qml.qrc - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = - -# Additional import path used to resolve QML modules just for Qt Quick Designer -QML_DESIGNER_IMPORT_PATH = - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target - -HEADERS += \ - DapUiQmlWidget.h \ - DapUiQmlWidgetChainBallance.h \ - DapUiQmlScreenDialog.h \ - DapUiQmlWidgeChainOperations.h \ - DapUiQmlWidgetChainBlockExplorer.h \ - DapUiQmlWidgetChainNodeLogs.h \ - DapUiQmlWidgetChainTransctions.h \ - DapUiQmlScreenDashboard.h - -DISTFILES += diff --git a/main.cpp b/main.cpp deleted file mode 100644 index 2a321fb37d896b8aa24c9e25cdd0180a101242c0..0000000000000000000000000000000000000000 --- a/main.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include <QApplication> -#include <QGuiApplication> -#include <QQmlApplicationEngine> -#include <QQmlContext> -#include <QIcon> -#include <QSystemSemaphore> -#include <QSharedMemory> - -/// Check for the existence of a running instance of the program. -/// @param systemSemaphore Semaphore for blocking shared resource. -/// @param memmoryApp Shared memory. -/// @param memmoryAppBagFix Shared memory for Linux system features. -/// @return If the application is running, it returns three, otherwise false. -bool checkExistenceRunningInstanceApp(QSystemSemaphore& systemSemaphore, QSharedMemory &memmoryApp, QSharedMemory &memmoryAppBagFix); - -int main(int argc, char *argv[]) -{ - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - // Creating a semaphore for locking external resources, as well as initializing an external resource-memory - QSystemSemaphore systemSemaphore(QString("systemSemaphore for %1").arg("Kelvin"), 1); -#ifndef Q_OS_WIN - QSharedMemory memmoryAppBagFix(QString("memmory for %1").arg("Kelvin")); -#endif - QSharedMemory memmoryApp(QString("memmory for %1").arg("Kelvin")); - // Check for the existence of a running instance of the program - bool isRunning = checkExistenceRunningInstanceApp(systemSemaphore, memmoryApp, memmoryAppBagFix); - - if(isRunning) - { - return 1; - } - - QApplication app(argc, argv); - app.setOrganizationName("DEMLABS"); - app.setOrganizationDomain("demlabs.com"); - app.setApplicationName("Kelvin"); - app.setWindowIcon(QIcon(":/Resources/Icons/icon.ico")); - - QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - - if (engine.rootObjects().isEmpty()) - return -1; - - return app.exec(); -} - -/// Check for the existence of a running instance of the program. -/// @param systemSemaphore Semaphore for blocking shared resource. -/// @param memmoryApp Shared memory. -/// @param memmoryAppBagFix Shared memory for Linux system features. -/// @return If the application is running, it returns three, otherwise false. -bool checkExistenceRunningInstanceApp(QSystemSemaphore& systemSemaphore, QSharedMemory &memmoryApp, QSharedMemory &memmoryAppBagFix) -{ - systemSemaphore.acquire(); - - if(memmoryAppBagFix.attach()) - { - memmoryAppBagFix.detach(); - } - - bool isRunning {false}; - - if (memmoryApp.attach()) - { - isRunning = true; - } - else - { - memmoryApp.create(1); - isRunning = false; - } - - systemSemaphore.release(); - - return isRunning; -} diff --git a/main.qml b/main.qml deleted file mode 100644 index 759dae8c9c2fb69338337d2cd495c1144eab97f4..0000000000000000000000000000000000000000 --- a/main.qml +++ /dev/null @@ -1,121 +0,0 @@ -import QtQuick 2.9 -import QtQuick.Controls 1.4 -import QtQuick.Controls 2.4 -import QtQuick.Window 2.0 -import QtQuick.Controls.Styles 1.4 -import Qt.labs.platform 1.0 - -ApplicationWindow { - id: window - visible: true - width: 640 - height: 480 - - SystemTrayIcon { - visible: true - iconName: "Kelvin" - iconSource: "qrc:/Resources/Icons/icon.ico" - tooltip: "Kelvin Dashboard" - - menu: Menu { - MenuItem { - text: qsTr("Quit") - onTriggered: Qt.quit() - } - } - - onActivated: { - if(reason === 1){ - menu.open() - } else { - if(window.visibility === Window.Hidden) { - window.show() - window.raise() - window.requestActivate() - } else { - window.hide() - } - } - } - } - - - header: ToolBar { - contentHeight: buttomMenu.implicitHeight - - ToolButton { - id: buttomMenu - text: stackView.depth > 1 ? "\u25C0" : "\u2630" - font.pixelSize: Qt.application.font.pixelSize * 1.6 - onClicked: { - if (stackView.depth > 1) { - stackView.pop() - } else { - drawerMenu.open() - } - } - } - - Label { - id: labelTitleWidget - text: stackView.currentItem.title - anchors.centerIn: parent - } - } - - Drawer { - id: drawerMenu - width: window.width * 0.25 - height: window.height - - ListView { - id: listViewMenu - anchors.fill: parent - model: listModelMenu - - DapUiQmlListModelWidgets { - id: listModelMenu - } - - delegate: - Component { - id: listViewItemMenu - Item { - id: itemMenu - - width: listViewMenu.width - height: textItemMenu.height + 10 - - Row { - anchors.margins: 5 - anchors.fill: parent - - Text - { - id: textItemMenu - text: qsTr(name) - } - } - - MouseArea { - anchors.fill: parent - onClicked: - { - listViewMenu.currentIndex = index - stackView.push(Qt.resolvedUrl(page), StackView.Immediate) - drawerMenu.close() - } - } - } - } - highlight: Rectangle { color: "aliceblue"; radius: 5 } - focus: true - } - } - - StackView { - id: stackView - initialItem: "DapUiQmlScreenDashboard.qml" - anchors.fill: parent - } -} diff --git a/qml.qrc b/qml.qrc deleted file mode 100644 index 6c73571170e7d9677169a597e42f0e69a6373947..0000000000000000000000000000000000000000 --- a/qml.qrc +++ /dev/null @@ -1,20 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>main.qml</file> - <file>DapUiQmlScreenDashboard.qml</file> - <file>DapUiQmlScreenMainWindow.ui.qml</file> - <file>kelvin.conf</file> - <file>DapUiQmlScreenLogin.ui.qml</file> - <file>DapUiQmlWidgetChainBlockExplorer.ui.qml</file> - <file>DapUiQmlWidgetChainExchanges.ui.qml</file> - <file>DapUiQmlWidgetChainServicesClient.ui.qml</file> - <file>DapUiQmlWidgetChainServicesShareControl.ui.qml</file> - <file>DapUiQmlWidgetChainSettings.ui.qml</file> - <file>DapUiQmlWidgetChainWallet.ui.qml</file> - <file>DapUiQmlScreenDialog.qml</file> - <file>Resources/Icons/icon.png</file> - <file>Resources/Icons/icon.ico</file> - <file>DapUiQmlListModelWidgets.qml</file> - <file>Resources/Icons/add.png</file> - </qresource> -</RCC>