@@ -21,18 +21,21 @@ WinToast integrates all standar templates availables in the [ToastTemplateType e
21
21
22
22
### Usage
23
23
24
- Import the header file wintoastlib.h to your project. Initialize the library with your application info :
24
+ Import the header file wintoastlib.h to your project. For an easy usage, just use the available instance :
25
25
26
26
using namespace WinToastLib;
27
27
....
28
28
WinToast::instance()->setAppName(L"WinToastExample");
29
29
WinToast::instance()->setAppUserModelId(
30
30
WinToast::configureAUMI(L"mohabouje", L"wintoast", L"wintoastexample", L"20161006"));
31
+
32
+ Check if the WinToas is initialized with succes & is compatible with your current OS:
33
+
31
34
if (!WinToast::instance()->initialize()) {
32
35
qDebug() << "Error, your system in not compatible!";
33
36
}
34
37
35
- You could customize your own handler, just create a subclass from ` WinToastHandler ` :
38
+ Now, implement your own handler subclassing the interface ` IWinToastHandler ` :
36
39
37
40
class WinToastHandlerExample : public WinToastHandler {
38
41
public:
@@ -43,7 +46,7 @@ You could customize your own handler, just create a subclass from `WinToastHandl
43
46
void toastFailed() const;
44
47
};
45
48
46
- Now, every time you want to launch a new toast, just create a new template and configure it:
49
+ Now, to notify any event just create a new template and launch it:
47
50
48
51
WinToastHandlerExample* handler = new WinToastHandlerExample;
49
52
WinToastTemplate templ = WinToastTemplate(WinToastTemplate::ImageAndText03);
0 commit comments