//---------------------------------------------------------------------------
/*
TestQtRoundedTextRectItem, tool to test QtRoundedTextRectItem
Copyright (C) 2012-2014 Richel Bilderbeek
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestQtRoundedTextRectItem.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "testqtroundedtextrectitemmenudialog.h"
#include <cassert>
#include <iostream>
#include "richelbilderbeekprogram.h"
#include "trace.h"
#pragma GCC diagnostic pop
int ribi::TestQtRoundedTextRectItemMenuDialog::ExecuteSpecific(const std::vector<std::string>& argv) noexcept
{
#ifndef NDEBUG
Test();
#endif
const int argc = static_cast<int>(argv.size());
if (argc == 1)
{
std::cout << GetHelp() << '\n';
return 1;
}
assert(!"TODO");
return 1;
}
ribi::About ribi::TestQtRoundedTextRectItemMenuDialog::GetAbout() const noexcept
{
About a(
"Richel Bilderbeek",
"TestQtRoundedTextRectItemWidget",
"tests QtRoundedTextRectItemWidget",
"the 31st of December 2012",
"2012-2014",
"http://www.richelbilderbeek.nl/ToolTestQtRoundedTextRectItemWidget.htm",
GetVersion(),
GetVersionHistory());
//a.AddLibrary("ProFile version: " + ProFile::GetVersion());
a.AddLibrary("Trace version: " + Trace::GetVersion());
return a;
}
ribi::Help ribi::TestQtRoundedTextRectItemMenuDialog::GetHelp() const noexcept
{
return Help(
this->GetAbout().GetFileTitle(),
this->GetAbout().GetFileDescription(),
{
},
{
}
);
}
boost::shared_ptr<const ribi::Program> ribi::TestQtRoundedTextRectItemMenuDialog::GetProgram() const noexcept
{
const boost::shared_ptr<const Program> p {
new ProgramTestQtRoundedTextRectItem
};
assert(p);
return p;
}
std::string ribi::TestQtRoundedTextRectItemMenuDialog::GetVersion() const noexcept
{
return "1.2";
}
std::vector<std::string> ribi::TestQtRoundedTextRectItemMenuDialog::GetVersionHistory() const noexcept
{
return {
"2012-12-21: version 1.0: initial version",
"2012-12-31: version 1.1: added menu",
"2013-11-05: version 1.2: conformized for ProjectRichelBilderbeekConsole"
};
}
#ifndef NDEBUG
void ribi::TestQtRoundedTextRectItemMenuDialog::Test() noexcept
{
{
static bool is_tested = false;
if (is_tested) return;
is_tested = true;
}
TRACE("Starting ribi::TestQtRoundedTextRectItemMenuDialog::Test");
TRACE("Finished ribi::TestQtRoundedTextRectItemMenuDialog::Test successfully");
}
#endif
|