|
|
This class provides a method for issuing events to a KNotifyServer call KNotifyClient::event("eventname"); to issue it. On installation, there should be a file called $KDEDIR/share/apps/appname/eventsrc which contains the events.
The file looks like this:
[!Global!] appname=executable friendly=FriendlyNameOfApp [eventname] friendly=FriendlyNameOfEvent description=DescriptionOfEvent default_sound=/path/to/sound/file default_presentation=1 ...
This class works, but is still in testing.
|
The Default constructor. You should have little use for this thanks to the event method.
Parameters:
message | The event type to send, such as "Desktop1" for a virtual desktop change |
text | If you need to send off a message with your alert. This will happen for an error level of 2 or more. |
present | How to present it. If "Default" is chosen, the server will decide according to the config |
client | The DCOPClient to use. Usually it pulls the one from your KApplication. |
bool |
[slot]
If you need to send a message a whole lot sequentially, for reasons I don't want to know, you might instanciate a KNotifyClient, and call this function when needed.
bool |
[static]
This should be the most used method in here. Call it by KNotifyClient::event("EventName"); It will use KApplication::kApplication->dcopClient() to communicate to the server
Parameters:
message | The name of the event |
text | The text to put in a dialog box. This won't be shown if the user connected the event to sound, only. |
Reimplemented from QObject
bool |
[static]
Will fire an event that's not registered.
Parameters:
text | The error message text, if applicable |
present | The error message level, one again, defaulting to "Default" |
file | The sound file to play if selected with present |
Presentation |
[static]
Gets the presentation associated with a certain event name Remeber that they may be ORed: if (present & KNotifyClient::Sound) { [Yes, sound is a default] }
QString |
[static]
Gets the default file associated with a certain event name The control panel module will list all the event names This has the potential for being slow. [Not Yet Implemented!]
This gets it for this app only!
Presentation |
[static]
Gets the default presentation for the event of this program. Remember that the Presentation may be ORed. Try this: if (present & KNotifyClient::Sound) { [Yes, sound is a default] }
QString |
[static]
Gets the default File for the event of this program. It gets it in relation to present. Some events don't apply to this function ("Message Box") Some do (Sound)