Commit Graph

185 Commits

Author SHA1 Message Date
Vadim Zeitlin
5154cc711a Include QRect, QSize and QString from wx/qt/private/converter.h
Similarly to the previous commit, it doesn't seem to be worth it to
avoid including these simple and common headers from there and it
simplifies code and will allow making the converter functions inline.
2019-01-30 18:12:12 +01:00
Vadim Zeitlin
b0d88a306d Include wx/qt/private/converter.h from src/qt/converter.cpp
Follow standard practice and include the header corresponding to the
source file from it explicitly.

Also include wx/gdicmn.h from the header itself, this is a pretty common
header and there is no real advantage in avoiding it there and including
it allows to avoid a bunch of forward declarations.
2019-01-30 18:07:33 +01:00
Vadim Zeitlin
4d16029f8b Merge branch 'notebook-add-page-events'
Harmonize events sent by wxNotebook::AddPage(): they are now sent only
when adding any page except the first one if it is selected in all
ports.

See https://github.com/wxWidgets/wxWidgets/pull/1192
2019-01-30 17:38:51 +01:00
Vadim Zeitlin
8fbca5cb70 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.
2019-01-30 17:35:54 +01:00
Matthew Griffin
ae94f4da9c Ensure that top level window is active when it's shown in wxQt
Under some (not totally clear) circumstances, a TLW can remain inactive
after being shown, which is undesirable, as it prevents setting focus to
its children from working.

Work around this by calling activateWindow() explicitly if necessary.

Closes https://github.com/wxWidgets/wxWidgets/pull/1179
2019-01-30 17:27:15 +01:00
Jay Nabonne
653979936b Clean up the code a bit to follow the guidelines, including handling of default in switches and line length. 2019-01-30 15:59:37 +00:00
Jay Nabonne
df38836862 Fixed some spacing. 2019-01-30 14:36:06 +00:00
Jay Nabonne
6fa65900f9 Implement cursor overriding for DnD on wxQt.
This uses the cursor variant (as opposed to the icon one) since these actually are cursors, the base class looks like cursors are meant to be used, and the icon thing looks like a hack.
2019-01-30 14:22:01 +00:00
Graham Dawes
c3b8b81da5 Remove unused includes from qt/window.h 2019-01-30 09:27:35 +00:00
Jay Nabonne
6ba6d9967a Change Qt wxDropTarget to remember widget and disconnect self when necessary. Clean up naming a bit. 2019-01-29 17:11:09 +00:00
Jay Nabonne
8c63c40953 Clean up wxDropTarget and wxWindow a bit more by moving DnD stuff fully into drop target (besides connecting and disconnecting).
Window doesn't have to know more than how to hook itself up.
Impl now performs function of event filter/adapter.
2019-01-29 16:55:31 +00:00
Jay Nabonne
2bceaaa572 Clean up wxDropTarget (first stage) by moving Qt specific stuff (e.g. QMimeData) into an Impl. 2019-01-29 16:29:58 +00:00
Jay Nabonne
323cbdabdb Implement initial try of wxDropTarget.
The drop target needs to use an event filter to capture drag-and-drop events from the window.
2019-01-29 16:13:41 +00:00
Graham Dawes
3cb395a5a5 Implement wxNotebook::DeleteAllPages() for wxQt
See https://github.com/wxWidgets/wxWidgets/pull/1191
2019-01-28 19:07:28 +01:00
Vadim Zeitlin
665b5a76a8 Remove unnecessary wxNotebook::DoSetSelection() from wxQt
Having this method didn't really help, it's simpler and more
straightforward to implement ChangeSelection() as a signal-blocking
wrapper around SetSelection() instead.

No real changes in behaviour, this is a pure refactoring.
2019-01-28 17:51:27 +01:00
Jay Nabonne
0dc1654ab6 Get simple (text) drag and drop case working with drop source.
We ended up not needing the underlying QMimeData-based implementation, as the classes sitting on top of it
bypassed it anyway. It now treats the hierarchy as a pure data storage mechanism, generating the
QMimeData when drag-drop is initiated.
2019-01-28 15:30:25 +00:00
Jay Nabonne
ea4c7120ff Fixed up and cleaned up Qt variant of wxDataFormat.
Kept "mime type" and "id" conceptually separate in the interface in case they need to diverge later.
Got rid of the odd "wxChar *" variants and the QString one.
Implemented unimplemented "type" functions.
Implemented "!=" in terms of "==", to keep from having two places to keep in sync.
2019-01-28 15:22:01 +00:00
Vadim Zeitlin
c74727c20f Merge branch 'qt_more_event_loop_improvements' of https://github.com/GeoTeric/wxWidgets
Event loop and idle events improvements for wxQt

See https://github.com/wxWidgets/wxWidgets/pull/1171
2019-01-27 03:55:38 +01:00
ali kettab
84fc5c1714 Fix changing tooltip via wxToolTip::SetTip() in wxQt
Update the actual tool tip used by Qt and not just the internal variable
when SetTip() is called.

Also implement wxToolTip::SetWindow().

Closes https://github.com/wxWidgets/wxWidgets/pull/1175
2019-01-25 14:39:37 +01:00
Liam Treacy
83f23cec89 Added virtual and override specifiers to derived method in ListCtrl 2019-01-24 14:31:17 +00:00
Graham Dawes
9cd566789d Added file missing from previous commit 2019-01-24 08:08:12 +00:00
phowstan
7cfb5b91a5 Implement wxStaticBox::Set/GetLabel() in wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1167
2019-01-23 16:38:25 +01:00
Vadim Zeitlin
2753bb2f50 Merge branch 'qt_event_loop' of https://github.com/GeoTeric/wxWidgets
Use QEventLoop for wxEventLoop implementation in wxQt to fix several
issues with wxEventLoop, notably avoid "QApplication::exec is already
running" errors.

See https://github.com/wxWidgets/wxWidgets/pull/1165
2019-01-22 19:05:53 +01:00
Liam Treacy
31c2bd7aa3 Add default parameter to wxDialog::Show() in wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1164
2019-01-22 15:49:44 +01:00
Vadim Zeitlin
6fbc7a7e16 Merge branch 'qt-region-fixes'
wxQt region-related fixes: fix bugs in clipping region handling and
add wxRegion::DoCombine().

See https://github.com/wxWidgets/wxWidgets/pull/1162
2019-01-22 15:46:19 +01:00
Vadim Zeitlin
8703f0c437 Merge branch 'qt-dropdown'
Make wxQt wxComboBox behave more consistently with the other ports. Also
includes related fixes to wxChoice and wxTextEntry.

See https://github.com/wxWidgets/wxWidgets/pull/1161
2019-01-22 15:45:03 +01:00
Graham Dawes
8a73f65285 Use QEventLoop to implement wxEventLoop for wxQT 2019-01-22 14:37:18 +00:00
Graham Dawes
7fa7fd1beb Don't generate idle events when the event loop is not running 2019-01-22 08:11:30 +00:00
Graham Dawes
278f4fa1d6 Add wxOVERRIDE to overriden methods 2019-01-22 08:11:30 +00:00
Vadim Zeitlin
26c9fd0033 Merge branch 'qt_listbox_failing_tests'
Fixes for item selection and cleanup.

See https://github.com/wxWidgets/wxWidgets/pull/1159
2019-01-21 23:43:56 +01:00
Vadim Zeitlin
c8f427181e Reuse code between wxListBox::Create() overloads
Add DoCreate() helper to actually create and initialize QListWidget.
2019-01-21 23:43:03 +01:00
Vadim Zeitlin
c28a8c9e7e Implement wxRegion operations in terms of DoCombine() 2019-01-21 23:34:12 +01:00
Jay Nabonne
5b8b30d243 Don't use pointer for wxDC::m_clippingRegion in wxQt
An object can be used directly instead.
2019-01-21 23:34:12 +01:00
Richard Smith
3618356cf1 Fix wxComboBox implementation of wxTextEntry interface
Implement missing methods and send, or suppress, the expected events.
2019-01-21 23:08:42 +01:00
Vadim Zeitlin
cfdf80d586 Rename wxChoice::InitialiseSort() to QtInitSort()
Use the prefix to indicate that this function is unique to this port.

Also don't make unnecessarily make it virtual.
2019-01-21 23:08:07 +01:00
Richard Smith
b27971c501 Use case-insensitive comparison in Qt wxComboBox and wxChoice
Define LexicalSortProxyModel to use the same sort order in wxQt as in
the other ports.
2019-01-21 23:08:07 +01:00
Liam Treacy
eb6b660d27 Added setStyle method to wxListBox to allow for the proper setting of sorting and selection style of the QListWidget 2019-01-21 14:04:47 +00:00
Graham Dawes
9cfecad878 Generate wxDialogInit event for wxDialog under wxQT 2019-01-21 13:53:59 +00:00
Graham Dawes
edc315a62f Add wxOVERRIDE to overriden wxDialog methods for wxQT 2019-01-21 12:49:06 +00:00
Liam Treacy
58df1ee13f Added wxOVERRIDE specifiers to qt wxListBox methods 2019-01-21 11:00:25 +00:00
Vadim Zeitlin
704f03e70e Don't use destroyed wxToolBar in wxFrame::SetToolBar() in wxQt
Store QToolBar pointer in wxFrame itself to avoid having to query the
already half-destroyed wxToolBar object when SetToolBar() is called from
its base class dtor.

This fixes crash when toggling the toolbar in the toolbar sample.

Closes https://github.com/wxWidgets/wxWidgets/pull/1140
2019-01-20 03:21:12 +01:00
Vadim Zeitlin
3fb84dfc0c Make wxToolBar::GetQToolBar() non-virtual and mark it as private
This method has no reason to be virtual.

Also move it to the end of the class public section and document that
it's not part of the public API.

See https://github.com/wxWidgets/wxWidgets/pull/1140
2019-01-20 03:21:11 +01:00
Vadim Zeitlin
61b391da90 Make wxFrame ctors inline in wxQt
No real changes, just make trivial (and going to remain trivial)
functions inline.
2019-01-20 03:13:04 +01:00
Vadim Zeitlin
a0d2212bba Merge branch 'qt_menuitem' of https://github.com/GeoTeric/wxWidgets
Add wxOVERRIDE specifiers to wxMEnu{,Item,Bar} methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/1146
2019-01-19 23:05:28 +01:00
Liam Treacy
5044283b87 Adding wxOVERRIDE specifiers to wxMenu and wxMenuBar methods 2019-01-18 13:25:27 +00:00
Liam Treacy
139070b745 Removing unnecessary forward declaration 2019-01-18 13:19:08 +00:00
Liam Treacy
3cde8607ab Adding wxOVERRIDE specifiers to menuitem methods 2019-01-18 13:17:47 +00:00
Liam Treacy
7b5cd77299 Removing unnecessary forward declaration from toolbar.h 2019-01-18 11:09:18 +00:00
Vadim Zeitlin
c575f595f5 Merge branch 'qt_fix_radiobox_layout' of https://github.com/GeoTeric/wxWidgets
Add support for grid layout for wxRadioBox under wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1136
2019-01-18 01:14:33 +01:00
chris2oph
dd306cac77 Various wxFont fixes in wxQt
Implement point/pixel size accessors correctly.

Implement support for strike-through fonts.

Also implement DoSetNativeFontInfo() for wxQt.

Make wxFont unit test pass by accounting for Qt-specific aspects.

Closes https://github.com/wxWidgets/wxWidgets/pull/1113
2019-01-14 23:39:02 +01:00