Files
wxWidgets/src/qt/bmpbuttn.cpp
Mariano Reingart 8fc5475e15 Update author's credits comments for wxQT
Commit history was lost in the git to svn merge for trunk, so this reflect work done in two GSOC projects and/or by several authors.
Lines changed by each user was the main metric used to ack major contributions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 03:37:46 +00:00

54 lines
1.5 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: src/qt/bmpbuttn.cpp
// Author: Peter Most, Mariano Reingart
// Copyright: (c) 2010 wxWidgets dev team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/bmpbuttn.h"
wxBitmapButton::wxBitmapButton()
{
}
wxBitmapButton::wxBitmapButton(wxWindow *parent,
wxWindowID id,
const wxBitmap& bitmap,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name )
{
Create( parent, id, bitmap, pos, size, style, validator, name );
}
bool wxBitmapButton::Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& bitmap,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name )
{
if ( !wxBitmapButtonBase::Create( parent, id, pos, size, style, validator, name ))
return false;
// Show the initial bitmap and resize accordingly:
if ( bitmap.IsOk() )
{
wxBitmapButtonBase::SetBitmapLabel(bitmap);
// we need to adjust the size after setting the bitmap as it may be too
// big for the default button size
SetInitialSize(size);
}
return true;
}