Debian Codegraph @

notify/README.md

raw symbols SCIP
1 # Notify
2
3 Notify is a simple component for displaying in app notifications on Ubuntu devices.
4
5 It depends on the Lomiri UI Toolkit for it's functionality but it's easily
6 modified to work with QtQuick.COntrols or some other toolkit.
7
8 ## Usage
9
10 Usage is pretty simple just add the `Notify` component to your `MainView`
11 and use the `Notify::send()` function to display notifications
12
13 ```qml
14 import QtQuick 2.4
15 import Lomiri.Components 1.3
16 import Dekko.Notify 1.0
17
18 MainView {
19 Page {
20 title: "Notify"
21
22 Button {
23 anchors.centerIn: parent
24 text: "Send"
25 onClicked: notify.send("Hello, World", "With a subtitle as well")
26 }
27 }
28 Notify {
29 id: notify
30 }
31 }
32 ```
33
34 Notify comes with a default styled Notification. but this can easily be replaced
35 with a custom notification component to suite your style. This can be done by
36 using a modified `NotifyConfiguration` component and either set the configuration
37 directly on the `Notify` component or pass the configuration as the final argument
38 to `Notify::send()`. New notification components should inherit from `NotificationBase`
39 which you can see an example of in the examples directory.
40
41 The examples directory shows a good range of all supported functionality.