Commit 03a424a6 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

add qrc file for dashboard + update qml

parent 4c024f18
......@@ -13,12 +13,17 @@ project(dtkDistributedDashboard)
set(${PROJECT_NAME}_SOURCES
main.cpp)
set(${PROJECT_NAME}_RESOURCES
dtkDashboard.qrc)
## #################################################################
## Build rules
## #################################################################
qt5_add_RESOURCES(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_RESOURCES})
add_executable(${PROJECT_NAME}
${${PROJECT_NAME}_SOURCES_QRC}
${${PROJECT_NAME}_SOURCES})
target_link_libraries(${PROJECT_NAME}
......
This diff is collapsed.
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
FocusScope {
id: root
width: 200
height: 30
property Item nextInFocus;
property string text;
property string color;
Rectangle {
anchors.margins: 2
anchors.fill: parent
radius: 8
gradient: Gradient {
GradientStop { position: 0; color: "lightgray" }
GradientStop { position: 1; color: "white" }
}
border.color: "white"
border.width: 2
antialiasing: true
TextInput {
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
focus: true
text: root.text;
color: root.color;
KeyNavigation.tab: root.nextInFocus;
}
}
}
This diff is collapsed.
import QtQuick 2.3
import QtQuick.Controls 1.1
ApplicationWindow {
title: "DTK Distributed Dashboard"
visible: true
minimumHeight: 400
minimumWidth: 1060
Dashboard {
id: dashboard
}
}
<RCC>
<qresource prefix="/">
<file>dashmain.qml</file>
<file>Dashboard.qml</file>
<file>TextBox.qml</file>
<file>status.js</file>
<file alias="Charts">jbQuick/Charts</file>
<file alias="QChart.qml">jbQuick/Charts/QChart.qml</file>
<file alias="QChart.js">jbQuick/Charts/QChart.js</file>
</qresource>
</RCC>
......@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
dtkDistributed::communicator::pluginManager().initialize(settings.value("plugins").toString());
settings.endGroup();
QQmlApplicationEngine engine(QUrl::fromLocalFile("dash.qml"));
QQmlApplicationEngine engine(QUrl("qrc:/dashmain.qml"));
return app.exec();
}
......
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