ubuntu-settings-components-0.1+14.04.20140306/ 0000755 0000152 0177776 00000000000 12306027154 021311 5 ustar pbuser nogroup 0000000 0000000 ubuntu-settings-components-0.1+14.04.20140306/SettingsComponents.qmlproject 0000644 0000152 0177776 00000001051 12306026751 027260 0 ustar pbuser nogroup 0000000 0000000 /* File generated by Qt Creator (with Ubuntu Plugin), version 2.7.0 */
import QmlProject 1.1
Project {
mainFile: "SettingsComponents.qml"
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
directory: "."
}
JavaScriptFiles {
directory: "."
}
ImageFiles {
directory: "."
}
Files {
filter: "*.desktop"
}
/* List of plugin directories passed to QML runtime */
importPaths: [ "." ,"/usr/bin","/usr/lib/x86_64-linux-gnu/qt5/qml" ]
}
ubuntu-settings-components-0.1+14.04.20140306/SettingsComponents.qml 0000644 0000152 0177776 00000016124 12306026751 025700 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Settings.Menus 0.1
MainView {
// Note! applicationName needs to match the .desktop filename
applicationName: "SettingsComponents"
width: units.gu(42)
height: units.gu(75)
ListModel {
id: mediaPlayerModel
ListElement { song: "Mine"; artist: "Taylor Swift"; album: "Speak Now"; albumArt: "tests/artwork/speak-now.jpg"}
ListElement { song: "Stony Ground"; artist: "Richard Thompson"; album: "Electric"; albumArt: "tests/artwork/electric.jpg"}
ListElement { song: "Los Robots"; artist: "Kraftwerk"; album: "The Man-Machine"; albumArt: "tests/artwork/the-man-machine.jpg"}
}
ListModel {
id: timeZoneModel
ListElement { city: "San Francisco"; time: "3:00am" }
ListElement { city: "London"; time: "11:00am" }
ListElement { city: "Rome"; time: "12:00am" }
}
ListModel {
id: eventModel
ListElement { icon: "image://theme/calendar"; eventColor: "yellow"; text: "Lunch with Lola"; time: "1:10 PM" }
ListElement { icon: "image://theme/calendar"; eventColor: "green"; text: "Gym"; time: "6:30 PM" }
ListElement { icon: "image://theme/calendar"; eventColor: "red"; text: "Birthday Party"; time: "9:00 PM" }
}
Page {
title: "SettingsComponents"
Flickable {
id: flickable
anchors.fill: parent
contentWidth: column.width
contentHeight: column.height
Column {
id: column
width: flickable.width
height: childrenRect.height
SliderMenu {
id: slider
text: i18n.tr("Slider")
minimumValue: 0
maximumValue: 100
value: 20
minIcon: "image://theme/audio-volume-low"
maxIcon: "image://theme/audio-volume-high"
}
ProgressBarMenu {
text: i18n.tr("ProgressBar")
value: slider.value
minimumValue: 0
maximumValue: 100
}
ProgressValueMenu {
text: i18n.tr("ProgressValue")
value: slider.value
}
ButtonMenu {
text: i18n.tr("Button")
buttonText: i18n.tr("Hello world!")
}
CheckableMenu {
text: i18n.tr("Checkable")
checked: true
}
SwitchMenu {
text: i18n.tr("Switch")
checked: true
}
SectionMenu {
text: i18n.tr("Section Starts Here")
busy: true
}
SeparatorMenu {}
CalendarMenu {
id: calendar
}
UserSessionMenu {
name: i18n.tr("Lola Chang")
iconSource: Qt.resolvedUrl("tests/artwork/avatar.png")
active: true
}
MediaPlayerMenu {
id: mediaPlayer
property int index: 0
playerName: "Rhythmbox"
playerIcon: Qt.resolvedUrl("tests/artwork/rhythmbox.png")
song: mediaPlayerModel.get(index).song;
artist: mediaPlayerModel.get(index).artist;
album: mediaPlayerModel.get(index).album;
albumArt: mediaPlayerModel.get(index).albumArt;
}
PlaybackItemMenu {
canPlay: true
canGoNext: true
canGoPrevious: true
playing: mediaPlayer.running
onPrevious: mediaPlayer.index = Math.max(mediaPlayer.index - 1, 0)
onNext: mediaPlayer.index = Math.min(mediaPlayer.index + 1, mediaPlayerModel.count - 1)
onPlay: { mediaPlayer.running = !mediaPlayer.running; }
}
AccessPointMenu {
checked: true
secure: true
adHoc: false
signalStrength: 50
text: "Access Point"
}
GroupedMessageMenu {
text: "Group Message"
count: "4"
}
SnapDecisionMenu {
title: "Snap Decision"
time: "10:30am"
message: "My mother says I'm handsome!"
replyMessages: ["Yeah right", "Sure she did"]
onTriggered: {
selected = !selected;
}
}
SimpleTextMessageMenu {
title: "Simple Text Message"
time: "11am"
message: "I am a little teacup"
onTriggered: {
selected = !selected;
}
}
TextMessageMenu {
title: "Text Message"
time: "11am"
message: "I happen to be tall and thin!"
onTriggered: {
selected = !selected;
}
}
Column {
anchors {
left: parent.left
right: parent.right
}
Repeater {
model: timeZoneModel
TimeZoneMenu {
city: model.city
time: model.time
}
}
}
Column {
anchors {
left: parent.left
right: parent.right
}
Repeater {
model: eventModel
EventMenu {
iconSource: model.icon
text: model.text
eventColor: model.eventColor
time: model.time
}
}
}
}
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/cmake/ 0000755 0000152 0177776 00000000000 12306027154 022371 5 ustar pbuser nogroup 0000000 0000000 ubuntu-settings-components-0.1+14.04.20140306/cmake/modules/ 0000755 0000152 0177776 00000000000 12306027154 024041 5 ustar pbuser nogroup 0000000 0000000 ubuntu-settings-components-0.1+14.04.20140306/cmake/modules/QmlTest.cmake 0000644 0000152 0177776 00000011672 12306026751 026445 0 ustar pbuser nogroup 0000000 0000000 # add_qml_test(path component_name [NO_ADD_TEST] [NO_TARGETS]
# [TARGETS target1 [target2 [...]]]
# [IMPORT_PATHS import_path1 [import_path2 [...]]
# [PROPERTIES prop1 value1 [prop2 value2 [...]]])
#
# NO_ADD_TEST will prevent adding the test to the "test" target
# NO_TARGETS will prevent adding the test to any targets
# TARGETS lists the targets the test should be added to
# IMPORT_PATHS will pass those paths to qmltestrunner as "-import" arguments
# PROPERTIES will be set on the target and test target. See CMake's set_target_properties()
#
# Two targets will be created:
# - testComponentName - Runs the test with qmltestrunner
# - tryComponentName - Runs the test with uqmlscene, for manual interaction
#
# To change/set a default value for the whole test suite, prior to calling add_qml_test, set:
# qmltest_DEFAULT_NO_ADD_TEST (default: FALSE)
# qmltest_DEFAULT_TARGETS
# qmltest_DEFAULT_IMPORT_PATHS
# qmltest_DEFAULT_PROPERTIES
find_program(qmltestrunner_exe qmltestrunner)
find_program(qmlscene_exe qmlscene)
if(NOT qmltestrunner_exe)
msg(FATAL_ERROR "Could not locate qmltestrunner.")
endif()
macro(add_manual_qml_test SUBPATH COMPONENT_NAME)
set(options NO_ADD_TEST NO_TARGETS)
set(multi_value_keywords IMPORT_PATHS TARGETS PROPERTIES ENVIRONMENT)
cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN})
set(qmlscene_TARGET try${COMPONENT_NAME})
set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME})
set(qmlscene_imports "")
if(NOT "${qmltest_IMPORT_PATHS}" STREQUAL "")
foreach(IMPORT_PATH ${qmltest_IMPORT_PATHS})
list(APPEND qmlscene_imports "-I")
list(APPEND qmlscene_imports ${IMPORT_PATH})
endforeach(IMPORT_PATH)
elseif(NOT "${qmltest_DEFAULT_IMPORT_PATHS}" STREQUAL "")
foreach(IMPORT_PATH ${qmltest_DEFAULT_IMPORT_PATHS})
list(APPEND qmlscene_imports "-I")
list(APPEND qmlscene_imports ${IMPORT_PATH})
endforeach(IMPORT_PATH)
endif()
set(qmlscene_command
env ${qmltest_ENVIRONMENT}
${qmlscene_exe} ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
${qmlscene_imports}
)
add_custom_target(${qmlscene_TARGET} ${qmlscene_command})
endmacro(add_manual_qml_test)
macro(add_qml_test SUBPATH COMPONENT_NAME)
set(options NO_ADD_TEST NO_TARGETS)
set(multi_value_keywords IMPORT_PATHS TARGETS PROPERTIES ENVIRONMENT)
cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN})
set(qmltest_TARGET test${COMPONENT_NAME})
set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME})
set(qmltestrunner_imports "")
if(NOT "${qmltest_IMPORT_PATHS}" STREQUAL "")
foreach(IMPORT_PATH ${qmltest_IMPORT_PATHS})
list(APPEND qmltestrunner_imports "-import")
list(APPEND qmltestrunner_imports ${IMPORT_PATH})
endforeach(IMPORT_PATH)
elseif(NOT "${qmltest_DEFAULT_IMPORT_PATHS}" STREQUAL "")
foreach(IMPORT_PATH ${qmltest_DEFAULT_IMPORT_PATHS})
list(APPEND qmltestrunner_imports "-import")
list(APPEND qmltestrunner_imports ${IMPORT_PATH})
endforeach(IMPORT_PATH)
endif()
set(qmltest_command
env ${qmltest_ENVIRONMENT}
${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
${qmltestrunner_imports}
-o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml
-o -,txt
)
add_custom_target(${qmltest_TARGET} ${qmltest_command})
if(NOT "${qmltest_PROPERTIES}" STREQUAL "")
set_target_properties(${qmltest_TARGET} PROPERTIES ${qmltest_PROPERTIES})
elseif(NOT "${qmltest_DEFAULT_PROPERTIES}" STREQUAL "")
set_target_properties(${qmltest_TARGET} PROPERTIES ${qmltest_DEFAULT_PROPERTIES})
endif()
if("${qmltest_NO_ADD_TEST}" STREQUAL FALSE AND NOT "${qmltest_DEFAULT_NO_ADD_TEST}" STREQUAL "TRUE")
add_test(${qmltest_TARGET} ${qmltest_command})
if(NOT "${qmltest_UNPARSED_ARGUMENTS}" STREQUAL "")
set_tests_properties(${qmltest_TARGET} PROPERTIES ${qmltest_PROPERTIES})
elseif(NOT "${qmltest_DEFAULT_PROPERTIES}" STREQUAL "")
set_tests_properties(${qmltest_TARGET} PROPERTIES ${qmltest_DEFAULT_PROPERTIES})
endif()
endif("${qmltest_NO_ADD_TEST}" STREQUAL FALSE AND NOT "${qmltest_DEFAULT_NO_ADD_TEST}" STREQUAL "TRUE")
if("${qmltest_NO_TARGETS}" STREQUAL "FALSE")
if(NOT "${qmltest_TARGETS}" STREQUAL "")
foreach(TARGET ${qmltest_TARGETS})
add_dependencies(${TARGET} ${qmltest_TARGET})
endforeach(TARGET)
elseif(NOT "${qmltest_DEFAULT_TARGETS}" STREQUAL "")
foreach(TARGET ${qmltest_DEFAULT_TARGETS})
add_dependencies(${TARGET} ${qmltest_TARGET})
endforeach(TARGET)
endif()
endif("${qmltest_NO_TARGETS}" STREQUAL "FALSE")
add_manual_qml_test(${SUBPATH} ${COMPONENT_NAME} ${ARGN})
endmacro(add_qml_test)
ubuntu-settings-components-0.1+14.04.20140306/cmake/modules/Findgcovr.cmake 0000644 0000152 0177776 00000001702 12306026751 026766 0 ustar pbuser nogroup 0000000 0000000 # - Find gcovr scrip
# Will define:
#
# GCOVR_EXECUTABLE - the gcovr script
#
# Uses:
#
# GCOVR_ROOT - root to search for the script
#
# Copyright (C) 2011 by Johannes Wienke
#
# 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;
# either version 2, or (at your option)
# any later version.
#
# 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.
#
INCLUDE(FindPackageHandleStandardArgs)
FIND_PROGRAM(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(gcovr DEFAULT_MSG GCOVR_EXECUTABLE)
# only visible in advanced view
MARK_AS_ADVANCED(GCOVR_EXECUTABLE)
ubuntu-settings-components-0.1+14.04.20140306/cmake/modules/ParseArguments.cmake 0000644 0000152 0177776 00000003406 12306026751 030010 0 ustar pbuser nogroup 0000000 0000000 # Parse arguments passed to a function into several lists separated by
# upper-case identifiers and options that do not have an associated list e.g.:
#
# SET(arguments
# hello OPTION3 world
# LIST3 foo bar
# OPTION2
# LIST1 fuz baz
# )
# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments})
#
# results in 7 distinct variables:
# * ARG_DEFAULT_ARGS: hello;world
# * ARG_LIST1: fuz;baz
# * ARG_LIST2:
# * ARG_LIST3: foo;bar
# * ARG_OPTION1: FALSE
# * ARG_OPTION2: TRUE
# * ARG_OPTION3: TRUE
#
# taken from http://www.cmake.org/Wiki/CMakeMacroParseArguments
MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
SET(DEFAULT_ARGS)
FOREACH(arg_name ${arg_names})
SET(${prefix}_${arg_name})
ENDFOREACH(arg_name)
FOREACH(option ${option_names})
SET(${prefix}_${option} FALSE)
ENDFOREACH(option)
SET(current_arg_name DEFAULT_ARGS)
SET(current_arg_list)
FOREACH(arg ${ARGN})
SET(larg_names ${arg_names})
LIST(FIND larg_names "${arg}" is_arg_name)
IF (is_arg_name GREATER -1)
SET(${prefix}_${current_arg_name} ${current_arg_list})
SET(current_arg_name ${arg})
SET(current_arg_list)
ELSE (is_arg_name GREATER -1)
SET(loption_names ${option_names})
LIST(FIND loption_names "${arg}" is_option)
IF (is_option GREATER -1)
SET(${prefix}_${arg} TRUE)
ELSE (is_option GREATER -1)
SET(current_arg_list ${current_arg_list} ${arg})
ENDIF (is_option GREATER -1)
ENDIF (is_arg_name GREATER -1)
ENDFOREACH(arg)
SET(${prefix}_${current_arg_name} ${current_arg_list})
ENDMACRO(PARSE_ARGUMENTS)
ubuntu-settings-components-0.1+14.04.20140306/cmake/modules/FindLcov.cmake 0000644 0000152 0177776 00000001720 12306026751 026551 0 ustar pbuser nogroup 0000000 0000000 # - Find lcov
# Will define:
#
# LCOV_EXECUTABLE - the lcov binary
# GENHTML_EXECUTABLE - the genhtml executable
#
# Copyright (C) 2010 by Johannes Wienke
#
# 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;
# either version 2, or (at your option)
# any later version.
#
# 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.
#
INCLUDE(FindPackageHandleStandardArgs)
FIND_PROGRAM(LCOV_EXECUTABLE lcov)
FIND_PROGRAM(GENHTML_EXECUTABLE genhtml)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lcov DEFAULT_MSG LCOV_EXECUTABLE GENHTML_EXECUTABLE)
# only visible in advanced view
MARK_AS_ADVANCED(LCOV_EXECUTABLE GENHTML_EXECUTABLE)
ubuntu-settings-components-0.1+14.04.20140306/cmake/modules/EnableCoverageReport.cmake 0000644 0000152 0177776 00000016414 12306026751 031111 0 ustar pbuser nogroup 0000000 0000000 # - Creates a special coverage build type and target on GCC.
#
# Defines a function ENABLE_COVERAGE_REPORT which generates the coverage target
# for selected targets. Optional arguments to this function are used to filter
# unwanted results using globbing expressions. Moreover targets with tests for
# the source code can be specified to trigger regenerating the report if the
# test has changed
#
# ENABLE_COVERAGE_REPORT(TARGETS target... [FILTER filter...] [TESTS test targets...])
#
# To generate a coverage report first build the project with
# CMAKE_BUILD_TYPE=coverage, then call make test and afterwards make coverage.
#
# The coverage report is based on gcov. Depending on the availability of lcov
# a HTML report will be generated and/or an XML report of gcovr is found.
# The generated coverage target executes all found solutions. Special targets
# exist to create e.g. only the xml report: coverage-xml.
#
# Copyright (C) 2010 by Johannes Wienke
#
# 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;
# either version 2, or (at your option)
# any later version.
#
# 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.
#
INCLUDE(ParseArguments)
FIND_PACKAGE(Lcov)
FIND_PACKAGE(gcovr)
FUNCTION(ENABLE_COVERAGE_REPORT)
# argument parsing
PARSE_ARGUMENTS(ARG "FILTER;TARGETS;TESTS" "" ${ARGN})
SET(COVERAGE_RAW_FILE "${CMAKE_BINARY_DIR}/coverage.raw.info")
SET(COVERAGE_FILTERED_FILE "${CMAKE_BINARY_DIR}/coverage.info")
SET(COVERAGE_REPORT_DIR "${CMAKE_BINARY_DIR}/coveragereport")
SET(COVERAGE_XML_FILE "${CMAKE_BINARY_DIR}/coverage.xml")
SET(COVERAGE_XML_COMMAND_FILE "${CMAKE_BINARY_DIR}/coverage-xml.cmake")
# decide if there is any tool to create coverage data
SET(TOOL_FOUND FALSE)
IF(LCOV_FOUND OR GCOVR_FOUND)
SET(TOOL_FOUND TRUE)
ENDIF()
IF(NOT TOOL_FOUND)
MESSAGE(STATUS "Cannot enable coverage targets because neither lcov nor gcovr are found.")
ENDIF()
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" COVERAGE_BUILD_TYPE)
IF(CMAKE_COMPILER_IS_GNUCXX AND TOOL_FOUND AND "${COVERAGE_BUILD_TYPE}" MATCHES "coverage")
MESSAGE(STATUS "Coverage support enabled for targets: ${ARG_TARGETS}")
# create coverage build type
SET(CMAKE_CXX_FLAGS_COVERAGE ${CMAKE_CXX_FLAGS_DEBUG} PARENT_SCOPE)
SET(CMAKE_C_FLAGS_COVERAGE ${CMAKE_C_FLAGS_DEBUG} PARENT_SCOPE)
SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} coverage PARENT_SCOPE)
# instrument targets
SET_TARGET_PROPERTIES(${ARG_TARGETS} PROPERTIES COMPILE_FLAGS --coverage
LINK_FLAGS --coverage)
# html report
IF (LCOV_FOUND)
MESSAGE(STATUS "Enabling HTML coverage report")
# set up coverage target
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_RAW_FILE}
COMMAND ${LCOV_EXECUTABLE} -c -d ${CMAKE_BINARY_DIR} -o ${COVERAGE_RAW_FILE}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Collecting coverage data"
DEPENDS ${ARG_TARGETS} ${ARG_TESTS}
VERBATIM)
# filter unwanted stuff
LIST(LENGTH ARG_FILTER FILTER_LENGTH)
IF(${FILTER_LENGTH} GREATER 0)
SET(FILTER COMMAND ${LCOV_EXECUTABLE})
FOREACH(F ${ARG_FILTER})
SET(FILTER ${FILTER} -r ${COVERAGE_FILTERED_FILE} ${F})
ENDFOREACH()
SET(FILTER ${FILTER} -o ${COVERAGE_FILTERED_FILE})
ELSE()
SET(FILTER "")
ENDIF()
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_FILTERED_FILE}
COMMAND ${LCOV_EXECUTABLE} -e ${COVERAGE_RAW_FILE} "${CMAKE_SOURCE_DIR}*" -o ${COVERAGE_FILTERED_FILE}
${FILTER}
DEPENDS ${COVERAGE_RAW_FILE}
COMMENT "Filtering recorded coverage data for project-relevant entries"
VERBATIM)
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_REPORT_DIR}
COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_REPORT_DIR}
COMMAND ${GENHTML_EXECUTABLE} --legend --show-details -t "${PROJECT_NAME} test coverage" -o ${COVERAGE_REPORT_DIR} ${COVERAGE_FILTERED_FILE}
DEPENDS ${COVERAGE_FILTERED_FILE}
COMMENT "Generating HTML coverage report in ${COVERAGE_REPORT_DIR}"
VERBATIM)
ADD_CUSTOM_TARGET(coverage-html
DEPENDS ${COVERAGE_REPORT_DIR})
ENDIF()
# xml coverage report
IF(GCOVR_FOUND)
MESSAGE(STATUS "Enabling XML coverage report")
# filter unwanted stuff
SET(GCOV_FILTER "")
LIST(LENGTH ARG_FILTER FILTER_LENGTH)
IF(${FILTER_LENGTH} GREATER 0)
FOREACH(F ${ARG_FILTER})
SET(GCOV_FILTER "${GCOV_FILTER} -e \"${F}\"")
ENDFOREACH()
ENDIF()
# gcovr cannot write directly to a file so the execution needs to
# be wrapped in a cmake file that generates the file output
FILE(WRITE ${COVERAGE_XML_COMMAND_FILE}
"SET(ENV{LANG} en)\n")
FILE(APPEND ${COVERAGE_XML_COMMAND_FILE}
"EXECUTE_PROCESS(COMMAND \"${GCOVR_EXECUTABLE}\" -x -r \"${CMAKE_SOURCE_DIR}\" ${GCOV_FILTER} OUTPUT_FILE \"${COVERAGE_XML_FILE}\" WORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\")\n")
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_XML_FILE}
COMMAND ${CMAKE_COMMAND} ARGS -P ${COVERAGE_XML_COMMAND_FILE}
COMMENT "Generating coverage XML report"
VERBATIM)
ADD_CUSTOM_TARGET(coverage-xml
DEPENDS ${COVERAGE_XML_FILE})
ENDIF()
# provide a global coverage target executing both steps if available
SET(GLOBAL_DEPENDS "")
IF(LCOV_FOUND)
LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_REPORT_DIR})
ENDIF()
IF(GCOVR_FOUND)
LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_XML_FILE})
ENDIF()
IF(LCOV_FOUND OR GCOVR_FOUND)
ADD_CUSTOM_TARGET(coverage
DEPENDS ${GLOBAL_DEPENDS})
ENDIF()
ENDIF()
# This gets rid of any stale .gcda files. Run this if a running a binary causes lots of messages about
# about a "merge mismatch for summaries".
ADD_CUSTOM_TARGET(clean-coverage COMMAND find ${CMAKE_BINARY_DIR} -name '*.gcda' | xargs rm -f)
ENDFUNCTION()
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/ 0000755 0000152 0177776 00000000000 12306027154 022573 5 ustar pbuser nogroup 0000000 0000000 ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/ 0000755 0000152 0177776 00000000000 12306027154 024373 5 ustar pbuser nogroup 0000000 0000000 ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/ 0000755 0000152 0177776 00000000000 12306027154 025462 5 ustar pbuser nogroup 0000000 0000000 ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/ProgressBarMenu.qml 0000644 0000152 0177776 00000002163 12306026751 031257 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Standard {
property alias indeterminate: progressBar.indeterminate
property alias minimumValue: progressBar.minimumValue
property alias maximumValue: progressBar.maximumValue
property alias value: progressBar.value
control: ProgressBar {
id: progressBar
width: units.gu(20)
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/TextMessageMenu.qml 0000644 0000152 0177776 00000002340 12306026751 031254 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Renato Araujo Oliveira Filho
* Olivier Tilloy
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Settings.Components 0.1 as USC
SimpleTextMessageMenu {
id: menu
property bool replyEnabled: true
property string replyButtonText: "Send"
signal replied(string value)
footer: USC.ActionTextField {
anchors.fill: parent
activateEnabled: menu.replyEnabled
buttonText: menu.replyButtonText
onActivated: {
menu.replied(value);
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/GroupedMessageMenu.qml 0000644 0000152 0177776 00000003477 12306026751 031751 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Renato Araujo Oliveira Filho
* Olivier Tilloy
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Standard {
id: menu
property alias count: label.text
signal dismissed()
iconSource: Qt.resolvedUrl("artwork/default_app.svg")
control: UbuntuShape {
height: label.height + units.gu(2)
width: label.width + units.gu(2)
color: Theme.palette.normal.backgroundText
radius: "medium"
Label {
id: label
objectName: "messageCount"
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
horizontalAlignment: Text.AlignRight
font.weight: Font.DemiBold
fontSize: "medium"
text: "0"
color: Theme.palette.normal.foregroundText
}
Connections {
target: menu.__mouseArea
onClicked: {
menu.clicked();
}
}
}
onItemRemoved: {
menu.dismissed();
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/HeroMessageMenu.qml 0000644 0000152 0177776 00000004731 12306026751 031233 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Renato Araujo Oliveira Filho
* Olivier Tilloy
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
import Ubuntu.Settings.Components 0.1 as USC
ListItem.Empty {
id: menu
property alias heroMessageHeader: __heroMessageHeader
property real collapsedHeight: heroMessageHeader.y + heroMessageHeader.bodyBottom + units.gu(2)
property real expandedHeight: collapsedHeight
property url avatar
property url appIcon
signal appActivated
signal dismissed
implicitHeight: collapsedHeight
Rectangle {
id: background
property real alpha: 0.0
anchors.fill: parent
color: Qt.rgba(1.0, 1.0, 1.0, alpha)
z: -1
}
USC.HeroMessageHeader {
id: __heroMessageHeader
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
avatar: menu.avatar != "" ? menu.avatar : "artwork/default_contact.png"
appIcon: menu.appIcon != "" ? menu.appIcon : "artwork/default_app.svg"
icon: appIcon
state: menu.state
onAppIconClicked: {
menu.appActivated();
}
}
states: State {
name: "expanded"
when: selected
PropertyChanges {
target: menu
implicitHeight: menu.expandedHeight
}
PropertyChanges {
target: background
alpha: 0.05
}
}
transitions: Transition {
ParallelAnimation {
NumberAnimation {
properties: "opacity,implicitHeight"
duration: 200
easing.type: Easing.OutQuad
}
ColorAnimation {}
}
}
onItemRemoved: {
menu.dismissed();
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/SliderMenu.qml 0000644 0000152 0177776 00000013140 12306026751 030245 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Empty {
id: menu
property alias minimumValue: slider.minimumValue
property alias maximumValue: slider.maximumValue
property alias live: slider.live
property double value: 0.0
property alias minIcon: leftImage.source
property alias maxIcon: rightImage.source
signal updated(real value)
property QtObject d: QtObject {
property bool enableValueConnection: true
property double originalValue: 0.0
property Connections connections: Connections {
target: menu
onValueChanged: {
if (!d.enableValueConnection) return;
d.originalValue = menu.value;
d.checkValueMinMax();
}
// need to re-assert the reported value to the requested value.
onMinimumValueChanged: {
if (menu.value !== d.originalValue) {
menu.value = d.originalValue;
} else {
d.checkValueMinMax();
}
}
onMaximumValueChanged: {
if (menu.value !== d.originalValue) {
menu.value = d.originalValue;
} else {
d.checkValueMinMax();
}
}
}
function lockValue() {
if (!d.enableValueConnection) return false;
d.enableValueConnection = false;
return true;
}
function unlockValue(oldValue) {
d.enableValueConnection = oldValue;
}
function checkValueMinMax() {
var oldEnable = lockValue();
if (!oldEnable) return;
// Can't rely on binding. Slider value is assigned by user slide.
if (menu.value < minimumValue) {
slider.value = minimumValue;
menu.value = minimumValue;
} else if (menu.value > maximumValue) {
slider.value = maximumValue;
menu.value = maximumValue;
} else if (slider.value != menu.value) {
slider.value = menu.value;
}
unlockValue(oldEnable);
}
}
implicitHeight: column.height + units.gu(1.5)
Column {
id: column
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
right: parent.right
leftMargin: menu.__contentsMargins
rightMargin: menu.__contentsMargins
}
height: childrenRect.height
spacing: units.gu(0.5)
Label {
id: label
text: menu.text
anchors {
left: parent.left
right: parent.right
}
visible: text != ""
}
Item {
id: row
anchors {
left: parent.left
right: parent.right
}
height: slider.height
Image {
id: leftImage
visible: status === Image.Ready
anchors.left: row.left
anchors.verticalCenter: row.verticalCenter
height: slider.height - units.gu(2)
width: height
}
Slider {
id: slider
objectName: "slider"
anchors {
left: leftImage.visible ? leftImage.right : row.left
right: rightImage.visible ? rightImage.left : row.right
leftMargin: leftImage.visible ? units.gu(0.5) : 0
rightMargin: rightImage.visible ? units.gu(0.5) : 0
}
live: true
Component.onCompleted: {
value = menu.value
}
minimumValue: 0
maximumValue: 100
// FIXME - to be deprecated in Ubuntu.Components.
// Use this to disable the label, since there is not way to do it on the component.
function formatValue(v) {
return "";
}
Connections {
target: slider
onValueChanged: {
var oldEnable = d.lockValue();
if (!oldEnable) return;
menu.value = slider.value;
d.originalValue = menu.value;
menu.updated(slider.value);
d.unlockValue(oldEnable);
}
}
}
Image {
id: rightImage
visible: status === Image.Ready
anchors.right: row.right
anchors.verticalCenter: row.verticalCenter
height: slider.height - units.gu(2)
width: height
}
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/PlaybackItemMenu.qml 0000644 0000152 0177776 00000005416 12306026751 031377 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Nick Dedekind
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Empty {
id: menu
property bool playing: false
property bool canPlay: false
property bool canGoNext: false
property bool canGoPrevious: false
signal next()
signal play(bool play)
signal previous()
implicitHeight: controlsRow.height + units.gu(2)
Row {
id: controlsRow
anchors {
top: parent.top
topMargin: units.gu(1)
horizontalCenter: parent.horizontalCenter
}
spacing: units.gu(2)
Button {
objectName: "previousButton"
width: units.gu(5)
height: width
onClicked: menu.previous()
text: ""
enabled: canGoPrevious
anchors.verticalCenter: parent.verticalCenter
Icon {
anchors.fill: parent
anchors.margins: units.gu(1)
name: "media-skip-backward"
color: Theme.palette.normal.foregroundText
}
}
Button {
objectName: "playButton"
width: units.gu(6)
height: width
onClicked: menu.play(!playing)
text: ""
enabled: canPlay
anchors.verticalCenter: parent.verticalCenter
Icon {
anchors.fill: parent
anchors.margins: units.gu(1)
name: playing ? "media-playback-pause" : "media-playback-start"
color: Theme.palette.normal.foregroundText
}
}
Button {
objectName: "nextButton"
width: units.gu(5)
height: width
onClicked: menu.next()
text: ""
enabled: canGoNext
anchors.verticalCenter: parent.verticalCenter
Icon {
anchors.fill: parent
anchors.margins: units.gu(1)
name: "media-skip-forward"
color: Theme.palette.normal.foregroundText
}
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/TimeZoneMenu.qml 0000644 0000152 0177776 00000001774 12306026751 030567 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Standard {
id: timeZoneMenu
property alias city: timeZoneMenu.text
property alias time: timeLabel.text
control: Label {
id: timeLabel
objectName: "timeLabel"
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/EventMenu.qml 0000644 0000152 0177776 00000004104 12306026751 030104 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1 as Components
import Ubuntu.Settings.Components 0.1 as USC
import Ubuntu.Components.ListItems 0.1 as ListItems
ListItems.Empty {
id: menu
property alias iconSource: iconVisual.source
property alias text: label.text
property alias time: dateLabel.text
property alias eventColor: iconVisual.color
USC.IconVisual {
id: iconVisual
source: "image://theme/calendar"
visible: status == Image.Ready
height: Math.min(units.gu(5), parent.height - units.gu(1))
width: height
anchors {
left: parent.left
leftMargin: menu.__contentsMargins
verticalCenter: parent.verticalCenter
}
}
Components.Label {
id: label
anchors {
verticalCenter: parent.verticalCenter
left: iconVisual.visible ? iconVisual.right : parent.left
leftMargin: menu.__contentsMargins
right: dateLabel.left
rightMargin: menu.__contentsMargins
}
elide: Text.ElideRight
opacity: label.enabled ? 1.0 : 0.5
}
Components.Label {
id: dateLabel
color: Theme.palette.normal.backgroundText
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: menu.__contentsMargins
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/SimpleTextMessageMenu.qml 0000644 0000152 0177776 00000005203 12306026751 032427 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Renato Araujo Oliveira Filho
* Olivier Tilloy
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
HeroMessageMenu {
id: menu
property string title: ""
property string time: ""
property string message: ""
property alias footer: footerLoader.sourceComponent
expandedHeight: collapsedHeight + fullMessage.height
heroMessageHeader.titleText.text: title
heroMessageHeader.subtitleText.text: time
heroMessageHeader.bodyText.text: message
Item {
id: fullMessage
anchors {
left: parent.left
leftMargin: units.gu(2)
right: parent.right
rightMargin: units.gu(2)
top: heroMessageHeader.bottom
}
height: childrenRect.height
opacity: 0.0
enabled: false
Label {
id: bodyText
anchors {
top: parent.top
left: parent.left
right: parent.right
}
wrapMode: Text.WordWrap
elide: Text.ElideRight
fontSize: "medium"
text: heroMessageHeader.bodyText.text
}
Loader {
id: footerLoader
anchors {
top: bodyText.bottom
topMargin: item ? units.gu(2) : 0
left: parent.left
right: parent.right
}
height: item ? units.gu(4) : 0
}
states: State {
name: "expanded"
when: menu.state === "expanded"
PropertyChanges {
target: heroMessageHeader.bodyText
opacity: 0.0
}
PropertyChanges {
target: fullMessage
opacity: 1.0
enabled: true
}
}
transitions: Transition {
NumberAnimation {
property: "opacity"
duration: 200
}
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/ButtonMenu.qml 0000644 0000152 0177776 00000002076 12306026751 030304 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Standard {
property alias buttonText: button.text
iconFrame: false
Component.onCompleted: button.clicked.connect(clicked)
control: Button {
id: button
objectName: "button"
width: Math.max(units.gu(5), implicitWidth)
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/ProgressValueMenu.qml 0000644 0000152 0177776 00000002003 12306026751 031620 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Nick Dedekind
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Standard {
id: menuItem
property int value : 0.0
control: Label {
id: progress
objectName: "progress"
text: menuItem.value + " %"
fontSize: "medium"
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/SeparatorMenu.qml 0000644 0000152 0177776 00000000326 12306026751 030765 0 ustar pbuser nogroup 0000000 0000000 import QtQuick 2.0
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Empty {
implicitHeight: units.gu(1)
Rectangle {
color: Qt.rgba(0.0, 0, 0, 0.15)
anchors.fill: parent
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/UserSessionMenu.qml 0000644 0000152 0177776 00000002563 12306026751 031314 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Standard {
id: userSessionMenu
property alias name: userSessionMenu.text
property alias active: activeIcon.visible
control: Rectangle {
id: activeIcon
objectName: "activeIcon"
width: checkMark.width + units.gu(1.5)
height: checkMark.height + units.gu(1.5)
radius: width / 2
antialiasing: true
color: Theme.palette.normal.backgroundText
visible: false
Image {
id: checkMark
source: "artwork/CheckMark.png"
anchors.centerIn: parent
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/SnapDecisionMenu.qml 0000644 0000152 0177776 00000010316 12306026751 031404 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Renato Araujo Oliveira Filho
* Olivier Tilloy
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Settings.Components 0.1 as USC
HeroMessageMenu {
id: menu
property string title: ""
property string time: ""
property string message: ""
property bool activateEnabled: true
property alias actionButtonText: actionButton.text
property bool replyEnabled: true
property alias replyMessages: quickreply.messages
property alias replyButtonText: quickreply.buttonText
expandedHeight: collapsedHeight + buttons.height + quickreply.height
heroMessageHeader.titleText.text: title
heroMessageHeader.subtitleText.text: message
heroMessageHeader.bodyText.text: time
signal activated
signal replied(string value)
Item {
id: buttons
anchors.left: parent.left
anchors.leftMargin: units.gu(2)
anchors.right: parent.right
anchors.rightMargin: units.gu(2)
anchors.top: heroMessageHeader.bottom
anchors.topMargin: units.gu(1)
height: units.gu(4)
opacity: 0.0
Button {
objectName: "messageButton"
text: "Message"
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: (parent.width - units.gu(1)) / 2
gradient: UbuntuColors.greyGradient
onClicked: {
if (quickreply.state === "") {
quickreply.state = "expanded";
} else {
quickreply.state = "";
}
}
}
Button {
id: actionButton
objectName: "actionButton"
text: "Call back"
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
width: (parent.width - units.gu(1)) / 2
enabled: menu.activateEnabled
onClicked: {
menu.activated();
}
}
states: State {
name: "expanded"
when: menu.state === "expanded"
PropertyChanges {
target: buttons
opacity: 1.0
}
}
transitions: Transition {
NumberAnimation {
property: "opacity"
duration: 200
easing.type: Easing.OutQuad
}
}
}
USC.QuickReply {
id: quickreply
onReplied: {
menu.replied(value);
}
messages: ""
buttonText: "Send"
anchors {
top: buttons.bottom
topMargin: units.gu(2)
left: parent.left
right: parent.right
}
height: 0
opacity: 0.0
enabled: false
replyEnabled: menu.replyEnabled
messageMargins: __contentsMargins
states: State {
name: "expanded"
PropertyChanges {
target: quickreply
height: expandedHeight + units.gu(2)
opacity: 1.0
}
PropertyChanges {
target: quickreply
enabled: true
}
}
transitions: Transition {
NumberAnimation {
properties: "opacity,height"
duration: 200
easing.type: Easing.OutQuad
}
}
}
onStateChanged: {
if (state === "") {
quickreply.state = "";
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/AccessPointMenu.qml 0000644 0000152 0177776 00000010211 12306026751 031232 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Renato Araujo Oliveira Filho
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Empty {
id: menu
implicitHeight: units.gu(5.5)
property bool checked: false
property bool secure: false
property bool adHoc: false
property int signalStrength: 0
property alias text: label.text
__acceptEvents: false
CheckBox {
id: checkbox
objectName: "checkBox"
property bool enableCheckConnection: true
height: units.gu(3)
width: units.gu(3)
anchors {
left: parent.left
leftMargin: menu.__contentsMargins
verticalCenter: parent.verticalCenter
}
// FIXME : should use Checkbox.toggled signal
// lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled
onCheckedChanged: {
if (!enableCheckConnection) {
return;
}
var oldEnable = enableCheckConnection;
enableCheckConnection = false;
menu.checked = checked;
menu.triggered(menu.checked);
enableCheckConnection = oldEnable;
}
Connections {
target: menu
onCheckedChanged: {
if (!checkbox.enableCheckConnection) {
return;
}
var oldEnable = checkbox.enableCheckConnection;
checkbox.enableCheckConnection = false;
checkbox.checked = menu.checked;
checkbox.enableCheckConnection = oldEnable;
}
}
Connections {
target: menu.__mouseArea
onClicked: {
checkbox.clicked();
}
}
}
Icon {
id: iconSignal
objectName: "iconSignal"
color: Theme.palette.selected.backgroundText
keyColor: "#cccccc"
width: height
height: Math.min(units.gu(5), parent.height - units.gu(1))
anchors {
left: checkbox.right
leftMargin: units.gu(1)
verticalCenter: parent.verticalCenter
}
name: {
var imageName = "nm-signal-100"
if (adHoc) {
imageName = "nm-adhoc";
} else if (signalStrength <= 0) {
imageName = "nm-signal-00";
} else if (signalStrength <= 25) {
imageName = "nm-signal-25";
} else if (signalStrength <= 50) {
imageName = "nm-signal-50";
} else if (signalStrength <= 75) {
imageName = "nm-signal-75";
}
return imageName;
}
}
Label {
id: label
anchors {
left: iconSignal.right
leftMargin: units.gu(1)
verticalCenter: parent.verticalCenter
right: iconSecure.visible ? iconSecure.left : parent.right
rightMargin: menu.__contentsMargins
}
elide: Text.ElideRight
opacity: label.enabled ? 1.0 : 0.5
}
Icon {
id: iconSecure
objectName: "iconSecure"
visible: secure
name: "network-secure"
color: Theme.palette.selected.backgroundText
keyColor: "#cccccc"
width: height
height: Math.min(units.gu(4), parent.height - units.gu(1))
anchors {
right: parent.right
rightMargin: menu.__contentsMargins
verticalCenter: parent.verticalCenter
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/CheckableMenu.qml 0000644 0000152 0177776 00000005246 12306026751 030674 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Nick Dedekind
*/
import QtQuick 2.0
import Ubuntu.Components 0.1 as Components
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Empty {
id: menu
property alias text: label.text
property bool checked: false
__acceptEvents: false
Components.CheckBox {
id: checkbox
objectName: "checkbox"
property bool enableCheckConnection: true
anchors {
left: parent.left
leftMargin: menu.__contentsMargins
verticalCenter: parent.verticalCenter
}
Component.onCompleted: {
checked = menu.checked;
}
// FIXME : should use Checkbox.toggled signal
// lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled
onCheckedChanged: {
if (!enableCheckConnection) {
return;
}
var oldEnable = enableCheckConnection;
enableCheckConnection = false;
menu.checked = checked;
menu.triggered(menu.checked);
enableCheckConnection = oldEnable;
}
Connections {
target: menu
onCheckedChanged: {
if (!checkbox.enableCheckConnection) {
return;
}
var oldEnable = checkbox.enableCheckConnection;
checkbox.enableCheckConnection = false;
checkbox.checked = menu.checked;
checkbox.enableCheckConnection = oldEnable;
}
}
Connections {
target: menu.__mouseArea
onClicked: {
checkbox.clicked();
}
}
}
Components.Label {
id: label
anchors {
left: checkbox.right
leftMargin: menu.__contentsMargins
right: parent.right
rightMargin: menu.__contentsMargins
verticalCenter: parent.verticalCenter
}
elide: Text.ElideRight
opacity: label.enabled ? 1.0 : 0.5
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/SwitchMenu.qml 0000644 0000152 0177776 00000003731 12306026751 030271 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Nick Dedekind
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Standard {
id: menu
property bool checked: false
iconFrame: false
control: Switch {
id: switcher
objectName: "switcher"
property bool enableCheckConnection: true
Component.onCompleted: {
checked = menu.checked;
}
// FIXME : should use Checkbox.toggled signal
// lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled
onCheckedChanged: {
if (!enableCheckConnection) {
return;
}
var oldEnable = enableCheckConnection;
enableCheckConnection = false;
menu.checked = checked;
menu.triggered(menu.checked);
enableCheckConnection = oldEnable;
}
Connections {
target: menu
onCheckedChanged: {
if (!switcher.enableCheckConnection) {
return;
}
var oldEnable = switcher.enableCheckConnection;
switcher.enableCheckConnection = false;
switcher.checked = menu.checked;
switcher.enableCheckConnection = oldEnable;
}
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/qmldir 0000644 0000152 0177776 00000001430 12306026751 026675 0 ustar pbuser nogroup 0000000 0000000 module Ubuntu.Settings.Menus
AccessPointMenu 0.1 AccessPointMenu.qml
ButtonMenu 0.1 ButtonMenu.qml
CalendarMenu 0.1 CalendarMenu.qml
CheckableMenu 0.1 CheckableMenu.qml
EventMenu 0.1 EventMenu.qml
GroupedMessageMenu 0.1 GroupedMessageMenu.qml
MediaPlayerMenu 0.1 MediaPlayerMenu.qml
PlaybackItemMenu 0.1 PlaybackItemMenu.qml
ProgressBarMenu 0.1 ProgressBarMenu.qml
ProgressValueMenu 0.1 ProgressValueMenu.qml
SectionMenu 0.1 SectionMenu.qml
SeparatorMenu 0.1 SeparatorMenu.qml
SimpleTextMessageMenu 0.1 SimpleTextMessageMenu.qml
SliderMenu 0.1 SliderMenu.qml
SnapDecisionMenu 0.1 SnapDecisionMenu.qml
SwitchMenu 0.1 SwitchMenu.qml
TextMessageMenu 0.1 TextMessageMenu.qml
TimeZoneMenu 0.1 TimeZoneMenu.qml
UserSessionMenu 0.1 UserSessionMenu.qml
internal HeroMessageMenu HeroMessageMenu.qml
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/MediaPlayerMenu.qml 0000644 0000152 0177776 00000005617 12306026751 031231 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Empty {
id: menu
property bool running: false
property alias playerName: playerNameLabel.text
property alias playerIcon: playerIcon.source
property alias albumArt: albumArtImage.source
property alias song: songLabel.text
property alias artist: artistLabel.text
property alias album: albumLabel.text
implicitHeight: column.height + units.gu(2)
Behavior on implicitHeight { UbuntuNumberAnimation {} }
Column {
id: column
anchors {
left: parent.left
right: parent.right
top: parent.top
topMargin: units.gu(1)
leftMargin: menu.__contentsMargins
rightMargin: menu.__contentsMargins
}
height: running ? trackRow.height : playerRow.height
Row {
objectName: "player"
id: playerRow
spacing: menu.__contentsMargins
visible: !running
Behavior on opacity { UbuntuNumberAnimation {} }
UbuntuShape {
width: units.gu(5)
height: width
image: Image {
id: playerIcon
}
}
Label {
id: playerNameLabel
anchors.verticalCenter: parent.verticalCenter
}
}
Row {
objectName: "albumArt"
id: trackRow
width: menu.width
spacing: units.gu(2)
visible: running
Behavior on opacity { UbuntuNumberAnimation {} }
UbuntuShape {
width: units.gu(10)
height: width
image: Image {
id: albumArtImage
}
}
Column {
spacing: units.gu(1)
anchors.verticalCenter: parent.verticalCenter
Label {
id: songLabel
}
Label {
id: artistLabel
}
Label {
id: albumLabel
}
}
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/SectionMenu.qml 0000644 0000152 0177776 00000002275 12306026751 030436 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authors:
* Renato Araujo Oliveira Filho
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
ListItem.Header {
id: menuItem
property alias busy: indicator.running
ActivityIndicator {
id: indicator
objectName: "indicator"
anchors {
margins: units.gu(0.5)
right: parent.right
}
height: parent.height - (anchors.margins * 2)
width: height
anchors.verticalCenter: parent.verticalCenter
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/CalendarMenu.qml 0000644 0000152 0177776 00000004140 12306026751 030534 0 ustar pbuser nogroup 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 Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by Andrea Cimitan
*/
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
import Ubuntu.Settings.Components 0.1
ListItem.Empty {
id: menu
property alias collapsed: calendar.collapsed
property alias currentDate: calendar.currentDate
property alias firstDayOfWeek: calendar.firstDayOfWeek
property alias maximumDate: calendar.maximumDate
property alias minimumDate: calendar.minimumDate
property alias selectedDate: calendar.selectedDate
implicitHeight: column.height
Column {
id: column
height: childrenRect.height + units.gu(1.5)
anchors {
top: parent.top
left: parent.left
right: parent.right
topMargin: units.gu(1)
leftMargin: menu.__contentsMargins
rightMargin: menu.__contentsMargins
}
spacing: units.gu(1)
Label {
id: label
anchors {
left: parent.left
right: parent.right
}
fontSize: "large"
//ItemStyle.class: "label label-date"
text: Qt.formatDate(calendar.currentDate, "MMMM") + " " + calendar.currentDate.getFullYear()
}
Calendar {
id: calendar
objectName: "calendar"
anchors {
left: parent.left
right: parent.right
}
}
}
}
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/artwork/ 0000755 0000152 0177776 00000000000 12306027154 027153 5 ustar pbuser nogroup 0000000 0000000 ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/artwork/secure.svg 0000644 0000152 0177776 00000004353 12306026751 031171 0 ustar pbuser nogroup 0000000 0000000
ubuntu-settings-components-0.1+14.04.20140306/Ubuntu/Settings/Menus/artwork/CheckMark@18.png 0000644 0000152 0177776 00000001444 12306026751 031767 0 ustar pbuser nogroup 0000000 0000000 PNG
IHDR $ " P bKGD ̿ pHYs 0 0 tIME; IDATHǭHSQ?n6| $B("-2MT4Hf6QhBh]b R#QO"HA6:wߦN;s=s7L0M%}I|>4t Q@}P0L-
7O,@1")4Qha
7 aL)u爓량V@ܤZ"zҘb1FN^lnQS!H3kYOJby\6Q 閃'JyXZTs@Zɚ+yHb;R3/ok1s8Nn1