| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Now that the softkey framework triggers updates on focus changed,
window activated, and action added/removed/changed the softkey bar
was updating many times resulting in flicker. Solve that by
introducing a new event type that is posted to the softkey framework.
Since we only need to update the softkeys once per event loop
iteration, the event is compressible in the event loop.
Reviewed-by: Alessandro Portale
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously there were many options here that were inherited from the
Qtopia implementation. It was not clear to developers which value
they actually should use. A good example was the 'Next' value. In
a typical wizard application, next would be on the right and
'Previous' would be on the left. However, it is also common to have
'Next' on the left and have 'Cancel' on the right.
Basically what people really wanted was a way to explicitly set the
right and left soft keys, but since this relies on form factor and
is wrong if the screen is rotated, we choose positive and negative
actions as the values for these such that they still make sense when
the screen is rotated. Also this helps people who don't know if a
particular action should be on the left or right, but they *do* know
if their action has destructive characterisitics (negative).
As a convenience for widgets in Qt that use softkeys, we create a
standard softkey enumeration. That maps the actions to the correct
role and has default text.
Reviewed-by: Alessandro Portale
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Created an array of soft key actions that are created on the fly as
buttons are needed. This moved the allocations for the actions out
of the updateButtonStates() function which is called quite often so
allocations should happen less often now.
The signals and text should are kept in sync with the buttons.
Controlling which soft keys are currently available is done when
the buttons states are updated by calling addAction or removeAction.
The soft key framework then picks up on these changes.
Reviewed-by: Alessandro Portale
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies the implementation of the soft keys. Introduce a hash
for storing the mapping between the buttons and the actions that they
represent. This allows for easy translation of the strings when the
language changes.
Use setFixedSize instead of hide to make the buttons invisible. This
allows us to put some code in the handling of the show event and add
the actions here. This should be fairly safe since even if we get
multiple show events, it is still safe to add the same action again.
Reviewed-by: Alessandro Portale
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous version created a new QAction every time setCancelButton
was called without deleting the previous instance. This version
stores the action pointer in the d-ptr, but still recreates it
everytime the button is changed.
Also, make sure the text is updated if setCancelText is called by
the user.
Reviewed-by: Alessandro Portale
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the new softkey API it is not necessaery to call setSoftKeys
with the actions you want and then to set it to 0 to clear them. The
way to use the API is just call addAction() and this soft key will be
valid while this is the active window.
Also make sure that the text of the action is updated when
retranslateUi() is called.
Reviewed-by: Alessandro Portale
|
|
|
|
|
|
|
|
|
| |
Re-using QT_KEYPAD_NAVIGATION for soft keys is wrong since the two
are independant concepts. This puts everything in a new macro called
QT_SOFTKEYS_ENABLED. This will also insulate the embedded customers
who use keypad navigation from the soft key changes.
Reviewed-by: Alessandro Portale
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewed-by: Alessandro Portale
Squashed commit of the following:
commit dae5eda6996d48c12c4a5efd3f6042eb293bacbf
Author: Jason Barron <jbarron@trolltech.com>
Date: Fri Sep 18 10:32:26 2009 +0200
Only update soft keys when KEYPAD_NAVIGATION is enabled.
For 4.6, let's just call these functions when keypad navigation is
defined to minimize the impact on other platforms. They should
probably get thier own define some day.
commit 30a730553531f0f138de5eddb30413936a34fa36
Author: Jason Barron <jbarron@trolltech.com>
Date: Fri Sep 18 10:30:23 2009 +0200
Add/remove the menu bar action when menu bar is added/removed.
commit a83343a2870b34c228c8bc5e6274607b0e97baf6
Author: Jason Barron <jbarron@trolltech.com>
Date: Fri Sep 18 10:28:55 2009 +0200
Compile fix for other platforms
commit 39c9e3a0a1d3d62bf6ebd3212cfd2a81b86b9b2a
Author: Jason Barron <jbarron@trolltech.com>
Date: Thu Sep 17 21:37:59 2009 +0200
Fix 'softkeys' example after API re-factoring.
Clean up this example and use the simplified soft key API. Now the
actions are only allocated in the constructor and dynamically updated
by calling addAction and removeAction.
commit 314e45c33f40552db74e61755c2a3b0f8c77a41a
Author: Jason Barron <jbarron@trolltech.com>
Date: Thu Sep 17 21:30:32 2009 +0200
Re-factor and simplify the soft keys API.
Several things here:
- Move all the logic into QSoftKeyManager
- Move the files into 'kernel' since it is not a widget
- Remove QWidget::setSoftKey*(). Use addAction/removeAction instead
- Made soft keys update on focus, window activation, and action
changes.
- Fixed several memory leaks where QAction's were created too often
- QAction ownership pushed out to widget's
- Added Select/Cancel soft keys for comboboxes and menus to be more
consistent to platform look-and-feel.
commit fb4c240d970262e9872dc5737df6808879143c75
Author: Jason Barron <jbarron@trolltech.com>
Date: Mon Sep 7 15:49:31 2009 +0200
Merge the Symbian implementation with the other platforms nativeMenuBar
It seems this has been refactored to share more code across the various
platforms that support native menubars so the Symbian code can be
mostly removed.
commit aa55e4bcd1f009ab35c9519e18aa325fd212dd23
Author: Jason Barron <jbarron@trolltech.com>
Date: Wed Aug 26 17:00:34 2009 +0200
Change filenames and move softkey stuff from 'widgets' to 'kernel'.
This thing isn't a widget and therefore should not be in the 'widgets'
subdirectory of gui. Also rename the files in preparation for
refactoring and extending.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Related to QTSSIXTY-63 "Make Qt dialogs look native"
S60 dialog support:
* Positioning according S60 rules:
- in portrait dialogs at the bottom of the screen,
- in landscape positioned in the center of the screen [unless device supports bottom softkeys], so that softkeys are not covered by the dialog
* If dialog shows extension, then dialog is re-positioned
* Dialog size:
- in portrait screen wide dialog, height can change
- in landscape width is the same size as width in portrait (some dialogs are maximized)
* No push buttons or DialogButtonBoxes in internal qt dialogs
(QWizard, QInputDialog, QFileDialog, QFontDialog, QColorDialog, QProgressDialog, QErrorMessage, QMessageBox), instead signals are remapped to softkeys.
* Globally, dialogbuttonboxes are converted automatically to softkeys.
OPEN:
* Needs to be re-factored slightly after softkey API refactoring is finished.
BUGS:
QWizard layout switch is wonky - dialog is not re-sized correctly.
QFontDialog will not fit into device screen (too much widgets in it). Some effort needed to be make it smaller.
Cannot set one softkey at the time softkeys => Options menu and right softkey cannot be set separately [SoftKey re-factoring will help]
Dialogs cannot get touch events to softkeys [SoftKey re-factoring will help]
Reviewed-by: Alessandro Portale
Reviewed-by: Jason Barron
Reviewed-by: mread
Reviewed-by: Shane Kearns
|
|
|
|
|
|
|
|
|
| |
QVector3D::normalize() and other similar functions were losing
precision when qreal was float, causing vectors with small lengths
to normalize to (0, 0, 0). Do the length calculations with
double precision to avoid this problem.
Reviewed-by: Sarah Smith
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All changes of this commit are #ifdef'ed in
QT_KEYPAD_NAVIGATION. Most desktop Qts won't notice
any change.
Navigating between QWidgets was not alwys a pleasure on
keypad devices. This commit fixes the navigation behavior
for some widgets, mostly itemviews.
Furthermore, it adds a 'directional' navigation mode. Until
now, the existing keypad navigation used the tab order
do go back and forth between widgets. The new mode is supposed
to provide a more intuitive navigation. It is the new default
mode on Symbian.
Screens (and their resolutions) become bigger, and also low
resolution screens can be used in landscape mode. That's
why the directional mode was requested.
Another popular request was to put some more convenience into
QSlider: If a (horizontal) slider has focus and the user presses
left/right, the value of the slider may directing change
without being selected (edit mode).
This commit also adds the manual test 'keypadnavigation'.
Reviewed-by: Shane Kearns
|
|
|
|
|
|
| |
We need to lock before falling back to QRasterPaintEngine
Reviewed-by: Jervey Kong <jervey.kong@nokia.com>
|
|
|
|
| |
Reviewed-by: Samuel
|
|
|
|
|
|
|
| |
Use Symbian glyph cache directly in QRasterPaintEngine, do not need cache them in Qt if on Symbian Platform.
Reviewed-by: Alessandro Portale
Reviewed-by: Jason Barron
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a user sets a window title on a window to an empty string we will
not check if the value was an empty string before. This handles a
special case on X11 and Windows when we set the window title to the
application executable name by default if the user didn't provide the
title, so if the user explicitely wants to remove the windowtitle
completely and make it empty, he will be able to set it to an empty
string.
Reviewed-by: Olivier Goffart
Reviewed-by: Prasanth Ullattil
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Cocoa does not allow NSMenu to have multiple supermenu's. If a menu is
added again as submenu, Qt will now disable the menu item or the menu
will not be added at all if it is added again to the menubar.
Task-number: 258822
Reviewed-by: MortenS
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The scrolling was broken in other graphics systems than the native,
since _q_scrollPixmap assumed that all QPixmaps were using the X11
backend. We can just use QPixmap::scroll instead, which should also make
it faster with the raster paint engine than creating a temporary painter
and doing a blit. Also, _q_scrollPixmap would do blending instead of
blitting for non-opaque pixmaps.
Reviewed-by: Olivier Goffart
|
| |
| |
| |
| |
| |
| |
| | |
In the windowsurface we shouldn't create a backingstore pixmap if the
window has invalid size.
Reviewed-by: Samuel
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In addition to waiting until the window manager maps and reparents the
window, also wait until we get initial expose event.
The window manager will most probably send us several ConfigureNotify
events, so wait until all of them are handled in addition to the Expose
event (as one might rely on another).
Also, we shouldn't wait for the ReparentNotify event if the window has
X11BypassWindowManagerHint.
Reviewed-by: Olivier Goffart
|
| |
| |
| |
| |
| |
| |
| | |
Make sure we recieve both ReparentNotify and MapNotify events.
Also change the timeout to 2 seconds to cope with slow machines
Reviewed-by: Denis
|
| |
| |
| |
| |
| |
| | |
Fix compilation on systems that support the extended bitmap format.
Reviewed-by: Jani Hautakangas
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This enables us to convert from and to new Symbian type of
graphics resource, namely SgImage. This only supported with
the OpenVG graphics system.
On other graphics systems this will return null QPixmap.
Conflicts:
src/corelib/global/qglobal.h
src/gui/image/qpixmap.h
src/gui/image/qpixmap_s60.cpp
Reviewed-by: Jason Barron
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is done to reduce heap consumption and to give
a possibility to share bitmaps across process. QPixmap
maps to Symbian CFbsBitmap which is stored in Symbian
font and bitmap server.
Reviewed-by: Jason Barron
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Reviewed-by: leo
|
| | |
| | |
| | |
| | |
| | |
| | | |
Small refactoring, since the two code blocks were almost the same.
Reviewed-by: leo
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In this commit we introduce initial support for Size Policy.
The size policies supported now are:
* QSizePolicy::Fixed
* QSizePolicy::Minimum
* QSizePolicy::Maximum
* QSizePolicy::Preferred
* QSizePolicy::Ignored
Signed-off-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>
|
| | |
| | |
| | |
| | | |
Reviewed-by: trustme
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
tests/auto/qtwidgets/tst_qtwidgets.cpp
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If a tool tip is to be reused, it *has* to be visible otherwise
it *may* get destroyed by the expiration timer before the timer is reset.
The tst_qtooltip::setPalette() test triggered this obscure bug under
Windows.
Reviewed-by: Kim
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The branch maintained its own set of native windows.
This was commented to be a duplication of the native window list kept
by QWidgetPrivate, and changed.
Unfortunately, the set maintained on the branch contained only window
owning controls, while the list kept by QWidgetPrivate contains all
widgets that have a CCoeControl.
Added a check for whether the control is window owning before using its
DrawableWindow() to avoid getting a null pointer.
Reviewed-by: Jason Barron
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Removed UID that wasn't used.
Reviewed-by: Jason Barron
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added some missing #ifdef QT_NO_CURSOR, so the symbian port still
compiles if this feature is configured out.
Reviewed-by: Jason Barron
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some symbol fonts will contain a unicode cmap table in addition to the
microsoft symbol cmap table that maps the symbol range (private range
0xf000 - 0xf100) into the correct glyphs. This is essentially a broken
unicode table, and we should not prefer it if these conditions are true.
In the strict cases where these conditions apply, we fall back to the
symbol table instead.
Task-number: QT-2354
Done-with: Lars
Reviewed by: Lars
|
| | |\ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This method, formerly called by the QGraphicsAnchor destructor, to
remove the anchor associated to it, is no longer needed.
That destructor now calls QGALPrivate::removeAnchor(), a method
analagous to addAnchor(), that provides the high level feature
of "anchor removal".
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
more anchors
Now the removeAnchor() method has returned and it is ready for being use in the API for ensure
that items are removed from the layout when they have no more external anchors.
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
All method calls were replaced by calling removeAnchor_helper(), with
internalVertex() calls
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
QGraphicsAnchorLayoutPrivate now has addAnchor() replacing anchor() and
addAnchor_helper() replacing addAnchor(). With this changes we are respecting
the API behavior, where anchor() is a "getter" instead of a "setter".
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The simplex solver cannot handle negative-sized anchors. Those
should be handled by the layout itself. This is done by inverting
such anchors and making their size positive again.
Ie. A --> B with size -10 becomes B --> A with size 10
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixing the case where creating an anchor between the
layout Left edge and an item Right edge (or vice-versa)
would have different behaviors depending on the argument
order.
Now both calls below have the same meaning:
addAnchor(layout, Qt::AnchorLeft, widget, Qt::AnchorRight)
addAnchor(widget, Qt::AnchorRight, layout, Qt::AnchorLeft)
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The QItemSelectionModel::Current was not set in
QTableViewPrivate::selectColumn(). However, Control-drag selection in
QTableView behaved differently than other software such as OpenOffice's
spreadsheet.
Now the behaviour when Control-dragging is that the selection will be set to
the opposite of the selection state of the first cell. If that cell is
selected, we will deselected the cells while dragging, and conversely, if it
isn't selected, the cells will be selected.
Reviewed-by: Olivier
Task-number: QT-1435
Task-number: 191545
|
| | |\ \ \
| | | |/ / |
|
| | | |\ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
tests/auto/qimagereader/tst_qimagereader.cpp
tests/auto/qtwidgets/tst_qtwidgets.cpp
|
| | | |\ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The Mac/Cocoa font database currently relies on two APIs, ATSUI (old)
and CoreText (new). These are interchangable and work on the same font
database.
Some differences do exist, in particular ATSFontFamilyGetName seems
to return the same as ATSFontGetName for some fonts - the font name,
not the family name. In any case, the old ATS code path is initializing
QFontDatabase::familes() with the font name.
This causes a naming mismatch with code that uses CoreText and gets
the proper family name, in this case in initializeDb(). The fix is
to make sure the correct family name is used by using the CoreText
API to access it.
RevBy: TrustMe
|
| | |\ \ \ \ \
| | | | |/ / /
| | | |/| | | |
|
| | |\ \ \ \ \ |
|