Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few minor corrections, mostly undoing wrong changes to common files in that branch (results of a previous bad merge?) and getting rid of whitespace-only changes. Also remove debug logging from wxGrid. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
66
src/qt/button.cpp
Normal file
66
src/qt/button.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/qt/button.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/button.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/qt/private/utils.h"
|
||||
#include "wx/qt/private/winevent.h"
|
||||
|
||||
|
||||
wxButton::wxButton()
|
||||
{
|
||||
}
|
||||
|
||||
wxButton::wxButton(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name )
|
||||
{
|
||||
Create( parent, id, label, pos, size, style, validator, name );
|
||||
}
|
||||
|
||||
bool wxButton::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name )
|
||||
{
|
||||
QtCreate(parent);
|
||||
SetLabel( wxIsStockID( id ) ? wxGetStockLabel( id ) : label );
|
||||
|
||||
return QtCreateControl( parent, id, pos, size, style, validator, name );
|
||||
}
|
||||
|
||||
wxWindow *wxButton::SetDefault()
|
||||
{
|
||||
wxWindow *oldDefault = wxButtonBase::SetDefault();
|
||||
|
||||
m_qtPushButton->setDefault( true );
|
||||
|
||||
return oldDefault;
|
||||
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxSize wxButtonBase::GetDefaultSize()
|
||||
{
|
||||
static wxSize size = wxDefaultSize;
|
||||
if (size == wxDefaultSize)
|
||||
{
|
||||
// Default size of buttons should be same as size of stock
|
||||
// buttons as used in most GTK+ apps. (currently this is aproximate)
|
||||
QPushButton btn;
|
||||
size = wxQtConvertSize(btn.sizeHint());
|
||||
}
|
||||
return size;
|
||||
}
|
||||
Reference in New Issue
Block a user