[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] Kaddressbook - i'm still hanging in there;)
From:       Anders Lund <temp_and () tiscali ! dk>
Date:       2002-09-26 22:04:48
[Download RAW message or body]

Hi All,
It's been a while, but yes - I am still interessted in contributing to 
KAddressbook/kabc development. I have resubscribed to the list using my 
temporary email address (while I find a friendly host for my domain..).

I have been reworking my patch for the card view these days, and gotten rid of 
the ugly int pointer.

I don't attach the patch, since it is full of private comments, and I am in 
the process of cleaning it up atm, but if anyone is interrested (Tobias?) I 
can post it or send it privately.

The patch now adds the following features:
* Notation of a "current" item (CardView::currentItem()) - this also means
  that the executed() signal can be used.
* Tooltip to display obscured strings. It pops up if the mouse rests a moment 
  above a header, field label or value that is not fully visible.
* Dynamic resizing columns. The cursor turns to a hresize over separators
  (resizing is disabled if separators are hidden), and you can drag to resize. 
  The labels will take up half the item width up to the requirements of the
  widest label.
* Focus handling. A focus rect is drawn around the current card.
* Selection handling. Support for single, multiple and extended selection 
  modes, following the usual schemes, including keyboard and mouse[/keyboard]  
  control of the selection. (not finished)
* Custom colors and fonts. Fonts are supported through the Cardview class, 
  while colors are managed by manipulating the CardView::viewport()'s palette.
* Configurable separator width.  
* Display of multiline fields. Fields with a value containing newline 
  characters is respected, a maximum number of lines to draw can be set.
* Additional CardView properties to support features:
  o itemWidth (itemWidth(), setItemWidth()): the width of all items.
  o itemMargin (itemMargin(), setItemMargin()): margin from item border to 
    focus rect.
  o itemSpacing (itemSpacing(), setItemSpacing()): margin from item border to
    card border/separator/next item/column
  o headerFont (headerFont(), setHeaderFont()): font to use for item header.
  o fieldSpacing (fieldSpacing(), setFieldSpacing()): vertical distance 
    between fields (collapsed with fontMetrics.leading()).
  o separatorWidth (separatorWidth(), setSeparatorWidth()): (obvious;)
  o maxFieldLines (maxFieldLines(), setMaxFieldLines()): maximum lines to
    display for fields. If set to 0 (default) all lines will be displayed.
* CardViewItems caches their height, saving considerable amounts of CPU in
  CardView::calcLayout()

Still to be done - apart from cleaning up/optimizations - is
* Embedded editing. For a start I want to be able to embed a [multi]line edit  
  and start/end the editing, including sending some signal so that the host
  application can store the edited value.
* Selecting value text in the current card
* Allow "vertical fields", mainly to display the NOTE field like in the below 
  exapmle:
  |------------------------------------------|
  |Name:             John Doe                |
  |Email:            some@other.where        |
  |Note:                                     |
  |This note is potentially long, so we keep |
  |the label on one line and let the value   |
  |span the entire card width.               |
  |------------------------------------------|
* Optimizing the way KAddressbook handles views - currently they gets cleared 
  and recreated way too often - for example if a single contact is edited, the
  entire view is recreated - what a waste;). Given the extensive features, 
  this is quite important, since they do cost CPU in the initialization.
* Make it designable

It is still my opinion that the field list should be global, that is kept in 
the card view rather than in the individual items, apart from using less 
memory it is also an indication that each card should contain similar 
information. It would also allow to keep more detailled information on each 
field without repeating that information in each card. For example to allow 
"vertical fields" I need to store an Orientation property in the 
CardViewItem::Field type. 

Note that I do not currently use double buffering. I could easily adapt double 
buffering as used by the current HEAD cardview, and I do have flickering 
here, though I haven't seen problems with missing redrawing as some have 
complained about.

Anyway, I hope this patch can be accepted immediately after the freeze is over 
(for 3.2)? I note that in most modules, developers tends to say "HEAD might 
be broken, that's part of development". I wote Mike Pilone a few days ago 
about this, but I haven't gotten any reply up to now. If that means that he 
does not maintain the CardView class at the moment, I am willing to take it 
on.

And...

I am working on a filter system that allows to define trees of filter rules, 
it can be pictured like this
SET name=STRING scope={AND|OR}
  RULE|SET
  [...]
[RULE|SET
...]

where a rule works like this:
RULE field=KABC::Field method={Is|IsNot|Contains|DoesNotContain|(etc...)} 
[test=STRING]

The filters currently use only string comparison, since we still does not own 
any kind of type checking of fields.

Filter sets and rules derives a common base, mainly defining the virtual 
methods test(KABC::Addressee *), save(KConfig *, QString) and load(KConfig *, 
QString).

I hope this can find a place in libkabc, as it would be usefull for many 
applications - apart from the address book maybe a kabc mailmerge plugin for 
kword, for kmail to allow sending mail to members of a category, etc. I have 
written the filter classes, and am now working on some widgets to edit them 
and a small test application.

Before I go on with this, does it sound entirely lame?
Is anyone interrested in helping with this, or seeing the premature code? let 
me know.

-anders
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic