~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kstyles/oxygen/README

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
oxygen-style-animated is a branch of trunk/KDE/kdebase/runtime/kstyles/oxygen that introduces smooth animations for the Oxygen widget style.
 
2
 
 
3
The code is organized as follow:
 
4
--------------------------------
 
5
 
 
6
1/ oxygenstyle.h and .cpp derive from QCommonStyle and take care of all the painting.
 
7
All 'primitives' are implemented as separate functions with identical prototypes and mapped to the corresponding QStyle primitive element at initialization style.
 
8
 
 
9
Some of the painting routines have been moved in oxygenstylehelper, for re-usability.
 
10
Additionaly some code that is common to the widget style and the window decoration resides at kdebase/workspace/libs/oxygen.
 
11
 
 
12
2/ since kde4.5 oxygen allows to drag and move windows by clicking in their empty areas. This is handled in the standalone 'oxygenwindowmanager' class.
 
13
 
 
14
3/ Since kde4.4, oxygen styles animates most widgets state changes. The animation code is contained in the ./animations and ./transitions subdirectories.
 
15
 
 
16
Each animation is structured in the following way:
 
17
For each element (e.g. QScrollBar) to be animated there are two classes:
 
18
 
 
19
- oxygenscrollbardata: contains the needed information, objects to animate a give QScrollBar instance. This usually consist of one or two QTimeLine, an event filter, and some needed flags + geometrical information.
 
20
 
 
21
- oxygenscrollbarengine: contains the list of all Data objects registered for each new instance of the widget that is animated.
 
22
This is used by the style to get the relevant data matching a given widget when painting the later.
 
23
 
 
24
Additionaly, two "factory" classes, oxygenanimations and oxygentransitions, keep track of all the engines and engine setup. They serve as an interface between the animations and the KStyle painting primitives.
 
25
 
 
26
For the animations located in the ./animations subdirectory, how the informations contained by the Data is used to animate a given widget is def in the oxygen KSTyle class.
 
27
 
 
28
For the animations located in the ./transitions subdirectory, handling the animation is performed using a temporary "cover" widget, namely Oxygen::TransitionWidget, and does not necessit any modification to the oxygen.cpp style itself.
 
29
 
 
30
Oxygen-style comes with two standalone applications:
 
31
----------------------------------------------------
 
32
 
 
33
- oxygen-settings, which offers an exhaustive list of configuration options for both the style and the decoration, in addition to the limited set of options available in systemsettings.
 
34
 
 
35
- oxygen-demo, which offers a showcase of how widgets are rendered with oxygen, and is used notably for debugging, and regression checks.
 
36
 
 
37
These applications are not available via kde 'start menu'. They must be typed either in a terminal (e.g. konsole) or via krunner. 
 
38