Initial commit: brief README.md, 'hello world' QT/QML app

This commit is contained in:
Stephen Shelton 2019-10-03 15:31:01 -06:00
commit ba853f589b
7 changed files with 83 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
# build artifacts
Makefile
.qmake.stash
*_qml.cpp
lokicp
tags

19
README.md Normal file
View File

@ -0,0 +1,19 @@
# Lokinet Control Panel
This repository contains a cross-platform GUI for controlling and observing stats from a locally-running `lokinet`. See also [loki-network](https://github.com/loki-project/loki-network).
### Building
To build, you'll need a handful of `Qt` packages available. On `Ubuntu` or similar, you can install these with:
```bash
sudo apt install qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-dialogs
```
Then build and run:
```bash
qmake .
make
./lokicp
```

16
TestPanel.qml Normal file
View File

@ -0,0 +1,16 @@
import QtQuick 2.0
Rectangle {
id: page
width: 320; height: 480
color: "lightgray"
Text {
id: helloText
text: "Hello world!"
y: 30
anchors.horizontalCenter: page.horizontalCenter
font.pointSize: 24; font.bold: true
}
}

8
lokicp.pro Normal file
View File

@ -0,0 +1,8 @@
TEMPLATE = app
QT += qml quick widgets
SOURCES += main.cpp
RESOURCES += qml.qrc

12
main.cpp Normal file
View File

@ -0,0 +1,12 @@
#include <QApplication>
#include <QQmlApplicationEngine>
int32_t main(int32_t argc, char *argv[])
{
QApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}

15
main.qml Normal file
View File

@ -0,0 +1,15 @@
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
ApplicationWindow {
title: qsTr("Hello World")
width: 640
height: 480
visible: true
TestPanel {
}
}

6
qml.qrc Normal file
View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>TestPanel.qml</file>
</qresource>
</RCC>