camera-app-3.0.0+16.04.20160323.3/ 0000755 0000156 0000165 00000000000 12674564773 016247 5 ustar pbuser pbgroup 0000000 0000000 camera-app-3.0.0+16.04.20160323.3/camera-contenthub.json 0000644 0000156 0000165 00000000077 12674564451 022536 0 ustar pbuser pbgroup 0000000 0000000 {
"source": [
"pictures",
"videos"
]
}
camera-app-3.0.0+16.04.20160323.3/CircleButton.qml 0000644 0000156 0000165 00000004701 12674564451 021352 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright 2014 Canonical Ltd.
*
* This program 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; version 3.
*
* This program 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 program. If not, see .
*/
import QtQuick 2.4
import QtQuick.Window 2.2
import Ubuntu.Components 1.3
AbstractButton {
id: button
property alias iconName: icon.name
property url iconSource
property bool on: true
property string label: ""
property bool automaticOrientation: true
width: units.gu(5)
height: width
Image {
anchors.fill: parent
source: "assets/ubuntu_shape.svg"
opacity: button.pressed ? 0.7 : 0.3
sourceSize.width: width
sourceSize.height: height
cache: true
asynchronous: true
}
Icon {
id: icon
anchors {
fill: parent
margins: units.gu(1)
}
source: name ? "image://theme/%1".arg(name) : button.iconSource
color: "white"
opacity: button.on ? (button.enabled ? 1.0 : 0.3): 0.5
visible: label === ""
rotation: automaticOrientation ? Screen.angleBetween(Screen.primaryOrientation, Screen.orientation) : 0
Behavior on rotation {
RotationAnimator {
duration: UbuntuAnimation.BriskDuration
easing: UbuntuAnimation.StandardEasing
direction: RotationAnimator.Shortest
}
}
}
Label {
anchors {
centerIn: parent
}
font.weight: Font.Light
fontSize: "small"
color: "white"
text: label
opacity: button.on ? (button.enabled ? 1.0 : 0.3): 0.5
visible: label !== ""
rotation: automaticOrientation ? Screen.angleBetween(Screen.primaryOrientation, Screen.orientation) : 0
Behavior on rotation {
RotationAnimator {
duration: UbuntuAnimation.BriskDuration
easing: UbuntuAnimation.StandardEasing
direction: RotationAnimator.Shortest
}
}
}
}
camera-app-3.0.0+16.04.20160323.3/ViewFinderGeometry.qml 0000644 0000156 0000165 00000003262 12674564451 022534 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright 2013 Canonical Ltd.
*
* This program 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; version 3.
*
* This program 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 program. If not, see .
*/
import QtQuick 2.4
Item {
property size cameraResolution;
property bool cameraResolutionValid: cameraResolution.width != -1
&& cameraResolution.height != -1
property int viewFinderHeight;
property int viewFinderWidth;
property int viewFinderOrientation;
property int __cameraWidth: Math.abs(viewFinderOrientation) == 90 ?
cameraResolution.height : cameraResolution.width
property int __cameraHeight: Math.abs(viewFinderOrientation) == 90 ?
cameraResolution.width : cameraResolution.height
property real widthScale: viewFinderWidth / __cameraWidth
property real heightScale: viewFinderHeight / __cameraHeight
width: cameraResolutionValid ? ((widthScale <= heightScale) ? viewFinderWidth : __cameraWidth * heightScale)
: viewFinderWidth
height: cameraResolutionValid ? ((widthScale <= heightScale) ? __cameraHeight * widthScale : viewFinderHeight)
: viewFinderHeight
}
camera-app-3.0.0+16.04.20160323.3/NoSpaceHint.qml 0000644 0000156 0000165 00000002151 12674564451 021125 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright 2015 Canonical Ltd.
*
* This program 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; version 3.
*
* This program 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 program. If not, see .
*/
import QtQuick 2.4
import Ubuntu.Components 1.3
Item {
id: noSpaceHint
Label {
id: hintLabel
anchors {
verticalCenter: parent.verticalCenter
horizontalCenter: parent.horizontalCenter
}
width: parent.width - 2 * units.gu(2)
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.Wrap
text: i18n.tr("No space left on device, free up space to continue.")
fontSize: "x-large"
color: "#ebebeb"
}
}
camera-app-3.0.0+16.04.20160323.3/SharePopover.qml 0000644 0000156 0000165 00000003257 12674564451 021377 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright 2014 Canonical Ltd.
*
* This program 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; version 3.
*
* This program 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 program. If not, see .
*/
import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.3
import Ubuntu.Content 1.3
PopupBase {
property var transferContentType
property var transferItems
signal contentPeerSelected()
fadingAnimation: UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
Component.onCompleted: {
contentPeerPicker.peerSelected.connect(contentPeerSelected);
}
ContentPeerPicker {
id: contentPeerPicker
// FIXME: ContentPeerPicker should define an implicit size and not refer to its parent
Component.onCompleted: {
contentType = parent.transferContentType;
}
handler: ContentHandler.Share
onPeerSelected: {
var transfer = peer.request();
if (transfer.state === ContentTransfer.InProgress) {
transfer.items = parent.transferItems;
transfer.state = ContentTransfer.Charged;
}
PopupUtils.close(sharePopover);
}
onCancelPressed: PopupUtils.close(sharePopover);
}
}
camera-app-3.0.0+16.04.20160323.3/GalleryView.qml 0000644 0000156 0000165 00000022457 12674564456 021224 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright 2014 Canonical Ltd.
*
* This program 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; version 3.
*
* This program 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 program. If not, see .
*/
import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Content 1.3
import Ubuntu.Thumbnailer 0.1
import CameraApp 0.1
import "MimeTypeMapper.js" as MimeTypeMapper
Item {
id: galleryView
signal exit
property bool inView
property bool touchAcquired: slideshowView.touchAcquired
property bool userSelectionMode: false
property Item currentView: state == "GRID" ? photogridView : slideshowView
property var model: FoldersModel {
folders: [StorageLocations.picturesLocation, StorageLocations.videosLocation,
StorageLocations.removableStoragePicturesLocation,
StorageLocations.removableStorageVideosLocation]
typeFilters: !main.contentExportMode ? [ "image", "video" ]
: [MimeTypeMapper.contentTypeToMimeType(main.transferContentType)]
singleSelectionOnly: main.contentExportMode && main.transfer.selectionType === ContentTransfer.Single
}
property bool gridMode: main.contentExportMode
property bool showLastPhotoTakenPending: false
function showLastPhotoTaken() {
galleryView.gridMode = false;
// do not immediately try to show the photo in the slideshow as it
// might not be in the photo roll model yet
showLastPhotoTakenPending = true;
}
function prependMediaToModel(filePath) {
galleryView.model.prependFile(filePath);
}
function precacheThumbnail(filePath) {
preCachingThumbnail.filename = filePath;
}
function exitUserSelectionMode() {
model.clearSelection();
userSelectionMode = false;
}
onExit: {
slideshowView.exit();
photogridView.exit();
}
OrientationHelper {
visible: inView
SlideshowView {
id: slideshowView
anchors.fill: parent
model: galleryView.model
visible: opacity != 0.0
inView: galleryView.inView && galleryView.currentView == slideshowView
focus: inView
inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
onToggleSelection: model.toggleSelected(currentIndex)
onToggleHeader: header.toggle();
}
PhotogridView {
id: photogridView
anchors.fill: parent
headerHeight: header.height
userSelectionMode: galleryView.userSelectionMode
model: galleryView.model
visible: opacity != 0.0
inView: galleryView.inView && galleryView.currentView == photogridView
focus: inView
inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
onPhotoClicked: {
slideshowView.showPhotoAtIndex(index);
galleryView.gridMode = false;
}
onPhotoPressAndHold: {
if (!galleryView.userSelectionMode) {
galleryView.userSelectionMode = true;
model.toggleSelected(index);
}
}
onPhotoSelectionAreaClicked: {
if (main.contentExportMode || galleryView.userSelectionMode)
model.toggleSelected(index);
}
onExitUserSelectionMode: galleryView.exitUserSelectionMode()
onToggleHeader: header.toggle()
}
// FIXME: it would be better to use the standard header from the toolkit
GalleryViewHeader {
id: header
actions: currentView.actions
gridMode: galleryView.gridMode
validationVisible: main.contentExportMode && model.selectedFiles.length > 0 && galleryView.gridMode
userSelectionMode: galleryView.userSelectionMode
onExit: {
if ((main.contentExportMode || userSelectionMode) && !galleryView.gridMode) {
galleryView.gridMode = true;
// position grid view so that the current photo in slideshow view is visible
photogridView.showPhotoAtIndex(slideshowView.currentIndex);
} else if (userSelectionMode) {
galleryView.exitUserSelectionMode();
} else {
galleryView.exit()
}
}
onToggleViews: {
if (!galleryView.gridMode) {
// position grid view so that the current photo in slideshow view is visible
photogridView.showPhotoAtIndex(slideshowView.currentIndex);
}
galleryView.gridMode = !galleryView.gridMode
}
onToggleSelectAll: {
if (model.selectedFiles.length != model.count)
model.selectAll();
else
model.clearSelection();
}
onValidationClicked: {
var selection = model.selectedFiles;
var urls = [];
for (var i=0; i