1
0
Fork 0
mirror of https://github.com/seiichiro0185/sailotp.git synced 2024-11-22 15:49:43 +00:00

Some minor changes

Switched to FileIO as subproject
Minor cosmetic changes for the CoverPage
This commit is contained in:
seiichiro 2014-02-23 16:46:38 +01:00
parent ffb712f685
commit 95f00e8dd0
5 changed files with 17 additions and 9 deletions

View file

@ -13,8 +13,7 @@ DEFINES += APP_BUILDNUM=\\\"$$RELEASE\\\"
CONFIG += sailfishapp CONFIG += sailfishapp
SOURCES += src/harbour-sailotp.cpp \ SOURCES += src/harbour-sailotp.cpp
src/fileio.cpp
OTHER_FILES += qml/harbour-sailotp.qml \ OTHER_FILES += qml/harbour-sailotp.qml \
qml/cover/CoverPage.qml \ qml/cover/CoverPage.qml \
@ -34,9 +33,6 @@ OTHER_FILES += qml/harbour-sailotp.qml \
qml/pages/ScanOTP.qml \ qml/pages/ScanOTP.qml \
qml/lib/urldecoder.js qml/lib/urldecoder.js
HEADERS += \
src/fileio.h
i18n.files = i18n/*.qm i18n.files = i18n/*.qm
i18n.path = /usr/share/$${TARGET}/i18n i18n.path = /usr/share/$${TARGET}/i18n
@ -53,3 +49,4 @@ lupdate_only {
} }
include(src/qzxing/QZXing.pri) include(src/qzxing/QZXing.pri)
include(src/FileIO/FileIO.pri)

View file

@ -75,12 +75,17 @@ CoverBackground {
Column { Column {
anchors.top: logo.bottom anchors.top: logo.bottom
width: parent.width
anchors.topMargin: 48 anchors.topMargin: 48
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
Label { Label {
text: appWin.coverTitle text: appWin.coverTitle
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - Theme.paddingMedium*2
maximumLineCount: 1
truncationMode: TruncationMode.Fade
horizontalAlignment: contentWidth <= width ? Text.AlignHCenter : Text.AlignLeft
} }
Label { Label {
id: lOTP id: lOTP

7
src/FileIO/FileIO.pri Normal file
View file

@ -0,0 +1,7 @@
QT += core declarative
INCLUDEPATH += $$PWD/src
HEADERS += $$PWD/src/fileio.h
SOURCES += $$PWD/src/fileio.cpp

View file

@ -31,16 +31,15 @@
#define FILEIO_H #define FILEIO_H
#include <QObject> #include <QObject>
#include <QString>
class FileIO : public QObject class FileIO : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
Q_PROPERTY(QString source Q_PROPERTY(QString source READ source WRITE setSource NOTIFY sourceChanged)
READ source
WRITE setSource
NOTIFY sourceChanged)
explicit FileIO(QObject *parent = 0); explicit FileIO(QObject *parent = 0);
Q_INVOKABLE QString read(); Q_INVOKABLE QString read();