answered
2017-11-23 13:34:32 +0200
This post is a wiki.
Anyone with karma >75 is welcome to improve it.
Pointed from @Edz
for having the format by the event notification that display the duration until the vent comes
(which for me a interesting option to have in the software):
For those who do not mind 'tinkered solutions';
File to edit: /usr/lib/qt5/qml/Sailfish/Calendar/CalendarWidgetDelegate.qml
Line to edit: 57
from: Format.formatDate(startTime, Formatter.WeekdayNameStandalone)
to: Format.formatDate(startTime, Formatter.DurationElapsed)
Lipstick must be restarted for changes to take effect ( systemctl --user restart lipstick.service
)
Download from Openrepos: https://openrepos.net/content/markkyboy/patch-time-hint-calendar-widget
Here are the formatting options for the variable time/date mechanism Calendar uses;
File: /usr/lib/qt5/qml/Sailfish/Silica/plugins.qmltypes
Component {
name: "DeclarativeFormatter"
prototype: "QObject"
exports: [
"Sailfish.Silica/Format 1.0",
"Sailfish.Silica/Formatter 1.0"
]
isCreatable: false
isSingleton: true
exportMetaObjectRevisions: [0, 0]
Enum {
name: "FormatType"
values: {
"Timepoint": 0,
"TimepointRelative": 1,
"TimepointRelativeCurrentDay": 2,
"TimepointRelativeCurrentDayDetailed": 3,
"TimepointSectionRelative": 4,
"TimepointSectionHistorical": 5,
"WeekdayNameStandalone": 6,
"DurationElapsed": 7,
"DurationElapsedShort": 8,
"TimeValueTwelveHours": 9,
"TimeValueTwentyFourHours": 10,
"TimeValue": 11,
"DurationShort": 12,
"DurationLong": 13,
"DateFull": 14,
"DateLong": 15,
"MonthNameStandalone": 16,
"MonthNameStandaloneShort": 17,
"DateMedium": 18,
"DateMediumWithoutYear": 19
}
}
Enum {
name: "ArticleType"
values: {
"AnteMeridiemIndicator": 0,
"PostMeridiemIndicator": 1
}
}
Enum {
name: "TextFormatType"
values: {
"Ascii7Bit": 0,
"PortableFilename": 1
}
}
Method {
name: "formatDate"
type: "string"
Parameter { name: "dateTime"; type: "QDateTime" }
Parameter { name: "formatType"; type: "int" }
}
Method {
name: "formatArticle"
type: "string"
Parameter { name: "articleType"; type: "int" }
}
Method {
name: "formatDuration"
type: "string"
Parameter { name: "seconds"; type: "int" }
Parameter { name: "formatType"; type: "int" }
}
}
Method {
name: "formatFileSize"
type: "string"
Parameter { name: "bytes"; type: "qlonglong" }
Parameter { name: "precision"; type: "int" }
}
Method {
name: "formatFileSize"
type: "string"
Parameter { name: "bytes"; type: "qlonglong" }
}
Method {
name: "formatText"
type: "string"
Parameter { name: "input"; type: "string" }
Parameter { name: "formatType"; type: "int" }
}
Method {
name: "_needsSpaceBetweenNames"
type: "bool"
Parameter { name: "first"; type: "string" }
Parameter { name: "second"; type: "string" }
}
Method {
name: "_joinNames"
type: "string"
Parameter { name: "first"; type: "string" }
}
Method {
name: "trId"
type: "string"
Parameter { name: "id"; type: "string" }
Parameter { name: "catalog"; type: "string" }
Parameter { name: "n"; type: "int" }
Parameter { name: "localeName"; type: "string" }
}
Method {
name: "trId"
type: "string"
Parameter { name: "id"; type: "string" }
Parameter { name: "catalog"; type: "string" }
Parameter { name: "n"; type: "int" }
}
Method {
name: "trId"
type: "string"
Parameter { name: "id"; type: "string" }
Parameter { name: "catalog"; type: "string" }
}
Method {
name: "textDirection"
type: "int"
Parameter { name: "s"; type: "string" }
}
}
sorry if i'm a bit offtopic again, but i really miss an option to set the first day of week. i know there have been a few conversations about this but not a solution - at least in a 'patch'-form.
Artemys ( 2017-11-25 23:40:36 +0200 )edit