OSDN Git Service

Version: 0.2
authorTakumi ASAKI <takumi.asaki@gmail.com>
Wed, 11 Jan 2012 09:58:30 +0000 (18:58 +0900)
committerTakumi ASAKI <takumi.asaki@gmail.com>
Wed, 11 Jan 2012 09:58:30 +0000 (18:58 +0900)
* Change license to BSD
* Add 'View Current Fonts Config' to MainPage
* Modify some views.

23 files changed:
.gitignore
applicationcontroller.cpp
applicationcontroller.h
fontconfigmanager.cpp
fontconfigmanager.h
fontinfo.cpp
fontinfo.h
fontsconfigproperties.cpp
fontsconfigproperties.h
installedfontinfo.cpp
installedfontinfo.h
main.cpp
qml/fontmanager/ConfigValueComboBox.qml
qml/fontmanager/FontInstallPage.qml
qml/fontmanager/FontSelectPage.qml
qml/fontmanager/FontsConfProperties.qml
qml/fontmanager/FontsConfViewPage.qml [new file with mode: 0644]
qml/fontmanager/InstalledFontInfoPage.qml
qml/fontmanager/MainPage.qml
qml/fontmanager/functions.js
qml/fontmanager/main.qml
qtc_packaging/debian_harmattan/changelog
qtc_packaging/debian_harmattan/copyright

index 6bf1a63..8d827ee 100644 (file)
@@ -6,3 +6,4 @@ moc_*
 ui_*
 *~
 *.bak
+header.*
index 4f2eb14..dd1ac23 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #include "applicationcontroller.h"
 
 #include "fontconfigmanager.h"
@@ -27,6 +65,7 @@ void ApplicationController::init()
     connect(mFontConfig, SIGNAL(fcCacheFinished()), mFontConfig, SLOT(readFcList()));
     connect(mFontConfig, SIGNAL(familiesChanged()), SLOT(syncInstalledFonts()));
     connect(mFontConfig, SIGNAL(warning(QString)), SIGNAL(alertDialog(QString)));
+    connect(mFontConfig, SIGNAL(localFontsConfPathChanged()), SIGNAL(localFontsConfPathChanged()));
 
     mFontConfig->setLocalFontsConfPath(QDir::homePath() + QLatin1String("/.fonts.conf"));
 
@@ -105,9 +144,23 @@ QStringList ApplicationController::fontCount(const QString &fontpath) const
     return mFontConfig->fontCount(fontpath);
 }
 
+bool ApplicationController::localFontsConfExists() const
+{
+    if (!mFontConfig)
+        return false;
+    return QFile::exists(mFontConfig->localFontsConfPath());
+}
+
+QString ApplicationController::localFontsConf() const
+{
+    if (!mFontConfig)
+        return QString();
+    return mFontConfig->localFontsConf();
+}
+
 void ApplicationController::installFont()
 {
-    qDebug() << "ApplicationController::installFont()" << mNextJob;
+//    qDebug() << "ApplicationController::installFont()" << mNextJob;
 
     FontInfo *info = qobject_cast<FontInfo *>(mJobOption.value<QObject*>());
     if (!info)
@@ -166,7 +219,7 @@ void ApplicationController::installFont()
 
 void ApplicationController::installFont(FontInfo *fontinfo)
 {
-    qDebug() << "ApplicationController::installFont(" << fontinfo->families() << ")";
+//    qDebug() << "ApplicationController::installFont(" << fontinfo->families() << ")";
 
     mNextJob = Nothing;
     mJobOption = QVariant::fromValue<QObject *>(fontinfo);
@@ -186,7 +239,7 @@ void ApplicationController::updateFontsConf(InstalledFontInfo *fontInfo)
 
 void ApplicationController::uninstallFont(const QString &fontpath)
 {
-    qDebug() << "ApplicationController::uninstallFont(" << fontpath << ")";
+//    qDebug() << "ApplicationController::uninstallFont(" << fontpath << ")";
     bool check = QFile::remove(fontpath);
     if (check) {
         emit uninstallFinished(fontpath);
@@ -197,7 +250,7 @@ void ApplicationController::uninstallFont(const QString &fontpath)
 
 void ApplicationController::confirm(bool ok)
 {
-    qDebug() << "ApplicationController::confirm(" << ok << ")";
+//    qDebug() << "ApplicationController::confirm(" << ok << ")";
     if (!ok) {
         mNextJob = Nothing;
         mJobOption.clear();
index 3574f8b..b36e820 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #ifndef APPLICATIONCONTROLLER_H
 #define APPLICATIONCONTROLLER_H
 
@@ -19,6 +57,9 @@ class ApplicationController : public QObject
     Q_PROPERTY(QStringList fontList READ fontList NOTIFY fontListChanged)
     Q_PROPERTY(bool fontDirExists READ fontDirExists)
     Q_PROPERTY(bool showSystemFont READ showSystemFont WRITE setShowSystemFont NOTIFY showSystemFontChanged)
+
+    Q_PROPERTY(QString localFontsConf READ localFontsConf NOTIFY localFontsConfPathChanged)
+    Q_PROPERTY(bool localFontsConfExists READ localFontsConfExists NOTIFY localFontsConfPathChanged)
 public:
     explicit ApplicationController(QObject *parent = 0);
     
@@ -42,6 +83,9 @@ public:
     Q_INVOKABLE InstalledFontInfo *fontInfo(const QString &family) const;
     Q_INVOKABLE QStringList fontCount(const QString &fontpath) const;
 
+    bool localFontsConfExists() const;
+    QString localFontsConf() const;
+
 signals:
     void alertDialog(const QString &message);
 
@@ -58,6 +102,8 @@ signals:
     void clearInstalledFontList();
     void appendInstalledFont(const QString &family, const QString &fullname);
 
+    void localFontsConfPathChanged();
+
 public slots:
     void installFont();
     void installFont(FontInfo *fontinfo);
index 64a4dcb..779a289 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #include "fontconfigmanager.h"
 
 #include "installedfontinfo.h"
@@ -57,7 +95,10 @@ QString FontConfigManager::localFontsConfPath() const
 
 void FontConfigManager::setLocalFontsConfPath(const QString &path)
 {
-    mLocalFontsConfPath = path;
+    if (mLocalFontsConfPath != path) {
+        mLocalFontsConfPath = path;
+        emit localFontsConfPathChanged();
+    }
 }
 
 bool FontConfigManager::hasUnknownConfig() const
@@ -119,7 +160,7 @@ int FontConfigManager::count() const
 
 void FontConfigManager::appendFontProperty(FontsConfigProperties *prop, const QStringList &familyList)
 {
-    qDebug() << "appendFontProperty(" << prop->family() << "," << familyList << ")";
+//    qDebug() << "appendFontProperty(" << prop->family() << "," << familyList << ")";
 
     if (!prop->preferFamilies().isEmpty() ||
             prop->embeddedBitmap() != FontsConfigProperties::Default ||
@@ -187,6 +228,22 @@ FontsConfigProperties *FontConfigManager::fontProperty(InstalledFontInfo *fontIn
     return fontProperty(fontInfo->enfamily(), fontInfo->family());
 }
 
+QString FontConfigManager::localFontsConf() const
+{
+    QFile fp(mLocalFontsConfPath);
+
+    if (!fp.exists())
+        return QString();
+
+    if (!fp.open(QIODevice::ReadOnly))
+        return QString();
+
+    QString buf = fp.readAll();
+    fp.close();
+
+    return buf;
+}
+
 void FontConfigManager::appendFontPropertyBool(const QString &config, FontsConfigProperties::ConfigValue value, FontsConfigProperties *prop, const QStringList &familyList)
 {
     static const char *boolValues[] = { "true", "false", 0 };
@@ -223,7 +280,7 @@ bool FontConfigManager::fontPropertyBoolValue(const QString &config, bool value,
 
 void FontConfigManager::runFcCache()
 {
-    qDebug("runFcCache()");
+//    qDebug("runFcCache()");
     QProcess *proc = new QProcess(this);
     connect(proc, SIGNAL(finished(int)), SIGNAL(fcCacheFinished()));
     proc->start(FCBIN_PATH FCCACHE_COMMAND, QStringList() << FCCACHE_OPTION);
@@ -231,7 +288,7 @@ void FontConfigManager::runFcCache()
 
 void FontConfigManager::readFcList()
 {
-    qDebug("FontConfigManager::readFcList()");
+//    qDebug("FontConfigManager::readFcList()");
     QProcess *proc = new QProcess(this);
     proc->start(FCBIN_PATH FCLIST_COMMAND, QStringList() << FCLIST_OPTION);
     if (!proc->waitForStarted())
index 89a1660..c06fbb1 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #ifndef FONTCONFIGMANAGER_H
 #define FONTCONFIGMANAGER_H
 
@@ -46,6 +84,8 @@ public:
     FontsConfigProperties *fontProperty(const QString &family, const QStringList &familyList = QStringList()) const;
     FontsConfigProperties *fontProperty(InstalledFontInfo *fontInfo) const;
 
+    QString localFontsConf() const;
+
 private:
     void appendFontPropertyBool(const QString &config, FontsConfigProperties::ConfigValue value, FontsConfigProperties *prop, const QStringList &familyList = QStringList());
     bool fontPropertyBoolValue(const QString &config, bool value, const QString &family, const QStringList &familyList) const;
@@ -57,6 +97,8 @@ signals:
     void systemFamiliesChanged();
     void localFamiliesChanged();
 
+    void localFontsConfPathChanged();
+
     void warning(const QString &message);
 
 private slots:
index c2727a9..4e238d0 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #include "fontinfo.h"
 
 #include "fontsconfigproperties.h"
index 015e099..c7d20b0 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #ifndef FONTINFO_H
 #define FONTINFO_H
 
index 7921e8f..70654aa 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #include "fontsconfigproperties.h"
 
 FontsConfigProperties::FontsConfigProperties(const QString &family, QObject *parent) :
index 2b4d359..55529d0 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #ifndef FONTSCONFIGPROPERTIES_H
 #define FONTSCONFIGPROPERTIES_H
 
index 7d83070..eb7fb06 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #include "installedfontinfo.h"
 
 #include "fontsconfigproperties.h"
index a642afb..64e1125 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #ifndef INSTALLEDFONTINFO_H
 #define INSTALLEDFONTINFO_H
 
index ecca295..9fefadc 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 #include <QtGui/QApplication>
 #include "qmlapplicationviewer.h"
 #include "applicationcontroller.h"
index 1d41fc6..6a997fb 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import 'UIConstants.js' as UI
index dc8e0b9..28ce259 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
 import QtQuick 1.1
 import com.nokia.meego 1.0
@@ -71,7 +109,8 @@ Page {
                             text: qsTr("Example: ")
                         }
                         Label {
-                            width: parent.width
+                            width: parent.width - UI.DEFAULT_MARGIN * 2
+                            x: UI.DEFAULT_MARGIN
                             text: qsTr("The quick brown fox jumps over the lazy dog")
                             font.family: modelData
                         }
index 730e356..f08e43a 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
 import QtQuick 1.1
 import com.nokia.meego 1.0
@@ -40,13 +78,26 @@ Page {
         delegate: Item {
             width: folderListView.width
             height: UI.LIST_ITEM_HEIGHT_SMALL
+
+            BorderImage {
+                id: background
+                anchors.fill: parent
+                // Fill page porders
+                anchors.leftMargin: -UI.MARGIN_XLARGE
+                anchors.rightMargin: -UI.MARGIN_XLARGE
+                visible: mouseArea.pressed
+                source: "image://theme/meegotouch-list-background-pressed-center"
+            }
+
             Label {
                 id: fontNameLabel
                 text: fileName
                 width: parent.width
                 anchors.verticalCenter: parent.verticalCenter
+                color: UI.COLOR_FOREGROUND
             }
             MouseArea {
+                id: mouseArea
                 anchors.fill: parent
                 onClicked: {
                     if (folderListModel.isFolder(index)) {
index 86440b4..aa5a4c5 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
 import QtQuick 1.1
 import com.nokia.meego 1.0
diff --git a/qml/fontmanager/FontsConfViewPage.qml b/qml/fontmanager/FontsConfViewPage.qml
new file mode 100644 (file)
index 0000000..943098d
--- /dev/null
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
+// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
+import QtQuick 1.1
+import com.nokia.meego 1.0
+import 'UIConstants.js' as UI
+
+Page {
+    id: fontsConfViewPage
+
+    tools: backTools
+
+    property alias text: textArea.text
+
+    Label {
+        id: pageHeader
+        anchors.top: parent.top
+        anchors.horizontalCenter: parent.horizontalCenter
+        anchors.margins: UI.DEFAULT_MARGIN
+
+        horizontalAlignment: Text.AlignHCenter
+        font.pixelSize: UI.FONT_LARGE
+        font.bold: true
+        text: qsTr("Current Fonts Config")
+    }
+
+
+    Rectangle {
+        id: rect
+        anchors.top: pageHeader.bottom
+        anchors.bottom: parent.bottom
+        anchors.left: parent.left
+        anchors.right: parent.right
+        anchors.margins: UI.DEFAULT_MARGIN
+
+        border.width: 1
+        border.color: "gray"
+        color: "transparent"
+
+        Flickable {
+            id: flickable
+            anchors.fill: parent
+
+            clip: true
+            boundsBehavior: Flickable.StopAtBounds
+            contentWidth: textArea.paintedWidth
+            contentHeight: textArea.paintedHeight
+            Text {
+                id: textArea
+                //        readOnly: true
+                //            anchors.fill: parent
+                textFormat: Text.PlainText
+                font.pixelSize: UI.FONT_DEFAULT_SIZE
+            }
+        }
+    }
+
+    ToolBarLayout {
+        id: backTools
+        ToolIcon {
+            platformIconId: "toolbar-back"
+            onClicked: pageStack.pop()
+        }
+    }
+
+}
index 828cfc3..371f117 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
 import QtQuick 1.1
 import com.nokia.meego 1.0
@@ -51,6 +89,16 @@ Page {
             }
             Label {
                 width: parent.width
+                text: qsTr("<b>Example</b>: ")
+            }
+            Label {
+                width: parent.width - UI.DEFAULT_MARGIN * 2
+                x: UI.DEFAULT_MARGIN
+                text: qsTr("The quick brown fox jumps over the lazy dog")
+                font.family: fontInfo.enfamily
+            }
+            Label {
+                width: parent.width
                 text: qsTr("<b>Style</b>: %1").arg(fontInfo.localestyle)
             }
             Label {
index eb60020..5ff82a1 100644 (file)
@@ -1,10 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import com.nokia.extras 1.1
 import 'UIConstants.js' as UI
 
 Page {
-    tools: commonTools
+    tools: mainTools
 
     Label {
         id: pageHeader
@@ -45,6 +83,8 @@ Page {
 
         delegate: ListDelegate {
             onClicked: {
+                if (mainMenu.status != DialogStatus.Closed)
+                    mainMenu.close()
                 pageStack.push(installedFontInfoPage, { "fontInfo": controller.fontInfo(title) } );
             }
         }
@@ -63,8 +103,48 @@ Page {
 
     Component {
         id: installedFontInfoPage
-        InstalledFontInfoPage {
+        InstalledFontInfoPage { }
+    }
+
+    Component {
+        id: fontsConfViewPageComponent
+        FontsConfViewPage { }
+    }
 
+    ToolBarLayout {
+        id: mainTools
+        visible: true
+        ToolIcon {
+            platformIconId: "toolbar-add"
+            onClicked: {
+                if (mainMenu.status != DialogStatus.Closed)
+                    mainMenu.close()
+                pageStack.push(fontSelectPage)
+            }
+        }
+        ToolIcon {
+            platformIconId: "toolbar-view-menu"
+            anchors.right: (parent === undefined) ? undefined : parent.right
+            onClicked: {
+                console.log("menu clicked");
+                (mainMenu.status == DialogStatus.Closed) ? mainMenu.open() : mainMenu.close()
+            }
         }
     }
+
+    Menu {
+        id: mainMenu
+        visualParent: pageStack
+        MenuLayout {
+            MenuItem {
+                text: qsTr("View Current Fonts Config");
+                enabled: controller.localFontsConfExists
+                onClicked: {
+                    mainMenu.close()
+                    pageStack.push(fontsConfViewPageComponent, { "text": controller.localFontsConf } )
+                }
+            }
+        }
+    }
+
 }
index 6dffde5..9571282 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 .pragma library
 
 function toString(varlist)
index 36d636f..273ca12 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the 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
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import 'UIConstants.js' as UI
@@ -72,18 +110,4 @@ PageStackWindow {
         onRejected: pageStack.pop(mainPage)
     }
 
-    ToolBarLayout {
-        id: commonTools
-        visible: true
-        ToolIcon {
-            platformIconId: "toolbar-add"
-            onClicked: {
-                pageStack.push(fontSelectPage)
-            }
-        }
-        ToolIcon {
-            platformIconId: "toolbar-view-menu"
-            anchors.right: (parent === undefined) ? undefined : parent.right
-        }
-    }
 }
index 92363a8..b45a4c2 100644 (file)
@@ -1,3 +1,11 @@
+fontmanager (0.2) unstable; urgency=low
+
+  * Change license to BSD
+  * Add 'View Current Fonts Config' to MainPage
+  * Modify some views.
+
+ -- Takumi Asaki <takumi.asaki@gmail.com>  Wed, 11 Jan 2012 18:00:00 +0900
+
 fontmanager (0.1) unstable; urgency=low
 
   * Initial Release.
index 76743c8..80f2bbd 100644 (file)
@@ -1,5 +1,5 @@
 This package was debianized by Takumi Asaki <takumi.asaki@gmail.com> on
-Thu, 29 Dec 2011 10:12:07 +0900.
+Wed, 11 Jan 2012 13:30:00 +0900.
 
 Upstream Author(s):
 
@@ -11,26 +11,34 @@ Copyright:
 
 License:
 
-    This package is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This package is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this package; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
-
-The Debian packaging is (C) 2011, unknown <asaki@unknown> and
-is licensed under the GPL, see above.
-
-
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
+    You may use this file under the terms of the 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:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+    3. Neither the name of the University nor the names of its contributors
+       may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+On Debian systems, the complete text of the BSD License can be found
+in `/usr/share/common-licenses/BSD'.
+
+The Debian packaging is (C) 2012, Takumi Asaki <takumi.asaki@gmail.com> and
+is licensed under the BSD license, see above.