Commit Graph

39762 Commits

Author SHA1 Message Date
Jay Nabonne
d3033c861c Merge branch 'qt_tree_control' of https://github.com/GeoTeric/wxWidgets into qt_tree_control 2019-02-07 11:40:28 +00:00
Jay Nabonne
6dfc243b27 Fix up a comment. 2019-02-07 11:39:26 +00:00
Jay Nabonne
541e7af374 Fix wx drag events to actually be keyed off of the Qt dragging state instead of its "drop" events.
Add "dropped" state to track whether a drop actually occurred or whether the drag ended unsuccessfully.
2019-02-07 11:36:15 +00:00
Graham Dawes
5aba98353c Generate event when begin editing tree item. 2019-02-07 10:27:51 +00:00
Jay Nabonne
5279d0bca5 Clean up the code after merges. 2019-02-07 10:13:05 +00:00
Graham Dawes
0356b236c8 Merge branch 'qt_tree_control' of https://github.com/GeoTeric/wxWidgets into qt_tree_control 2019-02-07 10:04:44 +00:00
Jay Nabonne
3c3421b3b2 Merge branch 'qt_tree_control' of https://github.com/GeoTeric/wxWidgets into qt_tree_control
# Conflicts:
#	src/qt/treectrl.cpp
2019-02-07 10:01:40 +00:00
Jay Nabonne
d9080cd791 Get initial tree control drag and drop working. Create a new type for tree item data, as it needs to be serialisable for drag and drop, and void* is not. 2019-02-07 09:08:08 +00:00
Graham Dawes
9ba41aecc1 Fix build warnings in wxTreeCtrl 2019-02-07 08:43:31 +00:00
Graham Dawes
3342695b92 Make wxQT wxTreeCtrl selection behave consistently with other wx ports. 2019-02-07 08:39:04 +00:00
Graham Dawes
ab6f8e5092 Prevent "header" row from showing in wxTreeCtrl under wxQT. 2019-02-06 16:49:43 +00:00
Graham Dawes
02d47aadfd Fix wxTreeCtrl::GetSelections for wxQT 2019-02-06 13:23:17 +00:00
Graham Dawes
d2f1e1b61b Better support for images in wxTreeCtrl under wxQT 2019-02-06 12:55:30 +00:00
Graham Dawes
57348b4a59 Add EditControl support for wxTreeCtrl under wxQT 2019-02-06 09:20:13 +00:00
Graham Dawes
cfe36f7ae7 Move wxQtTreeItemEditorFactory to its own header 2019-02-06 08:57:29 +00:00
Graham Dawes
dee221e2a5 Rename wxQtItemEditorFactory to wxQtTreeItemEditorFactory 2019-02-06 08:32:41 +00:00
Graham Dawes
c7f77ba765 Add signal handlers to generate wx events for wxTreeCtrl under wxQT 2019-02-05 19:50:16 +00:00
Graham Dawes
9df2258397 Fix some failing TreeBookCtrl tests cases 2019-02-05 19:05:40 +00:00
Graham Dawes
2a91c00c10 Add missing d'tor 2019-02-05 16:13:56 +00:00
Graham Dawes
9f1f8636c5 Fix root relationship 2019-02-05 14:15:36 +00:00
Graham Dawes
8efe01bd8e Implement basic styles for wxTreeCtrl under wxQT 2019-02-05 13:46:32 +00:00
Graham Dawes
308ef18a6d Start "native" implementation of wxTreeCtrl for wxQT 2019-02-05 13:23:12 +00:00
Graham Dawes
eb00d7623a Rename internal tree widget to something more appropriate for
a wxListCtrl.
2019-02-05 08:06:26 +00:00
Graham Dawes
5ec25fe755 Implement support for wxFrame style flags for wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1222
2019-02-05 03:06:05 +01:00
Vadim Zeitlin
153b5e85fb Merge branch 'qt_combobox_crash' of https://github.com/GeoTeric/wxWidgets
Fix crashes when using wxCB_READONLY in wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1221
2019-02-05 03:04:21 +01:00
Vadim Zeitlin
ddc550105e Merge branch 'qt-radio-groups'
Fix radio button grouping in Qt.

See https://github.com/wxWidgets/wxWidgets/pull/1212
2019-02-05 03:03:10 +01:00
Graham Dawes
a60c2470b5 Dedupe wxCB_READONLY check 2019-02-04 09:26:10 +00:00
Graham Dawes
1472b2f8ef Fix crashes with readonly combobox under wxQT 2019-02-04 09:23:08 +00:00
Vadim Zeitlin
c08ea68b4a Avoid unnecessary calls in wxGDIPlusContext::GetTextExtent()
Don't always call several GDI+ functions when we often don't need their
results: only retrieve the cell descent, ascent and the line spacing if
we are going to really use any of these values.
2019-02-03 22:46:02 +01:00
Vadim Zeitlin
efa1e8f4ff Merge branch 'gc-from-unknown-dc'
Add wxGraphicsRenderer::CreateContextFromUnknownDC().

See https://github.com/wxWidgets/wxWidgets/pull/1213
2019-02-03 22:14:01 +01:00
New Pagodi
91d3981a7b Implement BitmapFromRGBAImage without raw bitmap
The function BitmapFromRGBAImage in PlatWX.cpp is currently only
used when wxHAS_RAW_BITMAP is defined. Consequently some functions in
PlatWX.cpp simply do nothing when wxHAS_RAW_BITMAP is not defined. This
provides a second implementation of the function based on wxImage that
is used when wxHAS_RAW_BITMAP is not defined.
2019-02-02 17:45:30 -06:00
New Pagodi
ebdc838151 Preserve recent changes to wxSTC documentation
Recent commits 8fbca5cb70 and c68e5d0617 fixed some typos is the
documentation for wxSTC. Unfortunatly these changes will be lost the
next time the wxSTC files are regenerated. This commit modifies
stc.interface.h.in and gen_docs.py to ensure that these changes are
preserved when the wxSTC files are regenerated.
2019-02-02 17:45:29 -06:00
Dan Gudmundsson
22fc3cff8f Use base implementation of dragAcceptFiles in wxOSX
As is done in wxGTK implementation.

Closes https://github.com/wxWidgets/wxWidgets/pull/1116
2019-02-02 22:43:14 +01:00
Vadim Zeitlin
356e0725d8 Move wxGraphicsRenderer::CreateContextFromUnknownDC() around
No real changes, just move this method to the implementation section of
its class.
2019-02-02 21:23:35 +01:00
Vadim Zeitlin
8bbac921f3 Add wxGraphicsRenderer::CreateContextFromUnknownDC()
It seems wrong to have this function in wxGraphicsContext only and not
in wxGraphicsRenderer, as this makes it impossible to create a context
associated with a non-default renderer while it doesn't cost us anything
to allow doing this.
2019-02-02 21:22:19 +01:00
Vadim Zeitlin
46188ff56f Remove dynamic_cast-based implementation of CreateFromUnknownDC()
There doesn't seem to be any point to have both wxRTTI-based
implementation and the standard RTTI-based one, so leave the former one
only.
2019-02-02 21:17:37 +01:00
Paul Cornett
fb89d7b225 Minor cleanup, no real changes
Remove unneeded forward declaration, unused variable
2019-02-02 11:27:37 -08:00
Paul Cornett
10d1954832 Simplify converting gray PNG data to RGB
libpng can do that for us
2019-02-02 11:15:36 -08:00
Paul Cornett
5771b371f2 Use memset rather than a loop to set memory to a fixed value 2019-02-02 11:01:05 -08:00
Paul Cornett
28010b51f0 Simplify memory allocation for PNG image data
Allocate one block for the whole image, rather than a block for each row
2019-02-02 10:56:33 -08:00
Vadim Zeitlin
9a7a89b7b2 Merge branch 'qt-convert-simplify'
Simplify Qt conversion functions and stop mapping wxPoint(-1,-1) and
wxSize(-1,-1) to QPoint(0,0) and QSize(0,0), respectively.

See https://github.com/wxWidgets/wxWidgets/pull/1206
2019-02-02 17:12:50 +01:00
chris2oph
f8c345ca95 Fix painting logic in wxQt wxClientDC implementation
The original drawing mechanism was generating lots of QWarning messages
when running samples (e.g. htlbox, caret, etc.) and in some cases was
not actually completely drawing every element of the sample. The issue
was that the QPicture was being shared incorrectly between wxWindow and
wxClientDC and attempts to start painting, update, etc. were generating
console warnings.

Closes https://github.com/wxWidgets/wxWidgets/pull/1152
2019-02-02 16:23:49 +01:00
Vadim Zeitlin
7d2e6e805f Add helper function to avoid code duplication in wxQt wxTextCtrl
No real changes, just a refactoring to avoid duplicating the code
handling wxTE_READONLY and the alignment styles between multi- and
single-line versions.

Also avoid testing for "style & wxTE_LEFT" as this will never be true
anyhow.

See https://github.com/wxWidgets/wxWidgets/pull/1211
2019-02-02 16:12:16 +01:00
Tristan
c8cbdc783a Implement support for more style flags in wxTextCtrl
Support wxTE_READONLY, wxTE_RICH[2], wxTE_{LEFT,CENTRE,RIGHT} as well as
wxNO_BORDER flags.

Closes https://github.com/wxWidgets/wxWidgets/pull/1211
2019-02-02 16:06:43 +01:00
ffa-benarmstrong
f930bd6740 Generate events when wxRadioButton is checked under wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1210
2019-02-02 16:03:02 +01:00
Vadim Zeitlin
36fc9b3e5a Merge branch 'wxslider' of https://github.com/MaartenBent/wxWidgets
wxSlider and widgets samples improvements:

- Document `wxSL_BOTH` style of `wxSlider`.
- Centre labels above and below vertical `wxSlider`. Improve label
  position for specific combinations of `wxSlider` styles.
- Improve `wxSlider` in high DPI. Make thumb and tick size DPI
  dependent.
- Better fix layout of `wxSlider` labels after changing value range.
  Commit 0b821ad did not (always) trigger a call to `DoMoveWindow`. See
  [#17093](https://trac.wxwidgets.org/ticket/17093).
- Fix `wxSlider::SetThumbLength()` on `wxMSW`. It requires
  `TBS_FIXEDLENGTH` style. Use `GetThumbLength()` instead of the
  arbitrary defined `THUMB` size.
- Improve guards in button pages of widgets sample.
- Use `wxSizerFlags` for slider page in widgets sample.
- Some fixes for `wxSlider` in widgets sample
  - Correctly save the slider value before recreating the slider.
  - Layout the entire page instead of only the slider sizer.
  - Update the text controls after recreating the slider.
  - Always enable 'both sides' checkbox. It has additional effects in
    `wxMSW`.
- Demonstrate `wxSlider::SetSelection()` in widgets sample.

See https://github.com/wxWidgets/wxWidgets/pull/1208
2019-02-02 15:59:39 +01:00
Tristan
7de612dd92 Honour wxCB_READONLY flag in wxQt wxComboBox
Don't make the combobox unconditionally editable, but only do this if
wxCB_READONLY is not specified.

Closes https://github.com/wxWidgets/wxWidgets/pull/1207
2019-02-02 15:58:10 +01:00
Vadim Zeitlin
6370662cc8 Merge branch 'qt-dnd'
Initial drag-and-drop implementation for wxQt.

Closes https://github.com/wxWidgets/wxWidgets/pull/1205
2019-02-02 15:54:21 +01:00
Vadim Zeitlin
0145916fb6 Unindent contents of anonymous namespaces
No real changes, only formatting.
2019-02-02 15:50:13 +01:00
Graham Dawes
f2d20384a0 Implement wxListCtrl::GetEditControl() for wxQt
To get access to the control used for editing items, we need to create
it ourselves, which involves defining our own factory for doing this,
but seems to be the only way of achieving our goal.

Closes https://github.com/wxWidgets/wxWidgets/pull/1204
2019-02-02 15:35:26 +01:00