Skip to content

Commit

Permalink
Changed named to Focus and updated font
Browse files Browse the repository at this point in the history
  • Loading branch information
dragly committed Nov 7, 2014
1 parent 59c86df commit 99f8e3e
Show file tree
Hide file tree
Showing 29 changed files with 166 additions and 348 deletions.
9 changes: 9 additions & 0 deletions focus.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# The .cpp file which was generated for your project. Feel free to hack it.
QT += quick

SOURCES += main.cpp

RESOURCES += \
qml.qrc \
sounds.qrc \
fonts.qrc
16 changes: 16 additions & 0 deletions fonts.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<RCC>
<qresource prefix="/">
<file>fonts/SourceSansPro-Black.ttf</file>
<file>fonts/SourceSansPro-BlackItalic.ttf</file>
<file>fonts/SourceSansPro-Bold.ttf</file>
<file>fonts/SourceSansPro-BoldItalic.ttf</file>
<file>fonts/SourceSansPro-ExtraLight.ttf</file>
<file>fonts/SourceSansPro-ExtraLightItalic.ttf</file>
<file>fonts/SourceSansPro-Italic.ttf</file>
<file>fonts/SourceSansPro-Light.ttf</file>
<file>fonts/SourceSansPro-LightItalic.ttf</file>
<file>fonts/SourceSansPro-Regular.ttf</file>
<file>fonts/SourceSansPro-Semibold.ttf</file>
<file>fonts/SourceSansPro-SemiboldItalic.ttf</file>
</qresource>
</RCC>
92 changes: 92 additions & 0 deletions fonts/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file added fonts/SourceSansPro-Black.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-BlackItalic.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-Bold.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-BoldItalic.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-ExtraLight.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-ExtraLightItalic.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-Italic.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-Light.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-LightItalic.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-Regular.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-Semibold.ttf
Binary file not shown.
Binary file added fonts/SourceSansPro-SemiboldItalic.ttf
Binary file not shown.
14 changes: 8 additions & 6 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"
#include <QFontDatabase>
#include <QGuiApplication>
#include <QQmlApplicationEngine>

int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);

QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/pomodoro/main.qml"));
// viewer.showFullScreen();
viewer.show();
QFontDatabase::addApplicationFont(":/fonts/SourceSansPro-Regular.ttf");
app.setFont(QFont("Source Sans Pro"));

QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));

return app.exec();
}
17 changes: 0 additions & 17 deletions pomodoro.pro

This file was deleted.

Binary file removed pomodoro64.png
Binary file not shown.
Binary file removed pomodoro80.png
Binary file not shown.
6 changes: 6 additions & 0 deletions qml.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>qml/main.qml</file>
<file>qml/Focus.qml</file>
</qresource>
</RCC>
15 changes: 12 additions & 3 deletions qml/pomodoro/main.qml → qml/Focus.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Rectangle {
font.pixelSize: height
horizontalAlignment: Text.AlignHCenter
scale: paintedWidth > width ? (width / paintedWidth) : 1
smooth: true
renderType: Text.NativeRendering
}

Text {
Expand All @@ -113,6 +115,8 @@ Rectangle {
text: ((hoursLeft > 0) ? pad(hoursLeft,1) + ":" : "")
+ ((hoursLeft > 0 || minutesLeft > 0) ? pad(minutesLeft, (hoursLeft > 0) ? 2 : 1) + ":" : "")
+ pad(secondsLeft, (minutesLeft > 0) ? 2 : 1)
smooth: true
renderType: Text.NativeRendering
}
Text {
id: footerText
Expand All @@ -128,6 +132,8 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter
scale: paintedWidth > width ? (width / paintedWidth) : 1
text: hoursLeft > 0 ? "more hours" : "more minutes"
smooth: true
renderType: Text.NativeRendering
}

Timer {
Expand Down Expand Up @@ -183,25 +189,28 @@ Rectangle {
onWheel: {
if(pomodoroRoot.state === "pomodoro") {
timeLeft += wheel.angleDelta.y / 120. * 60.
if(timeLeft < 0) {
timeLeft = 0
}
}
}
}

SoundEffect {
id: dontWorrySound
loops: 1
source: "dontworry.wav"
source: "../sounds/dontworry.wav"
}

SoundEffect {
id: allYouGotSound
loops: 1
source: "allyougot.wav"
source: "../sounds/allyougot.wav"
}

SoundEffect {
id: shotKillSound
loops: 1
source: "shotkill.wav"
source: "../sounds/shotkill.wav"
}
}
16 changes: 16 additions & 0 deletions qml/main.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.0

ApplicationWindow {
id: applicationWindow1
visible: true
width: 1280
height: 800
title: qsTr("FocusMe")

FocusTime {
anchors.fill: parent
}
}

87 changes: 0 additions & 87 deletions qtquick2applicationviewer/qtquick2applicationviewer.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions qtquick2applicationviewer/qtquick2applicationviewer.h

This file was deleted.

Loading

0 comments on commit 99f8e3e

Please sign in to comment.