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

List:       koffice-devel
Subject:    Re: Tables and properties
From:       Thomas Zander <zander () planescape ! com>
Date:       2002-04-16 17:49:37
[Download RAW message or body]

On Fri, Apr 12, 2002 at 04:21:25PM +0200, Nash Hoogwater wrote:
> Hi,
> 
> OK, since nobody answered (btw I think the author is Thomas and he is "out of 
> office", so it is quite obvious that he didn't answer :-), 
Correct :)

> I just started 
> hacking on the table properties. As you can see in the attached file 
> tabledia.h and .cc I already wrote the whole gui part, however I need some 
> advice as to how we are going to save and store the table styles. It is a 
> struct now: is this the way to go or is it better to create a class for it?  
> Also maybe it's better to put the second tab in a separate class so we can 
> use it in another dialog (e.g. changing properties of an existing table).

Starting from the top;
changing the way a table looks means to change the frames that make up the table.
So changing the headers to have a different background means to change the frames
of the cells which have the row==0
The frame properties like frame-background etc are just settable like any other 
frame or frameset.

For that reason I intended to first get frame-styles working before we work on
table-styles. (The tab is actually a couple of years old and has been disabled
as long as I can remember)

I remember someone starting on the frame-styles but I never heard anything from
that anymore. I believe that using frame-styles makes the table-styles a lot 
easier.

For the dialog it would probably be wise create an interface and move all tabs
of the framedia.cc into seperate classes implementing this interface. Then the
table dia tabs could also implement that interface.  (just like the kotext/stylist
does things)
But that won't be needed at present; so just ignore that part for now. In other
words; your patch fullfils the current need :)

> Second issue: how are we going to store these styles? In an xml-file (seems 
> the best way to go IMHO) and if yes where should we store the file and the 
> dtd? Also I'd like to create (if I have the time) a tablestyle editor, so 
> that the user can add his or her own tablestyle.  A file in the user home-dir 
> should than be created for this. I don't know what the normal way of saving 
> these files is and if this is a good idea(?).

Seems like a good idea :)  Looking at your example I want to put a couple of 
ideas in here;
- why make a style that has a body/head/firs-col part.  Why not make the 
  applying of a style decide to which subset of the table you want to apply
  the style to.
  So you have a style that has a black background with white text. Applying
  that to the table with a checkbox:  "apply to header" does the trick.
- You can make a default style that is used normally for the whole table; 
  which can then be used to reset any style changes back to the default.
  Note that undo can also do that, but you get the point.
- if you store the table-style with the table you can only have one table-style
  and for that reason I believe you should just apply the style. I think this
  makes it easier for the user to combine different styles. It also makes it
  more extendable and easier to script.
- table styles should also change the text, we can use styles for that since we
  allready have those. But that is something that can be extended later.

> OK, could somebody (David?) have a look at my questions and the files I 
> included and give me some pointers? The original source was from the snapshot 
> of April 9th.

The example looks quite nice; thanx!  I hope you can use the pointers above and
give me feedback on what you think!!

-- 
Thomas Zander                                            zander@earthling.net
The only thing worse than failure is the fear of trying something new

[Attachment #3 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

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

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