Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
862dda3
piechart demo
gunrot Jan 3, 2016
d483477
implement readingi data from model as QAbstractListModel
gunrot Jan 4, 2016
b0e975d
remove unused header
gunrot Jan 6, 2016
180f205
adapt colum count to window size and use flickable to scroll.
gunrot Jan 6, 2016
4c6cc54
remove unsued qml-private from piechart.pro
gunrot Jan 8, 2016
f44f4ab
add CONFIG += c++11 to piechart.pro
gunrot Jan 8, 2016
20454f9
fix build with gcc4.8, use data() for QPointer sender in connect()
gunrot Jan 10, 2016
d65d78e
piechart demo
gunrot Jan 3, 2016
431f0ca
implement readingi data from model as QAbstractListModel
gunrot Jan 4, 2016
70727b2
remove unused header
gunrot Jan 6, 2016
2d19af8
adapt colum count to window size and use flickable to scroll.
gunrot Jan 6, 2016
88e32bd
remove unsued qml-private from piechart.pro
gunrot Jan 8, 2016
7bc1b07
add CONFIG += c++11 to piechart.pro
gunrot Jan 8, 2016
764eb9d
fix build with gcc4.8, use data() for QPointer sender in connect()
gunrot Jan 10, 2016
75fcd2c
adpat piechart to upstream changes
gunrot Jan 20, 2016
50cb505
Merge branch 'piechart' of https://github.com/gunrot/qnanopainter int…
gunrot Jan 21, 2016
b43a55c
piechart demo
gunrot Jan 3, 2016
aa9c1b1
implement readingi data from model as QAbstractListModel
gunrot Jan 4, 2016
eeae6df
remove unused header
gunrot Jan 6, 2016
4c1aaa2
adapt colum count to window size and use flickable to scroll.
gunrot Jan 6, 2016
6b99c91
remove unsued qml-private from piechart.pro
gunrot Jan 8, 2016
71ea2db
add CONFIG += c++11 to piechart.pro
gunrot Jan 8, 2016
738a829
fix build with gcc4.8, use data() for QPointer sender in connect()
gunrot Jan 10, 2016
da0da36
adpat piechart to upstream changes
gunrot Jan 20, 2016
29e8db6
Merge branch 'master' into piechart
gunrot Aug 22, 2016
2be732b
Merge branch 'piechart' of https://github.com/gunrot/qnanopainter int…
gunrot Mar 13, 2017
c05187b
Merge branch 'master' into piechart
gunrot Mar 13, 2017
4f80b4c
Merge branch 'master' into piechart
gunrot Jun 14, 2017
0c686a0
Merge branch 'piechart' of https://github.com/gunrot/qnanopainter int…
gunrot Jun 15, 2017
adc1c26
Merge branch 'master' into piechart
gunrot Jun 30, 2017
0727398
merge upstream/master
Mar 4, 2018
bc60ae5
Merge branch 'master' into piechart
Feb 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions examples/piechart/FpsItem.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import QtQuick 2.0

Item {
id: root
property int frameCounter: 0
property int frameCounterAvg: 0
property int counter: 0
property int fps: 0
property int fpsAvg: 0
width: 140 * dp
height: Math.floor(48 * dp)

Image {
id: spinnerImage
anchors.verticalCenter: parent.verticalCenter
x: 4 * dp
width: 36 * dp
height: width
source: "images/spinner.png"
NumberAnimation on rotation {
from:0
to: 360
duration: 800
loops: Animation.Infinite
}
onRotationChanged: frameCounter++;
}

Text {
anchors.left: spinnerImage.right
anchors.leftMargin: 8 * dp
anchors.verticalCenter: spinnerImage.verticalCenter
color: "#c0c0c0"
//style: Text.Outline
//styleColor: "#606060"
font.pixelSize: 18 * dp
text: "Ø " + root.fpsAvg + " | " + root.fps + " fps"
}

Timer {
interval: 2000
repeat: true
running: true
onTriggered: {
frameCounterAvg += frameCounter;
root.fps = frameCounter/2;
counter++;
frameCounter = 0;
if (counter >= 3) {
root.fpsAvg = frameCounterAvg/(2*counter)
frameCounterAvg = 0;
counter = 0;
}
}
}
}
27 changes: 27 additions & 0 deletions examples/piechart/deployment.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
android-no-sdk {
target.path = /data/user/qt
export(target.path)
INSTALLS += target
} else:android {
x86 {
target.path = /libs/x86
} else: armeabi-v7a {
target.path = /libs/armeabi-v7a
} else {
target.path = /libs/armeabi
}
export(target.path)
INSTALLS += target
} else:unix {
isEmpty(target.path) {
qnx {
target.path = /tmp/$${TARGET}/bin
} else {
target.path = /opt/$${TARGET}/bin
}
export(target.path)
}
INSTALLS += target
}

export(INSTALLS)
Binary file added examples/piechart/images/spinner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions examples/piechart/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "piechart.h"

int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);

QGuiApplication app(argc, argv);

QQmlApplicationEngine engine;
qmlRegisterType<PieChart>("PieChart", 1, 0, "PieChart");
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

return app.exec();
}
Loading