knotifytest.cpp00001 #include <string>
00002 #include <stdio.h>
00003 #include <kapplication.h>
00004 #include <knotifyclient.h>
00005
00006 int main(int argc, char **argv)
00007 {
00008 KApplication app(argc, argv, "knotifytest");
00009
00010
00011 while (1) {
00012 char inp = getc(stdin);
00013
00014 if ( inp=='q' || inp==27 ) break;
00015 if ( inp=='1' ) KNotifyClient::userEvent( "Foo", KNotifyClient::Sound, KNotifyClient::Default, "KDE_Window_DeIconify.ogg" );
00016 if ( inp=='2' ) KNotifyClient::userEvent( "MessageBox Event", KNotifyClient::Messagebox );
00017 if ( inp=='3' ) KNotifyClient::userEvent( "Stderr Event", KNotifyClient::Stderr );
00018 }
00019 }
|