Commit b814e8d6 authored by Thomas Perl's avatar Thomas Perl

[cleanup] Remove unmaintained rndregisterui

parent 8fe04826
/**
* @file main.cpp
* @copyright 2012 Jolla Ltd.
* @author Bernd Wachter <bernd.wachter@jollamobile.com>
* @date 2012
*/
#include <QApplication>
#include "rndregisterui.h"
Q_DECL_EXPORT int main(int argc, char** argv){
QApplication app(argc, argv);
QCoreApplication::setOrganizationName("Jolla");
QCoreApplication::setOrganizationDomain("http://www.jollamobile.com");
QCoreApplication::setApplicationName("rndregisterui");
RndRegisterUi mw;
mw.showFullScreen();
return app.exec();
}
<RCC>
<qresource prefix="/">
<file>resources/qml/rndregisterui.qml</file>
<file>resources/qml/RndSsuPage.qml</file>
</qresource>
</RCC>
\ No newline at end of file
import QtQuick 1.1
import com.nokia.meego 1.0
Page {
id: rndSsuPage
Connections {
target: ssu
onDone: {
if (ssu.error()){
lblRegistrationStatus.text = qsTr("Device registration failed")
lblRegistrationStatus.text += ssu.lastError()
registerButton.enabled = true
} else {
lblRegistrationStatus.text = qsTr("Device is registered")
}
refreshCredentialsButton.enabled = true
}
onRegistrationStatusChanged: {
if (ssu.isRegistered()){
columnRegister.visible = false
columnRegistered.visible = true
} else {
columnRegister.visible = true
columnRegistered.visible = false
}
}
onCredentialsChanged: {
lblCredentialsDate.text = ssu.lastCredentialsUpdate()
}
onFlavourChanged: {
var flavour = ssu.flavour();
if (flavour == "devel"){
btnFlvrDevel.checked = true
} else if (flavour == "testing"){
btnFlvrTesting.checked = true
} else if (flavour == "release"){
btnFlvrRelease.checked = true
}
}
}
TabGroup{
id: tabgroup
currentTab: tab1
Page {
id: tab1
Flickable {
id: flickT1
width: parent.width
height: parent.height
flickableDirection: Flickable.VerticalFlick
contentWidth: columnT1.paintedWidth
contentHeight: columnT1.height
Column {
id: columnT1
width: parent.width
spacing: 20;
Label {
id: lblRegistrationHeader
width: parent.width
text: qsTr("Device registration")
}
Column {
id: columnRegister
width: parent.width
visible: !ssu.isRegistered()
spacing: 20
Label {
id: lblJollaId
text: qsTr("Jolla Username:")
width: parent.width
}
TextField {
id: inputJollaId
text: ""
width: parent.width
}
Label {
id: lblJollaPasswd
text: "Jolla password:"
width: parent.width
}
TextField {
id: inputJollaPasswd
echoMode: TextInput.Password
text: ""
width: parent.width
}
Button {
id: registerButton
function registerButtonClicked(){
registerButton.enabled = false
ssu.sendRegistration(inputJollaId.text, inputJollaPasswd.text)
}
onClicked: registerButtonClicked()
text: qsTr("Register Device")
width: parent.width
}
Label {
id: lblRegistrationStatus
width: parent.width
}
}
Column {
id: columnRegistered
width: parent.width
visible: ssu.isRegistered()
spacing: 20;
Label {
id: lblDeviceRegistered
text: qsTr("This device is registered")
width: parent.width
}
Button {
id: unregisterDeviceButton
onClicked: ssu.unregister()
text: qsTr("Unregister device")
width: parent.width
}
Button {
id: refreshCredentialsButton
function refreshCredentialsButtonClicked(){
refreshCredentialsButton.enabled = false
ssu.updateCredentials(true);
}
onClicked: refreshCredentialsButtonClicked()
text: qsTr("Update credentials")
width: parent.width
}
Label { text: qsTr("Last credentials update:") }
Label {
id: lblCredentialsDate
text: ssu.lastCredentialsUpdate()
width: parent.width
}
}
}
}
}
Page {
id: tab2
Flickable {
id: flickT2
width: parent.width
height: parent.height
flickableDirection: Flickable.VerticalFlick
contentWidth: columnT2.paintedWidth
contentHeight: columnT2.height
Column {
id: columnT2
width: parent.width
spacing: 20
}
}
}
Page {
id: tab3
Flickable {
id: flickT3
width: parent.width
height: parent.height
flickableDirection: Flickable.VerticalFlick
contentWidth: columnT3.paintedWidth
contentHeight: columnT3.height
Column {
id: columnT3
width: parent.width
spacing: 20
Label { id: lblT3_1; text: "Settings" }
Label { id: lblFlvr; text: "Flavour" }
ButtonColumn {
width: parent.width
Button {
id: btnFlvrDevel
text: "devel"
onClicked: ssu.setFlavour("devel")
checked: ssu.flavour() == "devel"
}
Button {
id: btnFlvrTesting
text: "testing"
onClicked: ssu.setFlavour("testing")
checked: ssu.flavour() == "testing"
}
Button {
id: btnFlvrRelease
text: "release"
onClicked: ssu.setFlavour("release")
checked: ssu.flavour() == "release"
}
}
Label { id: lblRelease; text: "Release" }
ButtonColumn {
width: parent.width
Button {
text: "latest"
onClicked: ssu.setRelease("latest", true)
checked: ssu.release(true) == "latest"
}
Button {
text: "next"
onClicked: ssu.setRelease("next", true)
checked: ssu.release(true) == "next"
}
}
}
}
}
}
tools:ToolBarLayout {
id: commonTools
visible: true
ButtonRow {
style: TabButtonStyle { }
TabButton {
text: qsTr("Registration")
tab: tab1
}
TabButton {
text: "B"
tab: tab2
visible: false
}
TabButton {
text: qsTr("Settings")
tab: tab3
}
}
ToolIcon {
platformIconId: "toolbar-view-menu"
anchors.right: (parent === undefined) ? undefined : parent.right
onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
}
}
Menu {
id: myMenu
visualParent: pageStack
MenuLayout {
MenuItem { text: qsTr("About"); }
MenuItem { text: qsTr("Exit application"); onClicked: root.quit() }
}
}
}
import QtQuick 1.1
import com.nokia.meego 1.0
PageStackWindow {
id: root
signal quit()
showStatusBar: true
showToolBar: true
initialPage: RndSsuPage {}
}
/**
* @file rndregisterui.cpp
* @copyright 2012 Jolla Ltd.
* @author Bernd Wachter <bernd.wachter@jollamobile.com>
* @date 2012
*/
#include <QDeclarativeContext>
#include <QDir>
#include <QGraphicsObject>
#include <QApplication>
#include "rndregisterui.h"
RndRegisterUi::RndRegisterUi(QWidget *parent): QMainWindow(parent){
ui = new QDeclarativeView;
ui->rootContext()->setContextProperty("ssu", &ssu);
QDir dir;
if (dir.exists("/home/nemo/rndregisterui.qml"))
ui->setSource(QUrl("file:///home/nemo/rndregisterui.qml"));
else
ui->setSource(QUrl("qrc:/resources/qml/rndregisterui.qml"));
setCentralWidget(ui);
QObject *item=dynamic_cast<QObject*>(ui->rootObject());
connect(item, SIGNAL(quit()), QApplication::instance(), SLOT(quit()));
}
RndRegisterUi::~RndRegisterUi(){
delete ui;
}
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=Jolla RND
Exec=invoker --type=q -s /usr/bin/rndregisterui
Icon=mad-developer
StartupNotify=true
/**
* @file rndregisterui.h
* @copyright 2012 Jolla Ltd.
* @author Bernd Wachter <bernd.wachter@jollamobile.com>
* @date 2012
*/
#ifndef RndRegisterUi_H
#define RndRegisterUi_H
#include <QMainWindow>
#include <QtDeclarative/QDeclarativeView>
#include "libssu/ssu.h"
namespace Ui {
class RndRegisterUi;
}
class RndRegisterUi: public QMainWindow{
Q_OBJECT
public:
explicit RndRegisterUi(QWidget *parent = 0);
~RndRegisterUi();
private:
Ssu ssu;
QDeclarativeView *ui;
};
#endif
TARGET = rndregisterui
include(../ssuapplication.pri)
include(rndregisterui_dependencies.pri)
HEADERS = rndregisterui.h
SOURCES = main.cpp \
rndregisterui.cpp
RESOURCES = resources.qrc
CONFIG += qdeclarative-boostable
QT += gui declarative
OTHER_FILES += \
resources/qml/rndregisterui.qml \
resources/qml/RndSsuPage.qml
desktop.files = rndregisterui.desktop
desktop.path = /usr/share/applications/
INSTALLS += desktop
......@@ -13,7 +13,6 @@ ssuconfhack {
SUBDIRS += tests tools
ssucli.depends = libssu
rndregisterui.depends = libssu
ssuurlresolver.depends = libssu
tests.depends = libssu
ssuks.depends = libssu
......
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