本文整理汇总了C++中About::CreateVersionHistory方法的典型用法代码示例。如果您正苦于以下问题:C++ About::CreateVersionHistory方法的具体用法?C++ About::CreateVersionHistory怎么用?C++ About::CreateVersionHistory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类About
的用法示例。
在下文中一共展示了About::CreateVersionHistory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WLabel
ribi::WtAboutDialog::WtAboutDialog(
const About& about_original,
const bool display_close_button)
: m_signal_close{},
m_button_close(new Wt::WPushButton)
{
About about = about_original;
about.AddLibrary("Wt version: " + GetWtVersion());
about.AddLibrary("WtAboutDialog version: " + GetVersion());
this->setContentAlignment(Wt::AlignCenter);
const int min_width = 800;
//Display the general about text
{
const std::vector<std::string> v = about.CreateAboutText();
for(const auto s: v)
{
new Wt::WLabel(s.c_str(),this);
this->addWidget(new Wt::WBreak);
}
}
this->addWidget(new Wt::WBreak);
//Display the libraries used text
{
Wt::WTextArea * text = new Wt::WTextArea;
{
const std::vector<std::string> v = about.CreateLibrariesUsedText();
std::string s;
for(const auto t: v) { s+=t; s+="\n"; }
text->setText(s);
}
text->setMinimumSize(min_width,100);
text->setReadOnly(true);
this->addWidget(text);
}
this->addWidget(new Wt::WBreak);
//Display the version history
{
Wt::WTextArea * text = new Wt::WTextArea;
{
const std::vector<std::string> v = about.CreateVersionHistory();
std::string s;
for(const auto t: v) { s+=t; s+="\n"; }
text->setText(s);
}
text->setMinimumSize(min_width,100);
text->setReadOnly(true);
this->addWidget(text);
}
this->addWidget(new Wt::WBreak);
//Display the licence text
{
Wt::WTextArea * text = new Wt::WTextArea;
{
const std::vector<std::string> v = about.CreateLicenceText();
std::string s;
for(const auto t: v) { s+=t; s+="\n"; }
text->setText(s);
}
text->setMinimumSize(min_width,100);
text->setReadOnly(true);
this->addWidget(text);
}
addWidget(new Wt::WBreak);
{
const std::string s
= std::string("Source code built at ")
+ std::string(__DATE__)
+ std::string(" ")
+ std::string(__TIME__);
new Wt::WLabel(s.c_str(),this);
this->addWidget(new Wt::WBreak);
}
if (display_close_button)
{
this->addWidget(new Wt::WBreak);
this->addWidget(m_button_close);
m_button_close->setText("Close");
m_button_close->clicked().connect(
this,&ribi::WtAboutDialog::OnClose);
}
}