//---------------------------------------------------------------------------
/*
ShinyButtonWidget, widget for the ShinyButton class
Copyright (C) 2011 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/CppShinyButtonWidget.htm
//---------------------------------------------------------------------------
#include "shinybutton.h"
#include "shinybuttonwidget.h"
#include "trace.h"
//---------------------------------------------------------------------------
ShinyButtonWidget::ShinyButtonWidget(
const double color,
const double gradient,
const std::string& text)
: m_button(new ShinyButton(color,gradient,text))
{
}
//---------------------------------------------------------------------------
const std::string ShinyButtonWidget::GetVersion()
{
return "1.0";
}
//---------------------------------------------------------------------------
const std::vector<std::string> ShinyButtonWidget::GetVersionHistory()
{
std::vector<std::string> v;
v.push_back("YYYY-MM-DD: version X.Y: [description]");
v.push_back("2011-09-21: version 1.0: initial version");
return v;
}
//---------------------------------------------------------------------------
std::ostream& operator<<(std::ostream& os, const ShinyButtonWidget& button)
{
os
<< "<ShinyButtonWidget>"
<< *button.m_button
<< button.GetGeometry()
<< "</ShinyButtonWidget>";
return os;
}
//---------------------------------------------------------------------------
|