ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #07805
[Merge] lp:~renatofilho/ubuntu-calendar-app/sdk-1-3 into lp:ubuntu-calendar-app
Renato Araujo Oliveira Filho has proposed merging lp:~renatofilho/ubuntu-calendar-app/sdk-1-3 into lp:ubuntu-calendar-app.
Commit message:
Update to qtquick 2.4
Requested reviews:
Jenkins Bot (ubuntu-core-apps-jenkins-bot): continuous-integration
Alan Pope (popey)
For more details, see:
https://code.launchpad.net/~renatofilho/ubuntu-calendar-app/sdk-1-3/+merge/284686
Update to qtquick 2.4
--
Your team Ubuntu Calendar Developers is subscribed to branch lp:ubuntu-calendar-app.
=== modified file 'AgendaView.qml'
--- AgendaView.qml 2015-12-06 20:06:50 +0000
+++ AgendaView.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import QtOrganizer 5.0
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.0 as ListItem
@@ -55,13 +55,21 @@
}
}
- head.actions: [
- calendarTodayAction,
- commonHeaderActions.showCalendarAction,
- commonHeaderActions.reloadAction,
- commonHeaderActions.syncCalendarAction,
- commonHeaderActions.settingsAction
- ]
+ header: PageHeader {
+ id: pageHeader
+
+ title: i18n.tr("Agenda")
+ leadingActionBar.actions: tabs.tabsAction
+ trailingActionBar.actions: [
+ calendarTodayAction,
+ commonHeaderActions.newEventAction,
+ commonHeaderActions.showCalendarAction,
+ commonHeaderActions.reloadAction,
+ commonHeaderActions.syncCalendarAction,
+ commonHeaderActions.settingsAction
+ ]
+ flickable: eventList
+ }
EventListModel {
id: eventListModel
@@ -97,7 +105,7 @@
return default_title;
}
- visible: (!root.hasEnabledCalendars() || !eventListModel.itemCount) && !eventListModel.isLoading
+ visible: (eventListModel.count === 0) && !eventListModel.isLoading
anchors.centerIn: parent
}
=== modified file 'AllDayEventComponent.qml'
--- AllDayEventComponent.qml 2015-12-06 20:06:50 +0000
+++ AllDayEventComponent.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
import QtOrganizer 5.0
=== modified file 'CalendarChoicePopup.qml'
--- CalendarChoicePopup.qml 2015-10-31 19:56:40 +0000
+++ CalendarChoicePopup.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
import Ubuntu.Components.ListItems 1.0 as ListItem
=== modified file 'CalendarListButtonDelegate.qml'
--- CalendarListButtonDelegate.qml 2015-10-31 19:56:40 +0000
+++ CalendarListButtonDelegate.qml 2016-02-01 23:35:29 +0000
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.0
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.0 as ListItem
=== modified file 'ColorPickerDialog.qml'
--- ColorPickerDialog.qml 2015-10-31 19:56:40 +0000
+++ ColorPickerDialog.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
=== modified file 'ContactChoicePopup.qml'
--- ContactChoicePopup.qml 2015-12-06 20:06:50 +0000
+++ ContactChoicePopup.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
import Ubuntu.Components.ListItems 1.0
=== modified file 'DayHeaderBackground.qml'
--- DayHeaderBackground.qml 2014-09-20 10:45:35 +0000
+++ DayHeaderBackground.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
Item {
width: parent.width
=== modified file 'DayView.qml'
--- DayView.qml 2016-01-28 23:04:18 +0000
+++ DayView.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import "dateExt.js" as DateExt
import "ViewType.js" as ViewType
@@ -43,22 +43,27 @@
}
}
- head {
- actions: [
+ header: PageHeader {
+ id: pageHeader
+
+ leadingActionBar.actions: tabs.tabsAction
+ trailingActionBar.actions: [
calendarTodayAction,
+ commonHeaderActions.newEventAction,
commonHeaderActions.showCalendarAction,
commonHeaderActions.reloadAction,
commonHeaderActions.syncCalendarAction,
commonHeaderActions.settingsAction
]
- contents: Label {
- id:monthYear
- objectName:"monthYearLabel"
- fontSize: "large"
- text: currentDay.toLocaleString(Qt.locale(),i18n.tr("MMMM yyyy"))
- font.capitalization: Font.Capitalize
+ title: {
+ // TRANSLATORS: this is a time formatting string,
+ // see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
+ // It's used in the header of the month and week views
+ var monthName = currentDay.toLocaleString(Qt.locale(),i18n.tr("MMMM yyyy"))
+ return monthName[0].toUpperCase() + monthName.substr(1, monthName.length - 1)
}
+
}
PathViewBase{
@@ -69,7 +74,10 @@
//This is used to scroll all view together when currentItem scrolls
property var childContentY;
- anchors.fill: parent
+ anchors {
+ fill: parent
+ topMargin: header.height
+ }
onNextItemHighlighted: {
//next day
=== modified file 'Defines.js'
--- Defines.js 2015-10-31 19:56:40 +0000
+++ Defines.js 2016-02-01 23:35:29 +0000
@@ -43,7 +43,7 @@
function getWeekLabels(){
var object = Qt.createQmlObject('\
- import QtQuick 2.3;\
+ import QtQuick 2.4;\
import Ubuntu.Components 1.3;\
QtObject {\
property var weekLabel:[Qt.locale().dayName(7,Locale.NarrowFormat),\
=== modified file 'DeleteConfirmationDialog.qml'
--- DeleteConfirmationDialog.qml 2015-10-31 19:56:40 +0000
+++ DeleteConfirmationDialog.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
=== modified file 'EditEventConfirmationDialog.qml'
--- EditEventConfirmationDialog.qml 2015-10-31 19:56:40 +0000
+++ EditEventConfirmationDialog.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
=== modified file 'EventActions.qml'
--- EventActions.qml 2015-12-06 20:06:50 +0000
+++ EventActions.qml 2016-02-01 23:35:29 +0000
@@ -16,16 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.SyncMonitor 0.1
Item {
id: actionPool
- //removing till following bug is resolved
- //https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1493178
- //property alias newEventAction: _newEventAction
+ property alias newEventAction: _newEventAction
property alias showCalendarAction: _showCalendarAction
property alias syncCalendarAction: _syncCalendarAction
property alias settingsAction: _settingsAction
@@ -49,6 +47,7 @@
Action {
id: _newEventAction
objectName: "neweventbutton"
+ name: "neweventbutton"
iconName: "new-event"
text: i18n.tr("New Event")
onTriggered: {
@@ -59,6 +58,7 @@
Action{
id: _showCalendarAction
objectName: "calendarsbutton"
+ name: "calendarsbutton"
iconName: "calendar"
text: i18n.tr("Calendars")
onTriggered: {
@@ -70,6 +70,7 @@
Action{
id: _settingsAction
objectName: "settingsbutton"
+ name: "calendarsbutton"
iconName: "settings"
text: i18n.tr("Settings")
onTriggered: {
=== modified file 'EventBubble.qml'
--- EventBubble.qml 2015-12-06 20:06:50 +0000
+++ EventBubble.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import QtOrganizer 5.0
=== modified file 'EventDetails.qml'
--- EventDetails.qml 2016-01-28 23:04:18 +0000
+++ EventDetails.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.0 as ListItem
import Ubuntu.Components.Themes.Ambiance 1.0
@@ -209,7 +209,7 @@
dialog.editEvent.connect( function(eventId){
if( eventId === event.parentId ) {
showEditEventPage(internal.parentEvent, model)
- } else {
+ } else {
showEditEventPage(event, model)
}
});
=== modified file 'EventListModel.qml'
--- EventListModel.qml 2015-08-24 05:08:46 +0000
+++ EventListModel.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import QtOrganizer 5.0
OrganizerModel {
@@ -41,7 +41,7 @@
}
function startLoadingTimer() {
- var newObject = Qt.createQmlObject("import QtQuick 2.3; Timer {interval: 1000; running: true; repeat: false;}",
+ var newObject = Qt.createQmlObject("import QtQuick 2.4; Timer {interval: 1000; running: true; repeat: false;}",
eventModel, "EventListMode.qml");
newObject.onTriggered.connect( function(){
var items = itemsByTimePeriod(eventModel.startPeriod, eventModel.endPeriod);
@@ -73,7 +73,7 @@
}
}
return cals;
- }
+ }
function getWritableCollections(){
var cals = [];
=== modified file 'EventReminder.qml'
--- EventReminder.qml 2015-10-31 19:56:40 +0000
+++ EventReminder.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.0 as ListItem
=== modified file 'EventRepetition.qml'
--- EventRepetition.qml 2015-10-31 19:56:40 +0000
+++ EventRepetition.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import QtOrganizer 5.0
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.0 as ListItem
=== modified file 'EventUtils.qml'
--- EventUtils.qml 2015-10-31 19:56:40 +0000
+++ EventUtils.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import QtOrganizer 5.0
import "Defines.js" as Defines
=== modified file 'HeaderDateComponent.qml'
--- HeaderDateComponent.qml 2015-10-31 19:56:40 +0000
+++ HeaderDateComponent.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
Item {
=== modified file 'KeyboardRectangle.qml'
--- KeyboardRectangle.qml 2014-09-20 10:45:35 +0000
+++ KeyboardRectangle.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
Item {
id: keyboardRect
=== modified file 'LimitLabelModel.qml'
--- LimitLabelModel.qml 2014-10-22 17:32:15 +0000
+++ LimitLabelModel.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3;
+import QtQuick 2.4
ListModel {
id:limitLables
=== modified file 'MonthComponent.qml'
--- MonthComponent.qml 2016-01-28 23:04:18 +0000
+++ MonthComponent.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import "dateExt.js" as DateExt
import "colorUtils.js" as Color
=== modified file 'MonthComponentDateDelegate.qml'
--- MonthComponentDateDelegate.qml 2015-10-31 19:56:40 +0000
+++ MonthComponentDateDelegate.qml 2016-02-01 23:35:29 +0000
@@ -1,4 +1,4 @@
-import QtQuick 2.0
+import QtQuick 2.4
import Ubuntu.Components 1.3
Item{
=== modified file 'MonthView.qml'
--- MonthView.qml 2016-01-28 23:04:18 +0000
+++ MonthView.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import "dateExt.js" as DateExt
import "colorUtils.js" as Color
@@ -42,24 +42,27 @@
}
}
- head {
- actions: [
+ header: PageHeader {
+ id: pageHeader
+
+ leadingActionBar.actions: tabs.tabsAction
+ trailingActionBar.actions: [
calendarTodayAction,
+ commonHeaderActions.newEventAction,
commonHeaderActions.showCalendarAction,
commonHeaderActions.reloadAction,
commonHeaderActions.syncCalendarAction,
commonHeaderActions.settingsAction
]
-
- contents: Label {
- objectName:"monthYearLabel"
- fontSize: "large"
+ title: {
// TRANSLATORS: this is a time formatting string,
// see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
// It's used in the header of the month and week views
- text: currentMonth.toLocaleString(Qt.locale(),i18n.tr("MMMM yyyy"))
- font.capitalization: Font.Capitalize
+ var monthName = currentMonth.toLocaleString(Qt.locale(),i18n.tr("MMMM yyyy"))
+ return monthName[0].toUpperCase() + monthName.substr(1, monthName.length - 1)
}
+
+ flickable: null
}
PathViewBase{
@@ -68,10 +71,10 @@
property var startMonth: currentMonth;
- anchors.top:parent.top
-
- width:parent.width
- height: parent.height
+ anchors {
+ fill: parent
+ topMargin: header.height
+ }
onNextItemHighlighted: {
nextMonth();
=== modified file 'NewEvent.qml'
--- NewEvent.qml 2015-12-06 20:06:50 +0000
+++ NewEvent.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import QtOrganizer 5.0
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
=== modified file 'NewEventEntryField.qml'
--- NewEventEntryField.qml 2015-10-31 19:56:40 +0000
+++ NewEventEntryField.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
Label {
=== modified file 'NewEventTimePicker.qml'
--- NewEventTimePicker.qml 2014-10-21 18:58:31 +0000
+++ NewEventTimePicker.qml 2016-02-01 23:35:29 +0000
@@ -1,4 +1,4 @@
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components.ListItems 1.0 as ListItem
import Ubuntu.Components.Themes.Ambiance 1.0
import Ubuntu.Components.Pickers 1.0
=== modified file 'OnlineAccountsHelper.qml'
--- OnlineAccountsHelper.qml 2015-10-31 19:56:40 +0000
+++ OnlineAccountsHelper.qml 2016-02-01 23:35:29 +0000
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.2
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.OnlineAccounts 0.1
import Ubuntu.OnlineAccounts.Client 0.1
=== modified file 'PathViewBase.qml'
--- PathViewBase.qml 2015-08-29 08:59:47 +0000
+++ PathViewBase.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
PathView {
id: root
=== modified file 'RecurrenceLabelDefines.qml'
--- RecurrenceLabelDefines.qml 2015-10-31 19:56:40 +0000
+++ RecurrenceLabelDefines.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
QtObject {
=== modified file 'RemindersModel.qml'
--- RemindersModel.qml 2014-10-17 05:42:34 +0000
+++ RemindersModel.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
ListModel {
id: reminderModel
=== modified file 'ScrollAnimation.qml'
--- ScrollAnimation.qml 2014-09-20 10:45:35 +0000
+++ ScrollAnimation.qml 2016-02-01 23:35:29 +0000
@@ -1,4 +1,4 @@
-import QtQuick 2.3
+import QtQuick 2.4
PropertyAnimation {
duration: 500
=== modified file 'Scroller.qml'
--- Scroller.qml 2015-10-31 19:56:40 +0000
+++ Scroller.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.0 as ListItems
=== modified file 'Settings.qml'
--- Settings.qml 2016-01-29 09:35:09 +0000
+++ Settings.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
import Ubuntu.Components.ListItems 1.0 as ListItem
=== modified file 'SimpleDivider.qml'
--- SimpleDivider.qml 2014-12-11 20:29:27 +0000
+++ SimpleDivider.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.0
+import QtQuick 2.4
Rectangle{
height: units.gu(0.1)
=== modified file 'TimeLineBackground.qml'
--- TimeLineBackground.qml 2015-10-31 19:56:40 +0000
+++ TimeLineBackground.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
Column {
=== modified file 'TimeLineBase.qml'
--- TimeLineBase.qml 2015-10-31 19:56:40 +0000
+++ TimeLineBase.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import QtOrganizer 5.0
=== modified file 'TimeLineBaseComponent.qml'
--- TimeLineBaseComponent.qml 2015-12-06 20:06:50 +0000
+++ TimeLineBaseComponent.qml 2016-02-01 23:35:29 +0000
@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
-import QtQuick.Layouts 1.1
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
import QtOrganizer 5.0
=== modified file 'TimeLineHeader.qml'
--- TimeLineHeader.qml 2015-10-31 19:56:40 +0000
+++ TimeLineHeader.qml 2016-02-01 23:35:29 +0000
@@ -16,9 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.0
+import QtQuick 2.4
import Ubuntu.Components 1.3
-import QtQuick.Layouts 1.1
import "ViewType.js" as ViewType
@@ -50,7 +49,7 @@
id: weekNumLabel
objectName: "weeknumber"
- // TRANSLATORS: W refers to Week, followed by the actual week number (%1)
+ // TRANSLATORS: W refers to Week, followed by the actual week number (%1)
text: i18n.tr("W%1").arg(startDay.weekNumber(Qt.locale().firstDayOfWeek))
fontSize: "small"
height: units.gu(5)
=== modified file 'TimeLineHeaderComponent.qml'
--- TimeLineHeaderComponent.qml 2015-10-31 19:56:40 +0000
+++ TimeLineHeaderComponent.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import "dateExt.js" as DateExt
import "ViewType.js" as ViewType
=== modified file 'TimeLineTimeScale.qml'
--- TimeLineTimeScale.qml 2015-10-31 19:56:40 +0000
+++ TimeLineTimeScale.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.0
+import QtQuick 2.4
import Ubuntu.Components 1.3
Flickable{
=== modified file 'TimeSeparator.qml'
--- TimeSeparator.qml 2014-09-20 10:45:35 +0000
+++ TimeSeparator.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
Rectangle {
id: separator
=== modified file 'ViewHeader.qml'
--- ViewHeader.qml 2016-01-28 23:04:18 +0000
+++ ViewHeader.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
Item{
=== modified file 'WeekView.qml'
--- WeekView.qml 2016-01-28 23:04:18 +0000
+++ WeekView.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import "dateExt.js" as DateExt
import "ViewType.js" as ViewType
@@ -47,29 +47,37 @@
}
}
- head {
- actions: [
+ header: PageHeader {
+ id: pageHeader
+
+ leadingActionBar.actions: tabs.tabsAction
+ trailingActionBar.actions: [
calendarTodayAction,
+ commonHeaderActions.newEventAction,
commonHeaderActions.showCalendarAction,
commonHeaderActions.reloadAction,
commonHeaderActions.syncCalendarAction,
commonHeaderActions.settingsAction
]
- contents: Label {
- id:monthYear
- objectName:"monthYearLabel"
- fontSize: "large"
- text: i18n.tr(dayStart.toLocaleString(Qt.locale(),i18n.tr("MMMM yyyy")))
- font.capitalization: Font.Capitalize
+ title: {
+ // TRANSLATORS: this is a time formatting string,
+ // see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
+ // It's used in the header of the month and week views
+ var monthName = dayStart.toLocaleString(Qt.locale(),i18n.tr("MMMM yyyy"))
+ return monthName[0].toUpperCase() + monthName.substr(1, monthName.length - 1)
}
+ flickable: null
}
PathViewBase{
id: weekViewPath
objectName: "weekviewpathbase"
- anchors.fill: parent
+ anchors {
+ fill: parent
+ topMargin: header.height
+ }
//This is used to scroll all view together when currentItem scrolls
property var childContentY;
=== modified file 'YearView.qml'
--- YearView.qml 2016-01-28 23:04:18 +0000
+++ YearView.qml 2016-02-01 23:35:29 +0000
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import "dateExt.js" as DateExt
@@ -45,27 +45,30 @@
}
}
- head {
- actions: [
+ header: PageHeader {
+ id: pageHeader
+
+ leadingActionBar.actions: tabs.tabsAction
+ trailingActionBar.actions: [
calendarTodayAction,
+ commonHeaderActions.newEventAction,
commonHeaderActions.showCalendarAction,
commonHeaderActions.reloadAction,
commonHeaderActions.syncCalendarAction,
commonHeaderActions.settingsAction
]
- contents: Label {
- id:year
- objectName:"yearLabel"
- fontSize: "large"
- text: i18n.tr("Year %1").arg(currentYear)
- }
+ title: i18n.tr("Year %1").arg(currentYear)
+ flickable: null
}
PathViewBase {
id: yearPathView
objectName: "yearPathView"
- anchors.fill: parent
+ anchors {
+ fill: parent
+ topMargin: header.height
+ }
onNextItemHighlighted: {
currentYear = currentYear + 1;
=== modified file 'YearViewDelegate.qml'
--- YearViewDelegate.qml 2015-12-06 20:06:50 +0000
+++ YearViewDelegate.qml 2016-02-01 23:35:29 +0000
@@ -1,4 +1,4 @@
-import QtQuick 2.0
+import QtQuick 2.4
import Ubuntu.Components 1.3
GridView{
=== modified file 'calendar.qml'
--- calendar.qml 2015-12-06 20:06:50 +0000
+++ calendar.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
import QtOrganizer 5.0
@@ -210,6 +210,17 @@
}
}
+
+ EventActions {
+ id: commonHeaderActions
+ }
+
+ Settings {
+ id: settings
+ property alias defaultViewIndex: tabs.selectedTabIndex
+ property alias showWeekNumber: mainView.displayWeekNumber
+ }
+
Tabs{
id: tabs
Keys.forwardTo: [tabs.currentPage]
@@ -281,6 +292,32 @@
endtime = url.match(/endtime=(\d+)/)[0].replace("endtime=", '');
}
+ //WORKAROUND: The new header api does not work with tabs check bug: #1539759
+ property var tabsAction: []
+
+ function createTabAction(index, title, name)
+ {
+ var actionQml = "import Ubuntu.Components 1.3; Action { objectName: \"tab_%3\"; name: \"tab_%3\"; visible: (tabs.selectedTabIndex != %2); text: i18n.tr(\"%1\"); onTriggered: { tabs.selectedTabIndex = %2; }}"
+ return Qt.createQmlObject(actionQml.arg(title).arg(index).arg(name), tabs, "tabs.qml")
+ }
+
+ function reloadTabActions()
+ {
+ var allPages = [
+ {index: 0, name: yearTab.objectName, title: yearTab.title},
+ {index: 1, name: monthTab.objectName, title: monthTab.title},
+ {index: 2, name: weekTab.objectName, title: weekTab.title},
+ {index: 3, name: dayTab.objectName, title: dayTab.title},
+ {index: 4, name: agendaTab.objectName, title: agendaTab.title},
+ ]
+ var acts = []
+ for(var i=0; i< allPages.length; i++) {
+ var pageInfo = allPages[i]
+ acts.push(createTabAction(pageInfo.index, pageInfo.title, pageInfo.name))
+ }
+ tabsAction = acts
+ }
+
Component.onCompleted: {
// If an url has been set
if (args.defaultArgument.at(0)) {
@@ -313,17 +350,10 @@
else {
tabs.selectedTabIndex = settings.defaultViewIndex;
}
+
+ reloadTabActions()
} // End of Component.onCompleted:
- EventActions {
- id: commonHeaderActions
- }
-
- Settings {
- id: settings
- property alias defaultViewIndex: tabs.selectedTabIndex
- property alias showWeekNumber: mainView.displayWeekNumber
- }
Keys.onTabPressed: {
if( event.modifiers & Qt.ControlModifier) {
=== modified file 'calendarTests.qml'
--- calendarTests.qml 2015-10-31 19:56:40 +0000
+++ calendarTests.qml 2016-02-01 23:35:29 +0000
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.3
+import QtQuick 2.4
import Ubuntu.Components 1.3
MainView {
=== modified file 'tests/autopilot/calendar_app/__init__.py'
--- tests/autopilot/calendar_app/__init__.py 2015-06-27 17:52:44 +0000
+++ tests/autopilot/calendar_app/__init__.py 2016-02-01 23:35:29 +0000
@@ -62,6 +62,23 @@
self.visible.wait_for(True, 30)
@autopilot.logging.log_action(logger.info)
+ def switch_to_tab(self, tabName):
+ # open tab switcher menu
+ current_tab = self.select_single('Tab', visible=True)
+ overflow_tabs = current_tab.wait_select_single(objectName='overflow_action_button')
+ self.pointing_device.click_object(overflow_tabs)
+
+ # click on tab action
+ tab_button = self.wait_select_single(objectName='tab_%s_button'%tabName)
+ self.pointing_device.click_object(tab_button)
+
+ @autopilot.logging.log_action(logger.info)
+ def click_action_button(self, action):
+ current_tab = self.select_single('Tab', visible=True)
+ button = current_tab.wait_select_single(objectName='%s_button'%action)
+ self.pointing_device.click_object(button)
+
+ @autopilot.logging.log_action(logger.info)
def go_to_month_view(self):
"""Open the month view.
@@ -138,8 +155,7 @@
:return: The New Event page.
"""
- header = self.get_header()
- header.click_action_button('neweventbutton')
+ self.click_action_button('neweventbutton')
return self.wait_select_single(NewEvent, objectName='newEventPage')
@autopilot.logging.log_action(logger.info)
@@ -149,8 +165,7 @@
:return: CalendaChoicePopup.
"""
- header = self.get_header()
- header.click_action_button('calendarsbutton')
+ self.click_action_button('calendarsbutton')
return self.wait_select_single(
CalendarChoicePopup, objectName="calendarchoicepopup")
@@ -292,14 +307,8 @@
local = utc.astimezone(tz.tzlocal())
return local
- @autopilot.logging.log_action(logger.info)
- def get_header(self):
- return self.wait_select_single(
- "AppHeader", objectName="MainView_Header")
-
def press_header_todaybutton(self):
- header = self.get_header()
- header.click_action_button('todaybutton')
+ self.click_action_button('todaybutton')
@autopilot.logging.log_action(logger.info)
def get_color_picker_dialog(self):
@@ -308,8 +317,7 @@
@autopilot.logging.log_action(logger.info)
def press_header_custombackbutton(self):
- header = self.get_header()
- header.click_custom_back_button()
+ self.click_custom_back_button()
class YearView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):