本文整理汇总了C++中wt::WContainerWidget::addWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ WContainerWidget::addWidget方法的具体用法?C++ WContainerWidget::addWidget怎么用?C++ WContainerWidget::addWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wt::WContainerWidget
的用法示例。
在下文中一共展示了WContainerWidget::addWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WLabel
Wt::WWidget * ribi::con3::WtMenuDialog::CreateNewWelcomeDialog() const
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
new Wt::WLabel("Welcome to ConnectThree",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("The goal of ConnectThree is to get three in a row horizontally or vertically:",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("Good #1",dialog);
new Wt::WBreak(dialog);
dialog->addWidget(new Wt::WImage(
m_resources.GetInstructionsGoodFilenames()[0],"Good #1"));
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("Good #2",dialog);
new Wt::WBreak(dialog);
dialog->addWidget(new Wt::WImage(
m_resources.GetInstructionsGoodFilenames()[1],"Good #2"));
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("Wrong",dialog);
new Wt::WBreak(dialog);
dialog->addWidget(new Wt::WImage(
m_resources.
GetInstructionsWrongFilename(),
"Wrong"));
return dialog;
}
示例2:
Wt::WWidget * ribi::con3::WtMenuDialog::CreateNewSelectPlayersDialog()
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
dialog->addWidget(m_select);
return dialog;
}
示例3:
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8/////////9/////////A
Wt::WWidget * WelcomeScreen::makeRegistrationTab()
{
Wt::WContainerWidget *cont = new Wt::WContainerWidget();
rg_txt_ = new Wt::WText("Hier koennen Sie ihr neues Flugbuch eroeffnen.", cont);
cont->addWidget(new Wt::WBreak());
cont->addWidget(new Wt::WBreak());
Wt::WTable *layout = new Wt::WTable(cont);
Wt::WLabel *usernameLabel = new Wt::WLabel("Benutzername: ", layout->elementAt(0, 0));
layout->elementAt(0, 0)->resize(Wt::WLength(14, Wt::WLength::FontEx), Wt::WLength());
rg_username_ = new Wt::WLineEdit(layout->elementAt(0, 1));
usernameLabel->setBuddy(rg_username_);
Wt::WLabel *passwordLabel = new Wt::WLabel("Passwort: ", layout->elementAt(1, 0));
rg_password_ = new Wt::WLineEdit(layout->elementAt(1, 1));
rg_password_->setEchoMode(Wt::WLineEdit::Password);
passwordLabel->setBuddy(rg_password_);
Wt::WLabel *passwordLabel2 = new Wt::WLabel("wiederholen: ", layout->elementAt(2, 0));
rg_password2_ = new Wt::WLineEdit(layout->elementAt(2, 1));
rg_password2_->setEchoMode(Wt::WLineEdit::Password);
rg_password2_->enterPressed().connect(SLOT(this, WelcomeScreen::doRegister));
passwordLabel2->setBuddy(rg_password2_);
Wt::WLabel *stdflareas = new Wt::WLabel("Standardfluggebiete importieren: ", layout->elementAt(3, 0));
rg_useStdLoc_ = new Wt::WCheckBox(layout->elementAt(3, 1));
stdflareas->setBuddy(rg_useStdLoc_);
Wt::WPushButton *LoginButton = new Wt::WPushButton("Registrieren", layout->elementAt(4, 1));
LoginButton->clicked().connect(SLOT( this, WelcomeScreen::doRegister));
return cont;
}
示例4: logout
void WebApp::logout() {
_isAuthenticated = false;
_user_id = 0;
west->layout()->removeWidget(menu);
delete menu;
west->collapse();
Wt::WContainerWidget *container = new Wt::WContainerWidget(exampleContainer_);
container->addWidget(new Wt::WText(Wt::WString::tr("logged_out")));
setContent(container);
}
示例5: authenticated
void WebApp::authenticated() {
_isAuthenticated = true;
_user_id = login->getUserId();
west->layout()->addWidget(menu = createMenuTree());
west->expand();
Wt::WContainerWidget *container = new Wt::WContainerWidget(exampleContainer_);
container->addWidget(new Wt::WText(Wt::WString::tr("about")));
login->setHidden(true);
currentExample_ = container;
}
示例6: WLabel
Wt::WWidget * ribi::tgrw::WtMenuDialog::CreateNewWelcomeDialog() const
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
new Wt::WLabel("Welcome to TestGroupWidget",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("TestGroupWidget tests and displays the GroupWidget class",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
Wt::WGroupBox * const box = new Wt::WGroupBox("Explanation",dialog);
box->addWidget(new Wt::WImage("ToolTestGroupWidgetWelcome.png"));
return dialog;
}
示例7: WLabel
//---------------------------------------------------------------------------
Wt::WWidget * ribi::ToolTestServerPusher::WtMenuDialog::CreateNewWelcomeDialog() const
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
new Wt::WLabel("Welcome to TestServerPusher",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("TestServerPusher demonstrates how to view the same changing info",dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("from different browsers and/or computers",dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("using the WtServerPusher and WtServerPusherClient classes",dialog);
return dialog;
}
示例8: WLabel
Wt::WWidget * ribi::ToolTestEntrance::WtMenuDialog::CreateNewWelcomeDialog() const
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
new Wt::WLabel("Welcome to TestEntrance",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("TestEntrance demonstrates the WtEntrance class",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
Wt::WGroupBox * const box = new Wt::WGroupBox("Explanation",dialog);
box->addWidget(new Wt::WImage("ToolTestEntranceWelcome.png"));
return dialog;
}
示例9: WLabel
Wt::WWidget * ribi::WtRandomCodeMenuDialog::CreateNewWelcomeDialog() const
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
new Wt::WLabel("Welcome to RandomCode",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("The goal of RandomCode is to generate random C++ code",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
Wt::WGroupBox * const box = new Wt::WGroupBox("Explanation",dialog);
box->addWidget(new Wt::WImage("ToolRandomCodeWelcome.png"));
return dialog;
}
示例10: WLabel
//---------------------------------------------------------------------------
Wt::WWidget * WtTestToggleButtonMenuDialog::CreateNewWelcomeDialog() const
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
new Wt::WLabel("Welcome to TestToggleButton",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("TestToggleButton tests and displays the ToggleButton and WtToggleButtonWidget classes",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
Wt::WGroupBox * const box = new Wt::WGroupBox("Explanation",dialog);
box->addWidget(new Wt::WImage("ToolTestToggleButtonWelcome.png"));
return dialog;
}
示例11: WLabel
Wt::WWidget * ribi::WtAsciiArterMainDialog::CreateNewWelcomeDialog() const
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
new Wt::WLabel("Welcome to AsciiArter",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("AsciiArter is a tool to convert images to ascii art.",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
Wt::WGroupBox * const box = new Wt::WGroupBox("Explanation",dialog);
box->addWidget(new Wt::WImage("ToolAsciiArterWelcome.png"));
return dialog;
}
示例12: WLabel
//---------------------------------------------------------------------------
Wt::WWidget * WtTestEncrangerMenuDialog::CreateNewWelcomeDialog() const
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
dialog->setContentAlignment(Wt::AlignCenter);
dialog->addWidget(new Wt::WBreak);
new Wt::WLabel("Welcome to TestEncranger",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
new Wt::WLabel("TestEncranger demonstrates the Encranger encryption and de-encryption algorithm",dialog);
new Wt::WBreak(dialog);
new Wt::WBreak(dialog);
Wt::WGroupBox * const box = new Wt::WGroupBox("Explanation",dialog);
box->addWidget(new Wt::WImage("ToolTestEncrangerWelcome.png"));
return dialog;
}
示例13:
Wt::WContainerWidget *PopupChatWidget::createBar()
{
Wt::WContainerWidget *bar = new Wt::WContainerWidget();
bar->setStyleClass("chat-bar");
Wt::WText *toggleButton = new Wt::WText();
toggleButton->setInline(false);
toggleButton->setStyleClass("chat-minmax");
bar->clicked().connect(this, &PopupChatWidget::toggleSize);
bar->clicked().connect(this, &PopupChatWidget::goOnline);
bar->addWidget(toggleButton);
title_ = new Wt::WText(bar);
bar_ = bar;
return bar;
}
示例14: assert
Wt::WWidget * ribi::WtAsciiArterMainDialog::CreateNewMainDialog()
{
Wt::WContainerWidget * dialog = new Wt::WContainerWidget;
//File upload
{
assert(ui.m_fileupload);
//Upload automatically when the user entered a file
ui.m_fileupload->changed().connect(
ui.m_fileupload,
&Wt::WFileUpload::upload);
//Call WtTextUploadDialog::on_upload_done when file is uploaded
ui.m_fileupload->uploaded().connect(
this,
&ribi::WtAsciiArterMainDialog::OnUploadDone);
dialog->addWidget(ui.m_fileupload);
}
dialog->addWidget(new Wt::WBreak);
dialog->addWidget(new Wt::WBreak);
//Width edit
{
assert(ui.m_edit_width);
//if (m_dialog)
//{
// ui.m_edit_width->setText(
// boost::lexical_cast<std::string>(m_dialog->GetWidth()));
//}
//Respond to if user presses enter
ui.m_edit_width->enterPressed().connect(
this, &ribi::WtAsciiArterMainDialog::OnEditWidthChange);
dialog->addWidget(ui.m_edit_width);
}
//Convert button
{
Wt::WPushButton * const button = new Wt::WPushButton("Convert");
button->clicked().connect(
this, &ribi::WtAsciiArterMainDialog::OnConvertClick);
dialog->addWidget(button);
}
dialog->addWidget(new Wt::WBreak);
dialog->addWidget(new Wt::WBreak);
//text
{
assert(ui.m_text);
ui.m_text->setMinimumSize(600,600);
dialog->addWidget(ui.m_text);
}
return dialog;
}
示例15: showFullList
void ContactList::showFullList()
{
WtUtilFuns::removeChildWidgets(this);
clearPanels();
for(std::map<ContactGroup,Wt::WPanel*>::iterator it = mContactPanels.begin(); it != mContactPanels.end(); ++it)
{
//uto& contacts = it->;
const ContactGroup &group = it->first;
auto panel = it->second;
Wt::WContainerWidget* container = static_cast<Wt::WContainerWidget*>(panel->centralWidget());
BOOST_FOREACH(const ContactInfo& info, group.contacts)
{
ContactEntry *entry = mUinToEntry[info.uin];
container->addWidget(entry);
}
if(container->count())
addWidget(panel);
}
}