[Kexi-devel] Porting KoProperty to Qt4

Jarosław Staniek js at iidea.pl
Wed Jan 10 19:37:06 CET 2007


cedric.pasteur at free.fr said the following, On 2007-01-10 17:41:

> Yesterday I took a quick look at item view classes in Qt4 (both MVC-based and
> the other simpler ones such as QTreeWidget which acts like Q3ListView).
> The conclusion I quickly made was that we'll need to use the MVC system anyway.
> Indeed, delegates (see QAbstractItemDelegate) are _necessary_ to do custom
> rendering of list items now (there is no more paintBranches() etc in
> QTreeWidgetItem).
> So I'll just create a simple subclass of QAbstractItemModel and
> QAbstractItemDelegate that will handle both custom rendering and editors.
> KoProperty::Editor will also inherit QTreeView.
> 
> I'm telling you all this so that you don't change anything in
> KoProperty::Ediotr* classes until I commit my changes, because I will almost
> need to rewrite these classes from scratch.

I am ok with this as long as you work on a copy of the source code so others 
can work on kexi code itself (you can create a subdir, e.g. in kexi/tests/). 
The kopropertytest app needs to be working with your changes as well as the 
one from 1.6 before merging. The current trunk's kopropertytest is not ideal.

> Btw, I thought about a new feature: what about displaying a small label at the
> bottom of the Editor to show the i18n'ed description of the property (ie
> KoProperty::Property::description() ) being edited (ie it could describe the
> property, give info about possible values and tips, etc). This could be in
> particular useful for 'beginner' modes.

The description exists indeed for this feature.
However this is an extension that could be built on top of the editor, within 
a container that uses the Editor widget. Thus, the class could stay orthogonal 
- i.e. still be a QTreeView.
We already have a similar informational feature - a label 
(KexiObjectInfoLabel) above the property editor and it's outside Editor's 
implementation - KexiPropertyEditorView.
We can merge this feature with the description box you proposed. The resulting 
widget class (with a layout) could be named like EditorPage or so.

Another level is Kexi dependent: KexiDataSourcePage, which uses 
KexiPropertyEditorView.

Let's use kexi-devel at kde.org so others are aware of the development, however 
it would be good to have something noted down on the wiki page.

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice: http://www.kexi-project.org, http://www.koffice.org
  KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org


More information about the Kexi-devel mailing list