From d2236a27d1ed215ee46e6ec352061c53a5e49523 Mon Sep 17 00:00:00 2001 From: Mohammed Sameer Date: Fri, 9 Aug 2013 22:49:40 +0300 Subject: [PATCH] Initial sailfish port --- qml/sailfish/CameraButton.qml | 30 ++++++++++++++++ qml/sailfish/CameraButtonRow.qml | 28 +++++++++++++++ qml/sailfish/CameraButtonStyle.qml | 33 ++++++++++++++++++ qml/sailfish/CameraInfoBanner.qml | 34 ++++++++++++++++++ qml/sailfish/CameraLabel.qml | 28 +++++++++++++++ qml/sailfish/CameraPage.qml | 28 +++++++++++++++ qml/sailfish/CameraPositionSource.qml | 50 +++++++++++++++++++++++++++ qml/sailfish/CameraQueryDialog.qml | 35 +++++++++++++++++++ qml/sailfish/CameraSlider.qml | 32 +++++++++++++++++ qml/sailfish/CameraSwitch.qml | 28 +++++++++++++++ qml/sailfish/CameraTextField.qml | 28 +++++++++++++++ qml/sailfish/CameraToolIcon.qml | 32 +++++++++++++++++ qml/sailfish/CameraWindow.qml | 28 +++++++++++++++ qml/sailfish/FullScreenThumbnail.qml | 32 +++++++++++++++++ 14 files changed, 446 insertions(+) create mode 100644 qml/sailfish/CameraButton.qml create mode 100644 qml/sailfish/CameraButtonRow.qml create mode 100644 qml/sailfish/CameraButtonStyle.qml create mode 100644 qml/sailfish/CameraInfoBanner.qml create mode 100644 qml/sailfish/CameraLabel.qml create mode 100644 qml/sailfish/CameraPage.qml create mode 100644 qml/sailfish/CameraPositionSource.qml create mode 100644 qml/sailfish/CameraQueryDialog.qml create mode 100644 qml/sailfish/CameraSlider.qml create mode 100644 qml/sailfish/CameraSwitch.qml create mode 100644 qml/sailfish/CameraTextField.qml create mode 100644 qml/sailfish/CameraToolIcon.qml create mode 100644 qml/sailfish/CameraWindow.qml create mode 100644 qml/sailfish/FullScreenThumbnail.qml diff --git a/qml/sailfish/CameraButton.qml b/qml/sailfish/CameraButton.qml new file mode 100644 index 0000000..9791e2b --- /dev/null +++ b/qml/sailfish/CameraButton.qml @@ -0,0 +1,30 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Button { + property bool checked + property bool capitalize + property bool checkable +} diff --git a/qml/sailfish/CameraButtonRow.qml b/qml/sailfish/CameraButtonRow.qml new file mode 100644 index 0000000..d20dadd --- /dev/null +++ b/qml/sailfish/CameraButtonRow.qml @@ -0,0 +1,28 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Row { + property bool exclusive +} diff --git a/qml/sailfish/CameraButtonStyle.qml b/qml/sailfish/CameraButtonStyle.qml new file mode 100644 index 0000000..89e9ef0 --- /dev/null +++ b/qml/sailfish/CameraButtonStyle.qml @@ -0,0 +1,33 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +QtObject { + property real backgroundMarginLeft + property real backgroundMarginTop + property real backgroundMarginRight + property real backgroundMarginBottom + property string pressedBackground + property string background +} diff --git a/qml/sailfish/CameraInfoBanner.qml b/qml/sailfish/CameraInfoBanner.qml new file mode 100644 index 0000000..cae8947 --- /dev/null +++ b/qml/sailfish/CameraInfoBanner.qml @@ -0,0 +1,34 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Item { + property string text + + function show() { + console.log("=======================================\n") + console.log(text + "\n") + console.log("=======================================\n") + } +} diff --git a/qml/sailfish/CameraLabel.qml b/qml/sailfish/CameraLabel.qml new file mode 100644 index 0000000..569121f --- /dev/null +++ b/qml/sailfish/CameraLabel.qml @@ -0,0 +1,28 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Label { + +} diff --git a/qml/sailfish/CameraPage.qml b/qml/sailfish/CameraPage.qml new file mode 100644 index 0000000..af285d7 --- /dev/null +++ b/qml/sailfish/CameraPage.qml @@ -0,0 +1,28 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Page { + allowedOrientations: Orientation.Landscape +} diff --git a/qml/sailfish/CameraPositionSource.qml b/qml/sailfish/CameraPositionSource.qml new file mode 100644 index 0000000..c504382 --- /dev/null +++ b/qml/sailfish/CameraPositionSource.qml @@ -0,0 +1,50 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import QtLocation 5.0 + +PositionSource { + // NOTE: The source will not reset the position when we lose the signal. + // This shouldn't be a big problem as we are course enough. + // If we ever need street level updates then this will be an issue. + id: positionSource + + property real longitude + property real latitude + property real altitude + property real horizontalAccuracy + property bool longitudeValid + property bool latitudeValid + property bool altitudeValid + property bool horizontalAccuracyValid +/* + property alias longitude: position.coordinate.longitude + property alias latitude: position.coordinate.latitude + property alias altitude: position.coordinate.altitude + property alias longitudeValid: position.longitudeValid + property alias latitudeValid: position.latitudeValid + property alias altitudeValid: position.altitudeValid + property alias horizontalAccuracy: position.horizontalAccuracy + property alias horizontalAccuracyValid: position.horizontalAccuracyValid +*/ +} diff --git a/qml/sailfish/CameraQueryDialog.qml b/qml/sailfish/CameraQueryDialog.qml new file mode 100644 index 0000000..e1aacce --- /dev/null +++ b/qml/sailfish/CameraQueryDialog.qml @@ -0,0 +1,35 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Item { + property bool isOpen: false //status == DialogStatus.Open + property bool isOpening: false //status == DialogStatus.Opening + property string rejectButtonText + property string acceptButtonText + property string titleText + signal accepted + signal rejected + signal statusChanged +} diff --git a/qml/sailfish/CameraSlider.qml b/qml/sailfish/CameraSlider.qml new file mode 100644 index 0000000..e7c356f --- /dev/null +++ b/qml/sailfish/CameraSlider.qml @@ -0,0 +1,32 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Slider { + property int orientation + property string handleBackgroundPressed + property string handleBackground + property bool valueIndicatorVisible + handleVisible: false +} diff --git a/qml/sailfish/CameraSwitch.qml b/qml/sailfish/CameraSwitch.qml new file mode 100644 index 0000000..35a6d82 --- /dev/null +++ b/qml/sailfish/CameraSwitch.qml @@ -0,0 +1,28 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Switch { + +} diff --git a/qml/sailfish/CameraTextField.qml b/qml/sailfish/CameraTextField.qml new file mode 100644 index 0000000..22ee7c8 --- /dev/null +++ b/qml/sailfish/CameraTextField.qml @@ -0,0 +1,28 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +TextField { + +} diff --git a/qml/sailfish/CameraToolIcon.qml b/qml/sailfish/CameraToolIcon.qml new file mode 100644 index 0000000..8dbe0dc --- /dev/null +++ b/qml/sailfish/CameraToolIcon.qml @@ -0,0 +1,32 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +IconButton { + property string iconSource + width: 64 + height: 64 + Component.onCompleted: icon.source = iconSource + onIconSourceChanged: icon.source = iconSource +} diff --git a/qml/sailfish/CameraWindow.qml b/qml/sailfish/CameraWindow.qml new file mode 100644 index 0000000..48168c3 --- /dev/null +++ b/qml/sailfish/CameraWindow.qml @@ -0,0 +1,28 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +ApplicationWindow { + +} diff --git a/qml/sailfish/FullScreenThumbnail.qml b/qml/sailfish/FullScreenThumbnail.qml new file mode 100644 index 0000000..31b9d47 --- /dev/null +++ b/qml/sailfish/FullScreenThumbnail.qml @@ -0,0 +1,32 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import org.nemomobile.thumbnailer 1.0 + +Thumbnail { + property bool error: status == Thumbnail.Error + anchors.fill: parent + fillMode: Thumbnail.PreserveAspectFit + priority: Thumbnail.HighPriority +} -- 2.25.1