Documents > BPS V2 C++ API
BpsSelectUserDialog Class Reference

Select a bps user. More...

#include <bpsdialog.h>

List of all members.

Public Member Functions

 BpsSelectUserDialog (QWidget *aParent, const QString &aTitle, BpsDatastore *aDatastore)
void setUserKey (const QVariant &aUserKey)
 Set the current user key.
QVariant userKey () const

Detailed Description

Select a bps user.

Example:

 BpsSelectUserDialog dlg(this, tr("Select new owner"), ds);
 BpsSettings s;
 s.open(bps->userStatusPath()+bStr("/SelectUser");
 QRect g = s.value("geometry").toRect();
 if (!g.isNull()) dlg.setGeometry(g);
 dlg.setUserKey(currentUserKey);
 if (dlg.exec() == QDialog::Accepted && dlg.userKey().isValid())
     currentUserKey = dlg.userKey();
 s.setValue("geometry", dlg.geometry());
userselectdialog.png

Constructor & Destructor Documentation

BpsSelectUserDialog::BpsSelectUserDialog ( QWidget *  aParent,
const QString &  aTitle,
BpsDatastore aDatastore 
)
Parameters:
aParentThe parent widget.
aTitleThe window title.
aDatastoreThe opened bps datastore.

Member Function Documentation

void BpsSelectUserDialog::setUserKey ( const QVariant &  aUserKey)

Set the current user key.

Typically you would set the text before calling exec or show.

Parameters:
aUserKeyThe key of the user (t_users.c_key).
QVariant BpsSelectUserDialog::userKey ( ) const
Returns:
The selected user.

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