Add RectF editor, improve grid display, and support translated/untranslated values
ClosedPublic

Authored by staniek on Dec 17 2015, 11:55 PM.

Details

Summary
  • extensively use current QLocale for displaying values; use C locale for internal representation of values
    • separate translated from non-translated API for obtaining value strings
  • improve indentations and borders of combo, cursor, linestyle editors for various QStyles
  • assume that invalid grid color means "no grid" for the editor view
  • improve display of editors for when editor view's grid is off
  • redraw the view when changing grid settings
  • build color combo delegate even if KPROPERTY_KF is OFF
  • add RectF editor
  • temporarily use int spinbox editor for (u)longlong and uint types
  • linestyle combo: improve drawing line previews
  • font editor: properly use the current font when showing the font dialog
  • kpropertyexample app:
    • add test for precision of floating-point numbers
    • fix font face
    • add "Show grid" and "Show frame" check boxes for testing changes of grid and frame settings
Test Plan
  • run the kpropertyexample app using various QStyles, test all editors
  • look at the new APIs

Diff Detail

Repository
R13 KProperty
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
staniek updated this revision to Diff 1549.Dec 17 2015, 11:55 PM
staniek retitled this revision from to Add RectF editor, improve grid display, and support translated/untranslated values.
staniek updated this object.
staniek edited the test plan for this revision. (Show Details)
staniek added a reviewer: piggz.
staniek added a subscriber: Kexi-Devel-list.

Hint: Switch to a 665-staniek branch to get the code

This revision was automatically updated to reflect the committed changes.
staniek reopened this revision.Dec 20 2015, 9:14 PM

Reopening because phab fired autoclose from a feature branch and it should not.

piggz edited edge metadata.Dec 23 2015, 9:41 AM

Tested using kproperty example. The expanded RectF shows the correct values, but the summary version shows Int values

staniek updated this revision to Diff 1579.Dec 23 2015, 9:49 AM
staniek edited edge metadata.

Fix RectF editor - QRectF should be used

piggz added a comment.Dec 23 2015, 9:55 AM

the diff between the last 2 revisions looks wrong

src/KPropertyEditorView.cpp
214

can this fail? if it cant, then no-need for below if (w) ?

piggz added inline comments.Dec 23 2015, 9:59 AM
src/editors/linestyleedit.cpp
42

should we hard-code styles? what if they change in the future?

This revision was automatically updated to reflect the committed changes.