本文整理汇总了C++中WApplication::setTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ WApplication::setTitle方法的具体用法?C++ WApplication::setTitle怎么用?C++ WApplication::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WApplication
的用法示例。
在下文中一共展示了WApplication::setTitle方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void IndexView::init() {
WApplication *app = wApp;
app->setTitle("Leaked Password Query Kit");
render();
}
示例2: WText
WApplication *createApplication(const WEnvironment& env)
{
WApplication *app = new WApplication(env);
app->setTitle(L"Drag & drop");
new WText("<h1>Wt Drag & drop example.</h1>", app->root());
new WText("<p>Help these people with their decision by dragging one of "
"the pills.</p>", app->root());
if (!env.javaScript()) {
new WText("<i>This examples requires that javascript support is "
"enabled.</i>", app->root());
}
WContainerWidget *pills = new WContainerWidget(app->root());
pills->setContentAlignment(WWidget::AlignCenter);
createDragImage("blue-pill.jpg",
"blue-pill-small.png",
"blue-pill", pills);
createDragImage("red-pill.jpg",
"red-pill-small.png",
"red-pill", pills);
WContainerWidget *dropSites = new WContainerWidget(app->root());
new Character(L"Neo", dropSites);
new Character(L"Morpheus", dropSites);
new Character(L"Trinity", dropSites);
app->useStyleSheet("dragdrop.css");
return app;
}
示例3: HangmanGame
WApplication *createApplication(const WEnvironment& env)
{
WApplication *app = new WApplication(env);
app->setTitle(L"Hangman");
new HangmanGame(app->root());
/*
* The application style sheet (only for the highscore widget)
*/
WCssDecorationStyle cellStyle;
WBorder cellBorder;
cellBorder.setStyle(WBorder::Solid);
cellBorder.setWidth(WBorder::Explicit, WLength(1));
cellBorder.setColor(WColor(Wt::lightGray));
cellStyle.setBorder(cellBorder);
app->styleSheet().addRule(".highscores * TD", cellStyle);
cellStyle.font().setVariant(WFont::SmallCaps);
app->styleSheet().addRule(".highscoresheader", cellStyle);
cellStyle.font().setVariant(WFont::NormalVariant);
cellStyle.font().setStyle(WFont::Italic);
cellStyle.font().setWeight(WFont::Bold);
app->styleSheet().addRule(".highscoresself", cellStyle);
return app;
}
示例4: WApplication
WApplication *createApplication(const WEnvironment& env)
{
WApplication *app = new WApplication(env);
app->setTitle(L"Style example");
app->root()->addWidget(new StyleExample());
return app;
}
示例5: TreeViewApplication
WApplication *createApplication(const WEnvironment& env)
{
WApplication *app = new TreeViewApplication(env);
app->setTitle("WTreeView example");
app->messageResourceBundle().use(WApplication::appRoot() + "drinks");
app->styleSheet().addRule("button", "margin: 2px");
//app->useStyleSheet("treeview.css");
return app;
}
示例6: TreeViewDragDrop
WApplication *createApplication(const WEnvironment& env)
{
WApplication *app = new TreeViewDragDrop(env);
app->setTwoPhaseRenderingThreshold(0);
app->setTitle("WTreeView Drag & Drop");
app->useStyleSheet("styles.css");
app->messageResourceBundle().use(WApplication::appRoot() + "about");
app->refresh();
return app;
}
示例7: Page
Cms::Cms()
: Page(),
m_pimpl(make_unique<Cms::Impl>())
{
WApplication *app = WApplication::instance();
app->setTitle(tr("cms-page-title"));
this->clear();
this->setId("CmsPage");
this->setStyleClass("cms-page container-fluid");
this->addWidget(this->Layout());
app->root()->clear();
app->root()->addWidget(this);
WTimer *timer = new WTimer(this);
timer->setInterval(60000); // every one minute
timer->timeout().connect(m_pimpl.get(), &Cms::Impl::ValidateSession);
timer->start();
}