This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QDBusConnection> | |
... | |
QDBusConnection::sessionBus().connect("", "/com/jolla/lipstick", "com.jolla.lipstick", "coverstatus", | |
this, SLOT(handleCoverstatus(const QDBusMessage&))); | |
... | |
void myclass::handleCoverstatus(const QDBusMessage& msg) | |
{ | |
QList<QVariant> args = msg.arguments(); | |
m_coverStatus = args.at(0).toInt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Myclass::start() | |
{ | |
/* Read the file once */ | |
tmpFileProcess("/tmp/testi"); | |
/* Watch the file */ | |
tmpFileNotifier = new QFileSystemWatcher(QStringList() << "/tmp/testi", this); | |
/* Connect fileChanged to our slot */ | |
connect(tmpFileNotifier, SIGNAL(fileChanged(QString)), this, SLOT(tmpFileProcess(QString))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rectangle | |
{ | |
color: "transparent" | |
height: Theme.itemSizeMedium | |
width: parent.width | |
Label | |
{ | |
width: 80 | |
id: bb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resistanssi. | |
Testi. | |
Kissa. | |
Resistanssi. | |
Testi. | |
Kissa. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -i coveraction | while read -r line | |
do | |
a=`echo $line | cut -d "." -f 4` | |
b=`echo ${a//pid}` | |
c=`ps -p $b o ucomm --no-heading` | |
echo $c | |
grep -Le "NoDisplay=true" /usr/share/applications/*.desktop | while read file | |
do | |
grep -le "Exec.*$c.*" $file | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import Sailfish.Silica 1.0 | |
import "pages" | |
ApplicationWindow | |
{ | |
initialPage: Component { Fantsucam { } } | |
cover: Qt.resolvedUrl("cover/CoverPage.qml") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (C) 2013 Jolla Ltd. | |
Contact: Thomas Perl <thomas.perl@jollamobile.com> | |
All rights reserved. | |
You may use this file under the terms of BSD license as follows: | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Page | |
{ | |
Timer | |
{ | |
interval: 100 | |
running: true | |
repeat: true | |
onTriggered: k.text += "kissa " | |
} | |
Label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Item | |
{ | |
Rectangle | |
{ | |
id: rect | |
width: 200; height: 200 | |
color: "red" | |
y: 280 | |
x: 30 | |
onXChanged: console.log(x + " " + y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextArea | |
{ | |
id: area | |
width: showPastePage.width | |
height: showPastePage.height - dh.height | |
anchors.top: dh.bottom | |
selectionMode: TextEdit.SelectCharacters | |
readOnly: true |
OlderNewer