Quark  0.1
InputDialogBuilder Class Reference

A builder object for constructing simple input dialogs. More...

#include <InputDialogBuilder.h++>

Inheritance diagram for InputDialogBuilder:

Public Member Functions

 InputDialogBuilder (QWidget *parent, const QString &message)
 Constructor. More...
 
virtual ~InputDialogBuilder ()
 Destructor. More...
 
InputDialogBuildersetFeature (const QString &feature)
 Specifies the feature name for the dialog. More...
 
InputDialogBuildersetDefaultInput (const QString &input)
 Specifies the default input for the dialog. More...
 
InputDialogBuildersetSlot (QObject *target, const char *slot)
 Specifies a slot to be invoked when the dialog is accepted. More...
 
InputDialogBuildersetSlot (const char *slot)
 Specifies a slot of the dialog's parent widget to be invoked when the dialog is accepted. More...
 
template<typename T >
InputDialogBuilderaddSlotArg (const T &arg)
 Adds an argument to be passed to the slot when the dialog is accepted. More...
 
void show ()
 Constructs and displays the dialog. More...
 

Detailed Description

A builder object for constructing simple input dialogs.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ InputDialogBuilder()

InputDialogBuilder ( QWidget *  parent,
const QString &  message 
)

Constructor.

Begins the construction of an input dialog.

Parameters
parentThe parent widget for the dialog.
messageThe message text to be displayed in the dialog.

◆ ~InputDialogBuilder()

virtual ~InputDialogBuilder ( )
virtual

Destructor.

Member Function Documentation

◆ addSlotArg()

InputDialogBuilder& addSlotArg ( const T &  arg)
inline

Adds an argument to be passed to the slot when the dialog is accepted.

This is useful for passing application state through the dialog.

Template Parameters
TThe type of the slot argument. This must be a type that can be converted to/from a QVariant.
Parameters
argThe slot argument. A copy of the argument is made and stored within the dialog.

◆ setDefaultInput()

InputDialogBuilder& setDefaultInput ( const QString &  input)

Specifies the default input for the dialog.

◆ setFeature()

InputDialogBuilder& setFeature ( const QString &  feature)

Specifies the feature name for the dialog.

◆ setSlot() [1/2]

InputDialogBuilder& setSlot ( QObject *  target,
const char *  slot 
)

Specifies a slot to be invoked when the dialog is accepted.

Parameters
targetThe target object to invoke the slot on.
slotThe slot to invoke. The slot must take a single QString argument.

◆ setSlot() [2/2]

InputDialogBuilder& setSlot ( const char *  slot)
inline

Specifies a slot of the dialog's parent widget to be invoked when the dialog is accepted.

Parameters
slotThe slot to invoke. The slot must take a single QString argument.

◆ show()

void show ( )
inherited

Constructs and displays the dialog.


The documentation for this class was generated from the following file: