A JavaScript based popup window, encapsulating the Javascript functions alert(), confirm(), and prompt().
More...
#include <Popup.h>
List of all members.
Detailed Description
A JavaScript based popup window, encapsulating the Javascript functions alert(), confirm(), and prompt().
Use one of the create static methods to create a popup. This will not display the popup, until either the show slot is triggered from an event handler, or is executed using it's exec() method.
When the user closes the popup, either the okPressed or cancelPressed signal is emitted. For a prompt dialog, the value is passed as a parameter to the okPressed signal.
Definition at line 32 of file Popup.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
Popup::Popup |
( |
Type |
t, |
|
|
const WString & |
message, |
|
|
const std::string |
defaultValue, |
|
|
WObject * |
parent | |
|
) |
| | [private] |
Member Function Documentation
Create a confirm dialog.
Definition at line 71 of file Popup.C.
Popup * Popup::createPrompt |
( |
const WString & |
message, |
|
|
const std::string |
defaultValue, |
|
|
WObject * |
parent = 0 | |
|
) |
| | [static] |
Create a prompt dialog with the given default value.
Definition at line 81 of file Popup.C.
Create an alert dialog.
Definition at line 76 of file Popup.C.
void Popup::setMessage |
( |
const WString & |
message |
) |
|
Change the message.
Definition at line 59 of file Popup.C.
void Popup::setDefaultValue |
( |
const std::string |
defaultValue |
) |
|
Change the default value for a prompt dialog.
Definition at line 65 of file Popup.C.
const WMessage& Popup::message |
( |
|
) |
const [inline] |
Get the current message.
Definition at line 59 of file Popup.h.
const std::string& Popup::defaultValue |
( |
|
) |
const [inline] |
Get the default value for a prompt dialog.
Definition at line 63 of file Popup.h.
void Popup::setJavaScript |
( |
|
) |
[private] |
Update the javascript code.
Definition at line 24 of file Popup.C.
Member Data Documentation
Show the dialog.
Use show.exec() to show the dialog, or connect the slot to an EventSignal to directly show the dialog without a server round trip.
Definition at line 70 of file Popup.h.
Signal emitted when ok pressed.
Definition at line 74 of file Popup.h.
Signal emitted when cancel is pressed.
Definition at line 78 of file Popup.h.
The documentation for this class was generated from the following files:
- /home/koen/project/wt/cvs/wt/examples/javascript/Popup.h
- /home/koen/project/wt/cvs/wt/examples/javascript/Popup.C