2014-12-07 01:34:49 +01:00
|
|
|
From: Jan Engelhardt <jengelh@inai.de>
|
|
|
|
Date: 2014-12-05 19:29:16.174123839 +0100
|
|
|
|
|
|
|
|
build: fix compile errors/warnings
|
|
|
|
|
|
|
|
./src/qt/accel.cpp: In member function 'QList<QShortcut*>
|
|
|
|
wxAcceleratorTable::ConvertShortcutTable(QWidget*) const':
|
|
|
|
./src/qt/accel.cpp:88:11: error: 'Node' is not a member of
|
|
|
|
'wxAccelList'
|
|
|
|
|
2015-03-27 17:59:01 +01:00
|
|
|
Change code to use full PIMPL so that wx headers do not depend on Qt at all
|
|
|
|
(this is the declared goal of wx).
|
2014-12-07 01:34:49 +01:00
|
|
|
---
|
2014-12-17 19:06:13 +01:00
|
|
|
include/wx/qt/accel.h | 3 --
|
|
|
|
include/wx/qt/app.h | 2 -
|
2015-03-29 23:00:28 +02:00
|
|
|
include/wx/qt/colour.h | 30 ++++++++++-------------
|
2015-03-29 16:31:15 +02:00
|
|
|
include/wx/qt/window.h | 1
|
2014-12-17 19:06:13 +01:00
|
|
|
src/qt/accel.cpp | 2 -
|
2015-03-29 16:31:15 +02:00
|
|
|
src/qt/app.cpp | 1
|
2014-12-17 19:06:13 +01:00
|
|
|
src/qt/bitmap.cpp | 2 -
|
2015-03-29 23:00:28 +02:00
|
|
|
src/qt/brush.cpp | 6 ++--
|
|
|
|
src/qt/calctrl.cpp | 14 +++++-----
|
2014-12-17 19:06:13 +01:00
|
|
|
src/qt/colordlg.cpp | 4 +--
|
2015-03-29 23:00:28 +02:00
|
|
|
src/qt/colour.cpp | 59 ++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
src/qt/dc.cpp | 16 ++++++------
|
2015-03-29 16:31:15 +02:00
|
|
|
src/qt/evtloop.cpp | 1
|
2014-12-17 19:06:13 +01:00
|
|
|
src/qt/listctrl.cpp | 4 +--
|
2015-03-29 23:00:28 +02:00
|
|
|
src/qt/pen.cpp | 6 ++--
|
|
|
|
19 files changed, 109 insertions(+), 48 deletions(-)
|
2014-12-07 01:34:49 +01:00
|
|
|
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/include/wx/qt/accel.h
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/include/wx/qt/accel.h
|
|
|
|
+++ wxWidgets/include/wx/qt/accel.h
|
|
|
|
@@ -9,8 +9,7 @@
|
2014-12-17 19:06:13 +01:00
|
|
|
#ifndef _WX_QT_ACCEL_H_
|
|
|
|
#define _WX_QT_ACCEL_H_
|
|
|
|
|
|
|
|
-#include <QtCore/QList>
|
|
|
|
-#include <QtWidgets/QShortcut>
|
2015-03-29 16:31:15 +02:00
|
|
|
+#include <QShortcut>
|
|
|
|
|
2014-12-17 19:06:13 +01:00
|
|
|
/* wxQt accelerators implementation:
|
|
|
|
*
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/include/wx/qt/app.h
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/include/wx/qt/app.h
|
|
|
|
+++ wxWidgets/include/wx/qt/app.h
|
2014-12-17 19:06:13 +01:00
|
|
|
@@ -9,8 +9,6 @@
|
|
|
|
#ifndef _WX_QT_APP_H_
|
|
|
|
#define _WX_QT_APP_H_
|
|
|
|
|
|
|
|
-#include <QtWidgets/QApplication>
|
|
|
|
-
|
|
|
|
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
|
|
|
|
{
|
|
|
|
public:
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/include/wx/qt/colour.h
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/include/wx/qt/colour.h
|
|
|
|
+++ wxWidgets/include/wx/qt/colour.h
|
2015-03-29 23:00:28 +02:00
|
|
|
@@ -10,37 +10,35 @@
|
2014-12-17 19:06:13 +01:00
|
|
|
#ifndef _WX_QT_COLOUR_H_
|
|
|
|
#define _WX_QT_COLOUR_H_
|
|
|
|
|
|
|
|
-#include <QtGui/QColor>
|
|
|
|
+class QColor;
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxColour : public wxColourBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
|
|
|
|
- wxColour(const QColor& color) : m_qtColor(color) {}
|
|
|
|
+ wxColour(const QColor &);
|
|
|
|
|
|
|
|
- virtual bool IsOk() const { return m_qtColor.isValid(); }
|
2015-03-29 23:00:28 +02:00
|
|
|
+ void Init(void);
|
2014-12-17 19:06:13 +01:00
|
|
|
+ virtual bool IsOk(void) const;
|
|
|
|
|
2015-03-27 17:59:01 +01:00
|
|
|
- unsigned char Red() const { return m_qtColor.red(); }
|
|
|
|
- unsigned char Green() const { return m_qtColor.green(); }
|
|
|
|
- unsigned char Blue() const { return m_qtColor.blue(); }
|
|
|
|
- unsigned char Alpha() const { return m_qtColor.alpha(); }
|
2014-12-17 19:06:13 +01:00
|
|
|
-
|
|
|
|
- bool operator==(const wxColour& color) const
|
|
|
|
- { return m_qtColor == color.m_qtColor; }
|
|
|
|
- bool operator!=(const wxColour& color) const
|
|
|
|
- { return m_qtColor != color.m_qtColor; }
|
2015-03-27 17:59:01 +01:00
|
|
|
+ unsigned char Red(void) const;
|
|
|
|
+ unsigned char Green(void) const;
|
|
|
|
+ unsigned char Blue(void) const;
|
|
|
|
+ unsigned char Alpha(void) const;
|
2014-12-17 19:06:13 +01:00
|
|
|
+
|
|
|
|
+ bool operator==(const wxColour &) const;
|
|
|
|
+ bool operator!=(const wxColour &) const;
|
|
|
|
|
|
|
|
int GetPixel() const;
|
|
|
|
|
|
|
|
- QColor GetHandle() const { return m_qtColor; };
|
|
|
|
+ QColor *GetHandle(void) const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void
|
|
|
|
- InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)
|
|
|
|
- { m_qtColor.setRgb(r, g, b, a); }
|
|
|
|
+ InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a);
|
|
|
|
|
|
|
|
private:
|
|
|
|
- QColor m_qtColor;
|
|
|
|
+ QColor *m_qtColor;
|
|
|
|
|
2017-11-28 10:57:09 +01:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxColour);
|
2014-12-17 19:06:13 +01:00
|
|
|
};
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/include/wx/qt/window.h
|
|
|
|
===================================================================
|
|
|
|
--- wxWidgets.orig/include/wx/qt/window.h
|
|
|
|
+++ wxWidgets/include/wx/qt/window.h
|
|
|
|
@@ -11,6 +11,7 @@
|
|
|
|
|
|
|
|
#include <QtWidgets/QWidget>
|
|
|
|
#include <QtWidgets/QScrollArea>
|
|
|
|
+#include <QShortcut>
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxScrollBar;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxQtShortcutHandler;
|
|
|
|
Index: wxWidgets/src/qt/accel.cpp
|
2014-12-07 01:34:49 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/src/qt/accel.cpp
|
|
|
|
+++ wxWidgets/src/qt/accel.cpp
|
2014-12-07 01:34:49 +01:00
|
|
|
@@ -85,7 +85,7 @@ QList< QShortcut* > wxAcceleratorTable::
|
|
|
|
{
|
|
|
|
QList< QShortcut* > qtList;
|
|
|
|
|
|
|
|
- for ( wxAccelList::Node *node = M_ACCELDATA->m_accels.GetFirst(); node; node = node->GetNext() )
|
|
|
|
+ for ( wxAccelList::compatibility_iterator node = M_ACCELDATA->m_accels.GetFirst(); node; node = node->GetNext() )
|
|
|
|
{
|
|
|
|
qtList << ConvertAccelerator( node->GetData(), parent );
|
|
|
|
}
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/src/qt/app.cpp
|
|
|
|
===================================================================
|
|
|
|
--- wxWidgets.orig/src/qt/app.cpp
|
|
|
|
+++ wxWidgets/src/qt/app.cpp
|
|
|
|
@@ -13,6 +13,7 @@
|
|
|
|
#include "wx/qt/private/utils.h"
|
|
|
|
#include "wx/qt/private/converter.h"
|
|
|
|
#include <QtCore/QStringList>
|
|
|
|
+#include <QApplication>
|
|
|
|
|
2017-11-28 10:57:09 +01:00
|
|
|
wxIMPLEMENT_DYNAMIC_CLASS(wxApp, wxAppBase);
|
2015-03-29 16:31:15 +02:00
|
|
|
|
|
|
|
Index: wxWidgets/src/qt/bitmap.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/src/qt/bitmap.cpp
|
|
|
|
+++ wxWidgets/src/qt/bitmap.cpp
|
2017-11-28 10:57:09 +01:00
|
|
|
@@ -514,7 +514,7 @@ bool wxMask::Create(const wxBitmap& bitm
|
2014-12-17 19:06:13 +01:00
|
|
|
if (m_qtBitmap)
|
|
|
|
delete m_qtBitmap;
|
|
|
|
|
|
|
|
- m_qtBitmap = new QBitmap(bitmap.GetHandle()->createMaskFromColor(colour.GetHandle()));
|
|
|
|
+ m_qtBitmap = new QBitmap(bitmap.GetHandle()->createMaskFromColor(*colour.GetHandle()));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/src/qt/brush.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/src/qt/brush.cpp
|
|
|
|
+++ wxWidgets/src/qt/brush.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
@@ -95,7 +95,7 @@ wxBrush::wxBrush()
|
|
|
|
wxBrush::wxBrush(const wxColour& col, wxBrushStyle style )
|
|
|
|
{
|
|
|
|
m_refData = new wxBrushRefData();
|
|
|
|
- M_BRUSHDATA.setColor(col.GetHandle());
|
|
|
|
+ M_BRUSHDATA.setColor(*col.GetHandle());
|
|
|
|
M_BRUSHDATA.setStyle(ConvertBrushStyle(style));
|
|
|
|
M_STYLEDATA = style;
|
|
|
|
}
|
|
|
|
@@ -103,7 +103,7 @@ wxBrush::wxBrush(const wxColour& col, wx
|
|
|
|
wxBrush::wxBrush(const wxColour& col, int style)
|
|
|
|
{
|
|
|
|
m_refData = new wxBrushRefData();
|
|
|
|
- M_BRUSHDATA.setColor(col.GetHandle());
|
|
|
|
+ M_BRUSHDATA.setColor(*col.GetHandle());
|
|
|
|
M_BRUSHDATA.setStyle(ConvertBrushStyle((wxBrushStyle)style));
|
|
|
|
M_STYLEDATA = (wxBrushStyle)style;
|
|
|
|
}
|
|
|
|
@@ -122,7 +122,7 @@ wxBrush::wxBrush(const wxBitmap& stipple
|
|
|
|
void wxBrush::SetColour(const wxColour& col)
|
|
|
|
{
|
|
|
|
AllocExclusive();
|
|
|
|
- M_BRUSHDATA.setColor(col.GetHandle());
|
|
|
|
+ M_BRUSHDATA.setColor(*col.GetHandle());
|
|
|
|
}
|
|
|
|
|
|
|
|
void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/src/qt/calctrl.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/src/qt/calctrl.cpp
|
|
|
|
+++ wxWidgets/src/qt/calctrl.cpp
|
2015-03-27 17:59:01 +01:00
|
|
|
@@ -229,7 +229,7 @@ void wxCalendarCtrl::SetHoliday(size_t d
|
2014-12-17 19:06:13 +01:00
|
|
|
date.setDate(date.year(), date.month(), day);
|
|
|
|
|
|
|
|
QTextCharFormat format = m_qtCalendar->dateTextFormat(date);
|
|
|
|
- format.setForeground(m_colHolidayFg.GetHandle());
|
|
|
|
+ format.setForeground(*m_colHolidayFg.GetHandle());
|
|
|
|
m_qtCalendar->setDateTextFormat(date, format);
|
|
|
|
}
|
|
|
|
|
2015-03-27 17:59:01 +01:00
|
|
|
@@ -249,9 +249,9 @@ void wxCalendarCtrl::RefreshHolidays()
|
2014-12-17 19:06:13 +01:00
|
|
|
if ( m_windowStyle & wxCAL_SHOW_HOLIDAYS )
|
|
|
|
{
|
|
|
|
if ( m_colHolidayFg.IsOk() )
|
|
|
|
- format.setForeground(m_colHolidayFg.GetHandle());
|
|
|
|
+ format.setForeground(*m_colHolidayFg.GetHandle());
|
|
|
|
if ( m_colHolidayBg.IsOk() )
|
|
|
|
- format.setBackground(m_colHolidayBg.GetHandle());
|
|
|
|
+ format.setBackground(*m_colHolidayBg.GetHandle());
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-03-27 17:59:01 +01:00
|
|
|
@@ -278,9 +278,9 @@ void wxCalendarCtrl::SetHeaderColours(co
|
2014-12-17 19:06:13 +01:00
|
|
|
|
|
|
|
QTextCharFormat format = m_qtCalendar->headerTextFormat();
|
|
|
|
if ( m_colHeaderFg.IsOk() )
|
|
|
|
- format.setForeground(m_colHeaderFg.GetHandle());
|
|
|
|
+ format.setForeground(*m_colHeaderFg.GetHandle());
|
|
|
|
if ( m_colHeaderBg.IsOk() )
|
|
|
|
- format.setBackground(m_colHeaderBg.GetHandle());
|
|
|
|
+ format.setBackground(*m_colHeaderBg.GetHandle());
|
|
|
|
m_qtCalendar->setHeaderTextFormat(format);
|
|
|
|
}
|
|
|
|
|
2015-03-27 17:59:01 +01:00
|
|
|
@@ -303,9 +303,9 @@ void wxCalendarCtrl::SetAttr(size_t day,
|
2014-12-17 19:06:13 +01:00
|
|
|
|
|
|
|
QTextCharFormat format = m_qtCalendar->dateTextFormat(date);
|
|
|
|
if ( attr->HasTextColour() )
|
|
|
|
- format.setForeground(attr->GetTextColour().GetHandle());
|
|
|
|
+ format.setForeground(*attr->GetTextColour().GetHandle());
|
|
|
|
if ( attr->HasBackgroundColour() )
|
|
|
|
- format.setBackground(attr->GetBackgroundColour().GetHandle());
|
|
|
|
+ format.setBackground(*attr->GetBackgroundColour().GetHandle());
|
|
|
|
|
|
|
|
wxMISSING_IMPLEMENTATION( "Setting font" );
|
|
|
|
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/src/qt/colordlg.cpp
|
|
|
|
===================================================================
|
|
|
|
--- wxWidgets.orig/src/qt/colordlg.cpp
|
|
|
|
+++ wxWidgets/src/qt/colordlg.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
@@ -29,10 +29,10 @@ bool wxColourDialog::Create(wxWindow *pa
|
|
|
|
if ( m_data.GetChooseFull() )
|
|
|
|
{
|
|
|
|
for (int i=0; i<wxColourData::NUM_CUSTOM; i++)
|
|
|
|
- QColorDialog::setCustomColor(i, m_data.GetCustomColour(i).GetHandle());
|
|
|
|
+ QColorDialog::setCustomColor(i, *m_data.GetCustomColour(i).GetHandle());
|
|
|
|
}
|
|
|
|
|
|
|
|
- GetHandle()->setCurrentColor(m_data.GetColour().GetHandle());
|
|
|
|
+ GetHandle()->setCurrentColor(*m_data.GetColour().GetHandle());
|
|
|
|
|
|
|
|
return wxTopLevelWindow::Create( parent, wxID_ANY, "");
|
|
|
|
}
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/src/qt/colour.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/src/qt/colour.cpp
|
|
|
|
+++ wxWidgets/src/qt/colour.cpp
|
2017-11-28 10:57:09 +01:00
|
|
|
@@ -29,7 +29,63 @@
|
|
|
|
#endif // WX_PRECOMP
|
|
|
|
|
2014-12-17 19:06:13 +01:00
|
|
|
#include "wx/qt/private/utils.h"
|
|
|
|
+#include "wx/colour.h"
|
|
|
|
|
|
|
|
+wxColour::wxColour(const QColor &color) :
|
|
|
|
+ m_qtColor(new QColor(color))
|
|
|
|
+{
|
|
|
|
+}
|
|
|
|
+
|
2015-03-29 23:00:28 +02:00
|
|
|
+void wxColour::Init(void)
|
|
|
|
+{
|
|
|
|
+ m_qtColor = new QColor();
|
|
|
|
+}
|
|
|
|
+
|
2014-12-17 19:06:13 +01:00
|
|
|
+bool wxColour::IsOk(void) const
|
|
|
|
+{
|
|
|
|
+ return m_qtColor->isValid();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+unsigned char wxColour::Red(void) const
|
|
|
|
+{
|
|
|
|
+ return m_qtColor->red();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+unsigned char wxColour::Green(void) const
|
|
|
|
+{
|
|
|
|
+ return m_qtColor->green();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+unsigned char wxColour::Blue(void) const
|
|
|
|
+{
|
|
|
|
+ return m_qtColor->blue();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+unsigned char wxColour::Alpha(void) const
|
|
|
|
+{
|
|
|
|
+ return m_qtColor->alpha();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool wxColour::operator==(const wxColour &color) const
|
|
|
|
+{
|
|
|
|
+ return *m_qtColor == *color.m_qtColor;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool wxColour::operator!=(const wxColour &color) const
|
|
|
|
+{
|
|
|
|
+ return *m_qtColor != *color.m_qtColor;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+QColor *wxColour::GetHandle(void) const
|
|
|
|
+{
|
|
|
|
+ return m_qtColor;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void wxColour::InitRGBA(unsigned char r, unsigned char g, unsigned char b,
|
|
|
|
+ unsigned char a)
|
|
|
|
+{
|
|
|
|
+ m_qtColor->setRgb(r, g, b, a);
|
|
|
|
+}
|
2017-11-28 10:57:09 +01:00
|
|
|
|
2014-12-17 19:06:13 +01:00
|
|
|
int wxColour::GetPixel() const
|
|
|
|
{
|
|
|
|
wxMISSING_IMPLEMENTATION( "wxColour::GetPixel" );
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/src/qt/dc.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/src/qt/dc.cpp
|
|
|
|
+++ wxWidgets/src/qt/dc.cpp
|
|
|
|
@@ -142,7 +142,7 @@ void wxQtDCImpl::SetBrush(const wxBrush&
|
2014-12-17 19:06:13 +01:00
|
|
|
{
|
|
|
|
// Use a monochrome mask: use foreground color for the mask
|
|
|
|
QBrush b(brush.GetHandle());
|
|
|
|
- b.setColor(m_textForegroundColour.GetHandle());
|
|
|
|
+ b.setColor(*m_textForegroundColour.GetHandle());
|
|
|
|
b.setTexture(b.texture().mask());
|
|
|
|
m_qtPainter->setBrush(b);
|
|
|
|
}
|
2015-03-29 16:31:15 +02:00
|
|
|
@@ -572,7 +572,7 @@ void wxQtDCImpl::DoDrawEllipse(wxCoord x
|
2014-12-17 19:06:13 +01:00
|
|
|
// Save pen/brush
|
|
|
|
savedBrush = m_qtPainter->brush();
|
|
|
|
// Fill with text background color ("no fill" like in wxGTK):
|
|
|
|
- m_qtPainter->setBrush(QBrush(m_textBackgroundColour.GetHandle()));
|
|
|
|
+ m_qtPainter->setBrush(QBrush(*m_textBackgroundColour.GetHandle()));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Draw
|
2015-03-29 16:31:15 +02:00
|
|
|
@@ -617,8 +617,8 @@ void wxQtDCImpl::DoDrawBitmap(const wxBi
|
2014-12-17 19:06:13 +01:00
|
|
|
QPen savedPen = m_qtPainter->pen();
|
|
|
|
|
|
|
|
//Use text colors
|
|
|
|
- m_qtPainter->setBackground(QBrush(m_textBackgroundColour.GetHandle()));
|
|
|
|
- m_qtPainter->setPen(QPen(m_textForegroundColour.GetHandle()));
|
|
|
|
+ m_qtPainter->setBackground(QBrush(*m_textBackgroundColour.GetHandle()));
|
|
|
|
+ m_qtPainter->setPen(QPen(*m_textForegroundColour.GetHandle()));
|
|
|
|
|
|
|
|
//Draw
|
|
|
|
m_qtPainter->drawPixmap(x, y, pix);
|
2015-03-29 16:31:15 +02:00
|
|
|
@@ -648,7 +648,7 @@ void wxQtDCImpl::DoDrawBitmap(const wxBi
|
2014-12-17 19:06:13 +01:00
|
|
|
void wxQtDCImpl::DoDrawText(const wxString& text, wxCoord x, wxCoord y)
|
|
|
|
{
|
|
|
|
QPen savedPen = m_qtPainter->pen();
|
|
|
|
- m_qtPainter->setPen(QPen(m_textForegroundColour.GetHandle()));
|
|
|
|
+ m_qtPainter->setPen(QPen(*m_textForegroundColour.GetHandle()));
|
|
|
|
|
|
|
|
// Disable logical function
|
|
|
|
QPainter::CompositionMode savedOp = m_qtPainter->compositionMode();
|
2015-03-29 16:31:15 +02:00
|
|
|
@@ -662,7 +662,7 @@ void wxQtDCImpl::DoDrawText(const wxStri
|
2014-12-17 19:06:13 +01:00
|
|
|
QBrush savedBrush = m_qtPainter->background();
|
|
|
|
|
|
|
|
//Use text colors
|
|
|
|
- m_qtPainter->setBackground(QBrush(m_textBackgroundColour.GetHandle()));
|
|
|
|
+ m_qtPainter->setBackground(QBrush(*m_textBackgroundColour.GetHandle()));
|
|
|
|
|
|
|
|
//Draw
|
|
|
|
m_qtPainter->drawText(x, y, 1, 1, Qt::TextDontClip, wxQtConvertString(text));
|
2015-03-29 16:31:15 +02:00
|
|
|
@@ -691,7 +691,7 @@ void wxQtDCImpl::DoDrawRotatedText(const
|
2014-12-17 19:06:13 +01:00
|
|
|
m_qtPainter->rotate(-angle);
|
|
|
|
|
|
|
|
QPen savedPen = m_qtPainter->pen();
|
|
|
|
- m_qtPainter->setPen(QPen(m_textForegroundColour.GetHandle()));
|
|
|
|
+ m_qtPainter->setPen(QPen(*m_textForegroundColour.GetHandle()));
|
|
|
|
|
|
|
|
// Disable logical function
|
|
|
|
QPainter::CompositionMode savedOp = m_qtPainter->compositionMode();
|
2015-03-29 16:31:15 +02:00
|
|
|
@@ -705,7 +705,7 @@ void wxQtDCImpl::DoDrawRotatedText(const
|
2014-12-17 19:06:13 +01:00
|
|
|
QBrush savedBrush = m_qtPainter->background();
|
|
|
|
|
|
|
|
//Use text colors
|
|
|
|
- m_qtPainter->setBackground(QBrush(m_textBackgroundColour.GetHandle()));
|
|
|
|
+ m_qtPainter->setBackground(QBrush(*m_textBackgroundColour.GetHandle()));
|
|
|
|
|
|
|
|
//Draw
|
|
|
|
m_qtPainter->drawText(x, y, 1, 1, Qt::TextDontClip, wxQtConvertString(text));
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/src/qt/evtloop.cpp
|
|
|
|
===================================================================
|
|
|
|
--- wxWidgets.orig/src/qt/evtloop.cpp
|
|
|
|
+++ wxWidgets/src/qt/evtloop.cpp
|
|
|
|
@@ -16,6 +16,7 @@
|
|
|
|
#include <QtCore/QCoreApplication>
|
|
|
|
#include <QtCore/QAbstractEventDispatcher>
|
|
|
|
#include <QtCore/QSocketNotifier>
|
|
|
|
+#include <QApplication>
|
|
|
|
|
|
|
|
wxQtIdleTimer::wxQtIdleTimer( wxQtEventLoopBase *eventLoop )
|
|
|
|
{
|
|
|
|
Index: wxWidgets/src/qt/listctrl.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/src/qt/listctrl.cpp
|
|
|
|
+++ wxWidgets/src/qt/listctrl.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
@@ -336,9 +336,9 @@ bool wxListCtrl::SetItem(wxListItem& inf
|
|
|
|
if ( info.GetFont().IsOk() )
|
|
|
|
qitem->setFont(col, info.GetFont().GetHandle() );
|
|
|
|
if ( info.GetTextColour().IsOk() )
|
|
|
|
- qitem->setTextColor(col, info.GetTextColour().GetHandle());
|
|
|
|
+ qitem->setTextColor(col, *info.GetTextColour().GetHandle());
|
|
|
|
if ( info.GetBackgroundColour().IsOk() )
|
|
|
|
- qitem->setBackgroundColor(col, info.GetBackgroundColour().GetHandle());
|
|
|
|
+ qitem->setBackgroundColor(col, *info.GetBackgroundColour().GetHandle());
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2015-03-29 16:31:15 +02:00
|
|
|
Index: wxWidgets/src/qt/pen.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
===================================================================
|
2015-03-29 16:31:15 +02:00
|
|
|
--- wxWidgets.orig/src/qt/pen.cpp
|
|
|
|
+++ wxWidgets/src/qt/pen.cpp
|
2014-12-17 19:06:13 +01:00
|
|
|
@@ -247,7 +247,7 @@ wxPen::wxPen( const wxColour &colour, in
|
|
|
|
m_refData = new wxPenRefData();
|
|
|
|
M_PENDATA.setWidth(width);
|
|
|
|
M_PENDATA.setStyle(ConvertPenStyle(style));
|
|
|
|
- M_PENDATA.setColor(colour.GetHandle());
|
|
|
|
+ M_PENDATA.setColor(*colour.GetHandle());
|
|
|
|
}
|
|
|
|
|
|
|
|
wxPen::wxPen(const wxColour& col, int width, int style)
|
|
|
|
@@ -255,7 +255,7 @@ wxPen::wxPen(const wxColour& col, int wi
|
|
|
|
m_refData = new wxPenRefData();
|
|
|
|
M_PENDATA.setWidth(width);
|
|
|
|
M_PENDATA.setStyle(ConvertPenStyle((wxPenStyle)style));
|
|
|
|
- M_PENDATA.setColor(col.GetHandle());
|
|
|
|
+ M_PENDATA.setColor(*col.GetHandle());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -276,7 +276,7 @@ bool wxPen::operator!=(const wxPen& pen)
|
|
|
|
void wxPen::SetColour(const wxColour& col)
|
|
|
|
{
|
|
|
|
AllocExclusive();
|
|
|
|
- M_PENDATA.setColor(col.GetHandle());
|
|
|
|
+ M_PENDATA.setColor(*col.GetHandle());
|
|
|
|
}
|
|
|
|
|
|
|
|
void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
|