|
#include <Wt/WGridLayout.h>
|
|
#include <Wt/WDialog.h>
|
|
#include <Wt/WLabel.h>
|
|
#include <Wt/WLineEdit.h>
|
|
#include <Wt/WPushButton.h>
|
|
|
|
namespace
|
|
{
|
|
class TestGridInDia
|
|
: public Wt::WApplication
|
|
{
|
|
public:
|
|
TestGridInDia( const Wt::WEnvironment& env )
|
|
: Wt::WApplication( env )
|
|
{
|
|
auto dia = root()->addChild( std::make_unique< Wt::WDialog >() );
|
|
dia->finished().connect( [=]
|
|
{
|
|
root()->removeChild( dia );
|
|
});
|
|
|
|
auto grid = dia->contents()->setLayout( std::make_unique< Wt::WGridLayout >() );
|
|
grid->addWidget( std::make_unique< Wt::WLabel >( "Altes Passwort:" ), 0, 0 );
|
|
grid->addWidget( std::make_unique< Wt::WLineEdit >(), 0, 1 );
|
|
grid->addWidget( std::make_unique< Wt::WLabel >( "Neues Passwort:" ), 1, 0 );
|
|
grid->addWidget( std::make_unique< Wt::WLineEdit >(), 1, 1 );
|
|
grid->addWidget( std::make_unique< Wt::WLabel >( "Neues Passwort bestaetigen:" ), 2, 0 );
|
|
grid->addWidget( std::make_unique< Wt::WLineEdit >(), 2, 1 );
|
|
|
|
auto fLayout = dia->footer()->setLayout( std::make_unique< Wt::WHBoxLayout >() );
|
|
fLayout->addWidget( std::make_unique< Wt::WPushButton >( "x" ) );
|
|
fLayout->addWidget( std::make_unique< Wt::WPushButton >( "y" ) );
|
|
fLayout->addStretch( 1 );
|
|
|
|
dia->show();
|
|
}
|
|
};
|
|
}
|