Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from all the non-generated files. This should hopefully avoid future commits mixing significant changes with insignificant whitespace ones.
This commit is contained in:
@@ -32,18 +32,18 @@ class wxAccelRefData : public wxObjectRefData
|
||||
wxAccelRefData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
wxAccelRefData(const wxAccelRefData& data)
|
||||
: wxObjectRefData()
|
||||
{
|
||||
m_accels = data.m_accels;
|
||||
}
|
||||
|
||||
|
||||
virtual ~wxAccelRefData()
|
||||
{
|
||||
WX_CLEAR_LIST(wxAccelList, m_accels);
|
||||
}
|
||||
|
||||
|
||||
wxAccelList m_accels;
|
||||
};
|
||||
|
||||
@@ -61,7 +61,7 @@ QShortcut *ConvertAccelerator( wxAcceleratorEntry *e, QWidget *parent )
|
||||
{
|
||||
// TODO: Not all keys have the same string representation in wx and qt
|
||||
QShortcut *s = new QShortcut( wxQtConvertString( e->ToString() ), parent );
|
||||
|
||||
|
||||
// Set a property to save wx Command to send when activated
|
||||
s->setProperty( "wxQt_Command", e->GetCommand() );
|
||||
|
||||
@@ -75,7 +75,7 @@ wxAcceleratorTable::wxAcceleratorTable()
|
||||
wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
|
||||
{
|
||||
m_refData = new wxAccelRefData;
|
||||
|
||||
|
||||
for ( int i = 0; i < n; i++ )
|
||||
{
|
||||
M_ACCELDATA->m_accels.Append( new wxAcceleratorEntry( entries[i] ) );
|
||||
@@ -83,14 +83,14 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]
|
||||
}
|
||||
|
||||
QList< QShortcut* > *wxAcceleratorTable::ConvertShortcutTable( QWidget *parent ) const
|
||||
{
|
||||
{
|
||||
QList< QShortcut* > *qtList = new QList< QShortcut* >;
|
||||
|
||||
|
||||
for ( wxAccelList::compatibility_iterator node = M_ACCELDATA->m_accels.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
qtList->push_back(ConvertAccelerator( node->GetData(), parent ));
|
||||
}
|
||||
|
||||
|
||||
return qtList;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ bool wxApp::Initialize( int &argc, wxChar **argv )
|
||||
* deleted as they are internally kept by Qt in a list after calling arguments().
|
||||
* However, there isn't any guarantee of that in the docs, so we keep arguments
|
||||
* ourselves and only delete then after the QApplication is deleted */
|
||||
|
||||
|
||||
// Qt changed the arguments
|
||||
delete [] argv;
|
||||
argv = new wxChar *[qtArgs.size() + 1];
|
||||
|
||||
@@ -33,7 +33,7 @@ wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer)
|
||||
// void wxGUIAppTraits::MutexGuiEnter()
|
||||
// {
|
||||
// }
|
||||
//
|
||||
//
|
||||
// void wxGUIAppTraits::MutexGuiLeave()
|
||||
// {
|
||||
// }
|
||||
|
||||
@@ -32,33 +32,33 @@
|
||||
static wxImage ConvertImage( QImage qtImage )
|
||||
{
|
||||
bool hasAlpha = qtImage.hasAlphaChannel();
|
||||
|
||||
|
||||
int numPixels = qtImage.height() * qtImage.width();
|
||||
|
||||
//Convert to ARGB32 for scanLine
|
||||
qtImage = qtImage.convertToFormat(QImage::Format_ARGB32);
|
||||
|
||||
|
||||
unsigned char *data = (unsigned char *)malloc(sizeof(char) * 3 * numPixels);
|
||||
unsigned char *startData = data;
|
||||
|
||||
|
||||
unsigned char *alpha = NULL;
|
||||
if (hasAlpha)
|
||||
alpha = (unsigned char *)malloc(sizeof(char) * numPixels);
|
||||
|
||||
unsigned char *startAlpha = alpha;
|
||||
|
||||
|
||||
for (int y = 0; y < qtImage.height(); y++)
|
||||
{
|
||||
QRgb *line = (QRgb*)qtImage.scanLine(y);
|
||||
|
||||
|
||||
for (int x = 0; x < qtImage.width(); x++)
|
||||
{
|
||||
QRgb colour = line[x];
|
||||
|
||||
|
||||
data[0] = qRed(colour);
|
||||
data[1] = qGreen(colour);
|
||||
data[2] = qBlue(colour);
|
||||
|
||||
|
||||
if (hasAlpha)
|
||||
{
|
||||
alpha[0] = qAlpha(colour);
|
||||
@@ -79,7 +79,7 @@ static QImage ConvertImage( const wxImage &image )
|
||||
bool hasMask = image.HasMask();
|
||||
QImage qtImage( wxQtConvertSize( image.GetSize() ),
|
||||
( (hasAlpha || hasMask ) ? QImage::Format_ARGB32 : QImage::Format_RGB32 ) );
|
||||
|
||||
|
||||
unsigned char *data = image.GetData();
|
||||
unsigned char *alpha = hasAlpha ? image.GetAlpha() : NULL;
|
||||
QRgb colour;
|
||||
@@ -91,7 +91,7 @@ static QImage ConvertImage( const wxImage &image )
|
||||
image.GetOrFindMaskColour( &r, &g, &b );
|
||||
maskedColour = ( r << 16 ) + ( g << 8 ) + b;
|
||||
}
|
||||
|
||||
|
||||
for (int y = 0; y < image.GetHeight(); y++)
|
||||
{
|
||||
for (int x = 0; x < image.GetWidth(); x++)
|
||||
@@ -103,14 +103,14 @@ static QImage ConvertImage( const wxImage &image )
|
||||
}
|
||||
else
|
||||
colour = 0;
|
||||
|
||||
|
||||
colour += (data[0] << 16) + (data[1] << 8) + data[2];
|
||||
|
||||
if ( hasMask && colour != maskedColour )
|
||||
colour += 0xFF000000; // 255 << 24
|
||||
|
||||
|
||||
qtImage.setPixel(x, y, colour);
|
||||
|
||||
|
||||
data += 3;
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ class wxBitmapRefData: public wxGDIRefData
|
||||
{
|
||||
public:
|
||||
wxBitmapRefData() { m_mask = NULL; }
|
||||
|
||||
|
||||
wxBitmapRefData( int width, int height, int depth )
|
||||
{
|
||||
if (depth == 1)
|
||||
@@ -134,7 +134,7 @@ class wxBitmapRefData: public wxGDIRefData
|
||||
m_qtPixmap = QPixmap( width, height );
|
||||
m_mask = NULL;
|
||||
}
|
||||
|
||||
|
||||
wxBitmapRefData( QPixmap pix )
|
||||
{
|
||||
m_qtPixmap = pix;
|
||||
@@ -231,7 +231,7 @@ bool wxBitmap::Create(int width, int height, int depth )
|
||||
{
|
||||
UnRef();
|
||||
m_refData = new wxBitmapRefData(width, height, depth);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -292,14 +292,14 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect& rect) const
|
||||
|
||||
bool wxBitmap::SaveFile(const wxString &name, wxBitmapType type,
|
||||
const wxPalette *WXUNUSED(palette) ) const
|
||||
{
|
||||
{
|
||||
#if wxUSE_IMAGE
|
||||
//Try to save using wx
|
||||
wxImage image = ConvertToImage();
|
||||
if (image.IsOk() && image.SaveFile(name, type))
|
||||
return true;
|
||||
#endif
|
||||
|
||||
|
||||
//Try to save using Qt
|
||||
const char* type_name = NULL;
|
||||
switch (type)
|
||||
@@ -359,7 +359,7 @@ bool wxBitmap::LoadFile(const wxString &name, wxBitmapType type)
|
||||
{
|
||||
//Try to load using Qt
|
||||
AllocExclusive();
|
||||
|
||||
|
||||
//TODO: Use passed image type instead of auto-detection
|
||||
return M_PIXDATA.load(wxQtConvertString(name));
|
||||
}
|
||||
@@ -482,7 +482,7 @@ wxMask& wxMask::operator=(const wxMask &mask)
|
||||
QBitmap *mask_bmp = mask.GetHandle();
|
||||
m_qtBitmap = mask_bmp ? new QBitmap(*mask_bmp) : NULL;
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour)
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ static Qt::BrushStyle ConvertBrushStyle(wxBrushStyle style)
|
||||
|
||||
case wxBRUSHSTYLE_VERTICAL_HATCH:
|
||||
return Qt::VerPattern;
|
||||
|
||||
|
||||
case wxBRUSHSTYLE_STIPPLE:
|
||||
case wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE:
|
||||
case wxBRUSHSTYLE_STIPPLE_MASK:
|
||||
@@ -66,21 +66,21 @@ class wxBrushRefData: public wxGDIRefData
|
||||
m_style(wxBRUSHSTYLE_INVALID)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
wxBrushRefData( const wxBrushRefData& data )
|
||||
{
|
||||
m_qtBrush = data.m_qtBrush;
|
||||
m_style = data.m_style;
|
||||
}
|
||||
|
||||
|
||||
bool operator == (const wxBrushRefData& data) const
|
||||
{
|
||||
return m_qtBrush == data.m_qtBrush;
|
||||
}
|
||||
|
||||
|
||||
QBrush m_qtBrush;
|
||||
|
||||
// To keep if mask is stippled
|
||||
// To keep if mask is stippled
|
||||
wxBrushStyle m_style;
|
||||
};
|
||||
|
||||
@@ -155,9 +155,9 @@ void wxBrush::SetStipple(const wxBitmap& stipple)
|
||||
bool wxBrush::operator==(const wxBrush& brush) const
|
||||
{
|
||||
if (m_refData == brush.m_refData) return true;
|
||||
|
||||
|
||||
if (!m_refData || !brush.m_refData) return false;
|
||||
|
||||
|
||||
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxSize& size, long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name )
|
||||
{
|
||||
{
|
||||
QtCreate(parent);
|
||||
SetLabel( label.IsEmpty() && wxIsStockID( id ) ? wxGetStockLabel( id ) : label );
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ void wxCalendarCtrl::SetAttr(size_t day, wxCalendarDateAttr *attr)
|
||||
// wxFont is not implemented yet
|
||||
//if ( attr->HasFont() )
|
||||
// format.setFont(attr->GetFont().GetQFont());
|
||||
|
||||
|
||||
m_qtCalendar->setDateTextFormat(date, format);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ wxCheckBoxState wxCheckBox::DoGet3StateValue() const
|
||||
|
||||
case Qt::Checked:
|
||||
return wxCHK_CHECKED;
|
||||
|
||||
|
||||
case Qt::PartiallyChecked:
|
||||
return wxCHK_UNDETERMINED;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
||||
|
||||
// how to add timestamp?
|
||||
|
||||
// Unfortunately I cannot find a way to use the qt clipboard with
|
||||
// Unfortunately I cannot find a way to use the qt clipboard with
|
||||
// a callback to select the data type, so I must copy it all here
|
||||
|
||||
for ( size_t i = 0; i < count; i++ )
|
||||
@@ -142,7 +142,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
for ( size_t i = 0; i < count; i++ )
|
||||
{
|
||||
const wxDataFormat format(formats[i]);
|
||||
|
||||
|
||||
// is this format supported by clipboard ?
|
||||
if( !MimeData->hasFormat(wxQtConvertString(format.m_MimeType)) )
|
||||
continue;
|
||||
|
||||
@@ -45,9 +45,9 @@ wxColourData &wxColourDialog::GetColourData()
|
||||
{
|
||||
for (int i=0; i<wxColourData::NUM_CUSTOM; i++)
|
||||
m_data.SetCustomColour(i, GetQColorDialog()->customColor(i));
|
||||
|
||||
|
||||
m_data.SetColour(GetQColorDialog()->currentColor());
|
||||
|
||||
|
||||
return m_data;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ void wxCursor::InitFromStock( wxStockCursor cursorId )
|
||||
GetHandle() = QBitmap();
|
||||
return;
|
||||
}
|
||||
// case wxCURSOR_ARROW:
|
||||
// case wxCURSOR_ARROW:
|
||||
case wxCURSOR_DEFAULT: qt_cur = Qt::ArrowCursor; break;
|
||||
// case wxCURSOR_RIGHT_ARROW:
|
||||
case wxCURSOR_HAND: qt_cur = Qt::OpenHandCursor; break;
|
||||
@@ -129,7 +129,7 @@ void wxCursor::InitFromStock( wxStockCursor cursorId )
|
||||
/* case wxCURSOR_PAINT_BRUSH:
|
||||
case wxCURSOR_MAGNIFIER:
|
||||
case wxCURSOR_CHAR:
|
||||
case wxCURSOR_LEFT_BUTTON:
|
||||
case wxCURSOR_LEFT_BUTTON:
|
||||
case wxCURSOR_MIDDLE_BUTTON:
|
||||
case wxCURSOR_RIGHT_BUTTON:
|
||||
case wxCURSOR_BULLSEYE:
|
||||
@@ -154,7 +154,7 @@ void wxCursor::InitFromStock( wxStockCursor cursorId )
|
||||
void wxCursor::InitFromImage( const wxImage & image )
|
||||
{
|
||||
AllocExclusive();
|
||||
GetHandle() = QCursor(*wxBitmap(image).GetHandle(),
|
||||
GetHandle() = QCursor(*wxBitmap(image).GetHandle(),
|
||||
image.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X) ?
|
||||
image.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X) : -1,
|
||||
image.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y) ?
|
||||
|
||||
@@ -190,7 +190,7 @@ wxBitmapDataObject::wxBitmapDataObject( const wxBitmap &WXUNUSED(bitmap) )
|
||||
wxFileDataObject::wxFileDataObject()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void wxFileDataObject::AddFile( const wxString &WXUNUSED(filename) )
|
||||
{
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
|
||||
if (style & wxFD_SAVE)
|
||||
setAcceptMode(AcceptSave);
|
||||
|
||||
|
||||
if (style & wxFD_CHANGE_DIR)
|
||||
connect(this, &QDialog::accepted, this, &wxQtFileDialog::changeDirectory);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ bool wxGetNativeFontEncoding(wxFontEncoding WXUNUSED(encoding),
|
||||
wxNativeEncodingInfo *info)
|
||||
{
|
||||
*info = wxNativeEncodingInfo();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ unsigned wxListBox::GetCount() const
|
||||
}
|
||||
|
||||
wxString wxListBox::GetString(unsigned int n) const
|
||||
{
|
||||
{
|
||||
QListWidgetItem* item = m_qtListWidget->item(n);
|
||||
wxCHECK_MSG(item != NULL, wxString(), wxT("wrong listbox index") );
|
||||
return wxQtConvertString( item->text() );
|
||||
|
||||
@@ -755,7 +755,7 @@ bool wxListCtrl::EnsureVisible(long item)
|
||||
}
|
||||
|
||||
long wxListCtrl::FindItem(long start, const wxString& str, bool partial)
|
||||
{
|
||||
{
|
||||
int ret;
|
||||
QList <QTreeWidgetItem *> qitems = m_qtTreeWidget->findItems(
|
||||
wxQtConvertString(str),
|
||||
|
||||
@@ -211,7 +211,7 @@ bool wxMenuBar::Append( wxMenu *menu, const wxString& title )
|
||||
|
||||
QMenu *qtMenu = SetTitle( menu, title );
|
||||
m_qtMenuBar->addMenu( qtMenu );
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ wxQtAction::wxQtAction( wxMenu *parent, int id, const wxString &text, const wxSt
|
||||
|
||||
connect( this, &QAction::triggered, this, &wxQtAction::onActionTriggered );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxQtAction::onActionTriggered( bool checked )
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
class wxQtMessageDialog : public wxQtEventSignalHandler< QMessageBox, wxMessageDialog >
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
wxQtMessageDialog( wxWindow *parent, wxMessageDialog *handler );
|
||||
};
|
||||
@@ -35,7 +35,7 @@ wxMessageDialog::wxMessageDialog( wxWindow *parent, const wxString& message,
|
||||
Move( pos );
|
||||
dlg->setText( wxQtConvertString( message ) );
|
||||
dlg->setWindowTitle( wxQtConvertString( caption ) );
|
||||
|
||||
|
||||
// Apply the style
|
||||
SetWindowStyleFlag( style );
|
||||
|
||||
@@ -89,7 +89,7 @@ wxMessageDialog::wxMessageDialog( wxWindow *parent, const wxString& message,
|
||||
numIcons++;
|
||||
dlg->setIcon( QMessageBox::Question );
|
||||
}
|
||||
|
||||
|
||||
if ( style & wxICON_INFORMATION )
|
||||
{
|
||||
numIcons++;
|
||||
@@ -118,7 +118,7 @@ int wxMessageDialog::ShowModal()
|
||||
{
|
||||
WX_HOOK_MODAL_DIALOG();
|
||||
wxCHECK_MSG( m_qtWindow, -1, "Invalid dialog" );
|
||||
|
||||
|
||||
// Exec may return a wx identifier if a close event is generated
|
||||
int ret = static_cast<QDialog*>(m_qtWindow)->exec();
|
||||
switch ( ret )
|
||||
@@ -134,7 +134,7 @@ int wxMessageDialog::ShowModal()
|
||||
default:
|
||||
//wxFAIL_MSG( "unexpected QMessageBox return code" );
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wxMessageDialog::~wxMessageDialog()
|
||||
|
||||
@@ -37,7 +37,7 @@ static Qt::PenStyle ConvertPenStyle(wxPenStyle style)
|
||||
|
||||
case wxPENSTYLE_USER_DASH:
|
||||
return Qt::CustomDashLine;
|
||||
|
||||
|
||||
case wxPENSTYLE_STIPPLE:
|
||||
wxMISSING_IMPLEMENTATION( "wxPENSTYLE_STIPPLE" );
|
||||
break;
|
||||
@@ -212,24 +212,24 @@ class wxPenRefData: public wxGDIRefData
|
||||
m_dashes = NULL;
|
||||
m_dashesSize = 0;
|
||||
}
|
||||
|
||||
|
||||
wxPenRefData()
|
||||
{
|
||||
defaultPen();
|
||||
}
|
||||
|
||||
|
||||
wxPenRefData( const wxPenRefData& data )
|
||||
: wxGDIRefData()
|
||||
{
|
||||
m_qtPen = data.m_qtPen;
|
||||
defaultPen();
|
||||
}
|
||||
|
||||
|
||||
bool operator == (const wxPenRefData& data) const
|
||||
{
|
||||
return m_qtPen == data.m_qtPen;
|
||||
}
|
||||
|
||||
|
||||
QPen m_qtPen;
|
||||
const wxDash *m_dashes;
|
||||
int m_dashesSize;
|
||||
@@ -264,9 +264,9 @@ wxPen::wxPen(const wxColour& col, int width, int style)
|
||||
bool wxPen::operator==(const wxPen& pen) const
|
||||
{
|
||||
if (m_refData == pen.m_refData) return true;
|
||||
|
||||
|
||||
if (!m_refData || !pen.m_refData) return false;
|
||||
|
||||
|
||||
return ( *(wxPenRefData*)m_refData == *(wxPenRefData*)pen.m_refData );
|
||||
}
|
||||
|
||||
@@ -309,14 +309,14 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *dash)
|
||||
AllocExclusive();
|
||||
((wxPenRefData *)m_refData)->m_dashes = dash;
|
||||
((wxPenRefData *)m_refData)->m_dashesSize = nb_dashes;
|
||||
|
||||
|
||||
QVector<qreal> dashes;
|
||||
if (dash)
|
||||
{
|
||||
for (int i = 0; i < nb_dashes; i++)
|
||||
dashes << dash[i];
|
||||
}
|
||||
|
||||
|
||||
M_PENDATA.setDashPattern(dashes);
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ wxRegion::wxRegion(const wxBitmap& bmp, const wxColour& transp, int tolerance)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_refData = new wxRegionRefData(QBitmap::fromData(bmp.GetHandle()->size(), raw.get()));
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ bool wxRegion::IsEmpty() const
|
||||
return true;
|
||||
|
||||
wxCHECK_MSG(IsOk(), true, "Invalid region" );
|
||||
|
||||
|
||||
return M_REGIONDATA.isEmpty();
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ bool wxRegion::DoIsEqual(const wxRegion& region) const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), false, "Invalid region" );
|
||||
wxCHECK_MSG( region.IsOk(), false, "Invalid parameter region" );
|
||||
|
||||
|
||||
return M_REGIONDATA == region.GetHandle();
|
||||
}
|
||||
|
||||
@@ -194,21 +194,21 @@ bool wxRegion::DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const
|
||||
y = bounding.y();
|
||||
w = bounding.width();
|
||||
h = bounding.height();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
wxRegionContain wxRegion::DoContainsPoint(wxCoord x, wxCoord y) const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), wxOutRegion, "Invalid region" );
|
||||
|
||||
|
||||
return M_REGIONDATA.contains( QPoint( x, y ) ) ? wxInRegion : wxOutRegion;
|
||||
}
|
||||
|
||||
wxRegionContain wxRegion::DoContainsRect(const wxRect& rect) const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), wxOutRegion, "Invalid region" );
|
||||
|
||||
|
||||
return M_REGIONDATA.contains( wxQtConvertRect( rect ) ) ? wxInRegion : wxOutRegion;
|
||||
}
|
||||
|
||||
@@ -352,9 +352,9 @@ wxRegionIterator::~wxRegionIterator()
|
||||
wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri)
|
||||
{
|
||||
delete m_qtRects;
|
||||
|
||||
|
||||
m_qtRects = new QVector< QRect >( *ri.m_qtRects );
|
||||
m_pos = ri.m_pos;
|
||||
m_pos = ri.m_pos;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ void wxRegionIterator::Reset(const wxRegion& region)
|
||||
bool wxRegionIterator::HaveRects() const
|
||||
{
|
||||
wxCHECK_MSG( m_qtRects != NULL, false, "Invalid iterator" );
|
||||
|
||||
|
||||
return m_pos < m_qtRects->size();
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ wxCoord wxRegionIterator::GetX() const
|
||||
{
|
||||
wxCHECK_MSG( m_qtRects != NULL, 0, "Invalid iterator" );
|
||||
wxCHECK_MSG( m_pos < m_qtRects->size(), 0, "Invalid position" );
|
||||
|
||||
|
||||
return m_qtRects->at( m_pos ).x();
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ wxCoord wxRegionIterator::GetY() const
|
||||
{
|
||||
wxCHECK_MSG( m_qtRects != NULL, 0, "Invalid iterator" );
|
||||
wxCHECK_MSG( m_pos < m_qtRects->size(), 0, "Invalid position" );
|
||||
|
||||
|
||||
return m_qtRects->at( m_pos ).y();
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ wxCoord wxRegionIterator::GetWidth() const
|
||||
{
|
||||
wxCHECK_MSG( m_qtRects != NULL, 0, "Invalid iterator" );
|
||||
wxCHECK_MSG( m_pos < m_qtRects->size(), 0, "Invalid position" );
|
||||
|
||||
|
||||
return m_qtRects->at( m_pos ).width();
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ wxCoord wxRegionIterator::GetHeight() const
|
||||
{
|
||||
wxCHECK_MSG( m_qtRects != NULL, 0, "Invalid iterator" );
|
||||
wxCHECK_MSG( m_pos < m_qtRects->size(), 0, "Invalid position" );
|
||||
|
||||
|
||||
return m_qtRects->at( m_pos ).height();
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ wxRect wxRegionIterator::GetRect() const
|
||||
{
|
||||
wxCHECK_MSG( m_qtRects != NULL, wxRect(), "Invalid iterator" );
|
||||
wxCHECK_MSG( m_pos < m_qtRects->size(), wxRect(), "Invalid position" );
|
||||
|
||||
|
||||
return wxQtConvertRect( m_qtRects->at( m_pos ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
class wxQtScrollBar : public wxQtEventSignalHandler< QScrollBar, wxScrollBar >
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
wxQtScrollBar( wxWindow *parent, wxScrollBar *handler );
|
||||
|
||||
|
||||
private:
|
||||
void actionTriggered( int action );
|
||||
void sliderReleased();
|
||||
@@ -160,7 +160,7 @@ void wxQtScrollBar::actionTriggered( int action )
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
wxScrollBar *handler = GetHandler();
|
||||
if ( handler )
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@ template class wxSpinCtrlQt< int, QSpinBox >;
|
||||
|
||||
wxSpinCtrl::wxSpinCtrl()
|
||||
{
|
||||
Init();
|
||||
Init();
|
||||
}
|
||||
|
||||
wxSpinCtrl::wxSpinCtrl(wxWindow *parent, wxWindowID id, const wxString& value,
|
||||
|
||||
@@ -67,7 +67,7 @@ bool wxStatusBar::GetFieldRect(int i, wxRect& rect) const
|
||||
|
||||
if ( static_cast<size_t>(m_qtPanes->count()) != m_panes.GetCount() )
|
||||
const_cast<wxStatusBar*>(this)->UpdateFields();
|
||||
|
||||
|
||||
rect = wxQtConvertRect((*m_qtPanes)[i]->geometry());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ bool wxQtTimerImpl::Start( int millisecs, bool oneShot )
|
||||
return false;
|
||||
|
||||
m_timerId = startTimer( GetInterval() );
|
||||
|
||||
|
||||
return m_timerId >= 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ wxString wxTopLevelWindowQt::GetTitle() const
|
||||
void wxTopLevelWindowQt::SetIcons( const wxIconBundle& icons )
|
||||
{
|
||||
wxTopLevelWindowBase::SetIcons( icons );
|
||||
|
||||
|
||||
QIcon qtIcons;
|
||||
for ( size_t i = 0; i < icons.GetIconCount(); i++ )
|
||||
{
|
||||
@@ -173,7 +173,7 @@ void wxTopLevelWindowQt::SetWindowStyleFlag( long style )
|
||||
return;
|
||||
|
||||
Qt::WindowFlags qtFlags = GetHandle()->windowFlags();
|
||||
|
||||
|
||||
if ( HasFlag( wxSTAY_ON_TOP ) != qtFlags.testFlag( Qt::WindowStaysOnTopHint ) )
|
||||
qtFlags ^= Qt::WindowStaysOnTopHint;
|
||||
|
||||
@@ -187,12 +187,12 @@ void wxTopLevelWindowQt::SetWindowStyleFlag( long style )
|
||||
qtFlags |= Qt::WindowMinimizeButtonHint;
|
||||
else
|
||||
qtFlags &= ~Qt::WindowMinimizeButtonHint;
|
||||
|
||||
|
||||
if ( HasFlag( wxMAXIMIZE_BOX ) )
|
||||
qtFlags |= Qt::WindowMaximizeButtonHint;
|
||||
else
|
||||
qtFlags &= ~Qt::WindowMaximizeButtonHint;
|
||||
|
||||
|
||||
if ( HasFlag( wxCLOSE_BOX ) )
|
||||
qtFlags |= Qt::WindowCloseButtonHint;
|
||||
else
|
||||
@@ -205,15 +205,15 @@ void wxTopLevelWindowQt::SetWindowStyleFlag( long style )
|
||||
qtFlags &= ~Qt::WindowCloseButtonHint;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GetHandle()->setWindowFlags( qtFlags );
|
||||
|
||||
|
||||
wxCHECK_RET( !( HasFlag( wxMAXIMIZE ) && HasFlag( wxMAXIMIZE ) ), "Window cannot be both maximized and minimized" );
|
||||
if ( HasFlag( wxMAXIMIZE ) )
|
||||
GetHandle()->setWindowState( Qt::WindowMaximized );
|
||||
else if ( HasFlag( wxMINIMIZE ) )
|
||||
GetHandle()->setWindowState( Qt::WindowMinimized );
|
||||
|
||||
|
||||
if ( HasFlag( wxRESIZE_BORDER ) )
|
||||
GetHandle()->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
|
||||
else
|
||||
|
||||
@@ -85,7 +85,7 @@ wxWindow *wxFindWindowAtPoint(const wxPoint& pt)
|
||||
wxWindow *wxFindWindowAtPointer(wxPoint& pt)
|
||||
{
|
||||
pt = wxQtConvertPoint( QCursor::pos() );
|
||||
|
||||
|
||||
return wxFindWindowAtPoint( pt );
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ wxWindow *wxGetActiveWindow()
|
||||
wxWindow* win = node->GetData();
|
||||
if ( win->GetHandle() == w )
|
||||
return win;
|
||||
|
||||
|
||||
node = node->GetPrevious();
|
||||
}
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ bool wxWindowQt::Create( wxWindowQt * parent, wxWindowID id, const wxPoint & pos
|
||||
m_qtWindow = new wxQtWidget( parent, this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
GetHandle()->setMouseTracking(true);
|
||||
if ( !wxWindowBase::CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||
return false;
|
||||
@@ -519,7 +519,7 @@ bool wxWindowQt::SetCursor( const wxCursor &cursor )
|
||||
return false;
|
||||
|
||||
GetHandle()->setCursor(cursor.GetHandle());
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user