[Kalzium] Resizeable Periodic Table

Rebetez Etienne etienne.rebetez at oberwallis.ch
Wed Aug 11 21:33:39 CEST 2010


Hi
So, finely the new kalzium periodic table is ready for trunk. 
All functions are reimplemented with the new table.
Since replacing the pse table affected almost every class, the patch is huge. I  
don't assume someone would have the time to review it all, so i try to explain 
the new table a bit:

It's based on the pse from avogadro and uses qGraphicsView, qGraphicsScene and 
qGraphicsItem:
- periodsystembase.cpp
  - periodictablescene_p.cpp
    - elementitem.cpp
    - numerationitem.cpp

To define the different pse-Tables i used the qStateMachine class  that was 
introduced in qt 4.6:
 - statemachine.cpp
That means the transitions between the tables are animated.

Finally i created a class that holds the schemes, gradients etc. and tells the 
elements what they have to look like:
 - kalziumelementproperty.cpp
All the logic is in that class.

With that class it was then easy to make a universal gradient slider:
 - gradientwidget_impl.cpp
It's based on the somwidget.

The rest was mostly porting the classes to the kalziumElementProperty class.

As mentioned above, everything works as before (except of the new 
gradientwidget). If something would be missing, i am certain that i'll be able 
to fix it before the feature freeze.
The code should also be  easier to maintain.

I hope you like it. 
If you think it's ok, i can commit the patch and begin to work again with 
atomic patches.

patch was created in /KDE/kdeedu/

Etienne


> Hello
> So, after having some fun with qGraphicsscene i ported the new pseTable to
> kalzium. I the attachment is a first preview of what i made (or current
> state).
> 
> Feature:
> + Sizable and animated pse-Table
> + New universal Gradient/SOM/Schemes/Slider Widget 
> 
> This patch is intended to be a tech preview and is far from final. So any
> feedback is welcome.
> 
> Broken things:
> - The pse numeration is missing at the moment.
> - saving svg is also broken.
> - and still a lot of TODO's in the code...
> (Maybe you also need to delete the kalziumrc in home)
> 
> I didn't delete anything yet but the following classes where replaced.
> #    somwidget_impl.cpp
> #    timewidget_impl.cpp
> #    periodictableview.cpp
> #    kalziumpainter.cpp
> #    kalziumtabletype.cpp
> by
>    gradientwidget_impl.cpp
>    periodsystembase.cpp
>    periodictablescene_p.cpp
>    elementitem.cpp
>    statemachine.cpp
>    kalziumelementproperty.cpp

> patch was created in /KDE/kdeedu/kalzium/
> 
> Have fun
> Etienne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kalzium2.patch
Type: text/x-patch
Size: 166168 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kalzium/attachments/20100811/d4181c9b/attachment-0001.patch 


More information about the Kalzium mailing list