add more spacing
[personal-kdebase.git] / workspace / plasma / design / javascript
blob56190a1c13d2f8c6033f9703c71aee8aeb89d9ab
1 Writing Plasmoids With JavaScript
2 =================================
4 The Plasmoid Package
5 ===================
7 Structure
8 ---------
9 http://techbase.kde.org/Projects/Plasma/Package
11 Installing and Replacing
12 ------------------------
13 plasmapkg
15 The plasmoid Object
16 ===================
17 FormFactor formFactor();
18 Location location();
19 QString currentActivity();
20 AspectRatioMode aspectRatioMode();
21 void setAspectRatioMode(AspectRatioMode mode);
22 bool shouldConserveResources();
23 bool isBusy();
25 setFailedToLaunch(bool failed, const QString &reason = QString());
26 setBusy(bool busy);
27 resize(qreal w, qreal h);
28 setMinimumSize(qreal w, qreal h);
29 setPreferredSize(qreal w, qreal h);
30 update();
31 setLayout(QGraphicsLayout *layout);
32 QGraphicsLayout *layout() const;
34 Getting Notified of Changes
35 ===========================
36 Events:
37 plasmoid.formFactorChanged
38 plasmoid.locationChanged
39 plasmoid.contextChanged
41 Possibilities for 4.3
42 ---------------------
43 networkAvailableChanged(bool)
44 conserveResourcesChanged(bool)
46 User Interface Elements
47 =======================
49 Types of Widgets
50 ----------------
51 BusyWidget
52 CheckBox
53 ComboBox
54 FlashingLabel
55 Frame
56 GroupBox
57 IconWidget
58 Label
59 LineEdit
60 Meter
61 PushButton
62 RadioButton
63 ScrollBar
64 SignalPlotter
65 Slider
66 SvgWidget
67 TabBar
68 TextEdit
69 ToolButton
70 TreeView
71 WebView
73 Layouts
74 -------
75 GridLayout
76 LinearLayout
78 Creating Items By Hand
79 ----------------------
80 createWidget
81 createLayout
83 Creating Items From UI Files
84 ----------------------------
86 Painting
87 ========
89 SVG Images
90 ---------
91 PlasmaSvg
92 PlasmaFrameSvg
94 Painting on the Canvas
95 ----------------------
96 plasmoid.paintInterface = function(painter)
97 QPainter
98 QFont
99 QRectF
100 QSizeF
101 QPoint
103 Accessing Sources of Data
104 =========================
105 dataEngine(string name)
106 dataUpdate
108 Configuration
109 =============
110 Declaring Config Values
111 -----------------------
112 KConfigXt XML -> main.xml
114 Accessing Configuration Data
115 ----------------------------
116 activeConfig
117 readConfig(string)
118 WriteConfig(string, var)
120 User Customization
121 ------------------
122 Qt UI file
123 configAccepted()
125 Other Functions and Classes
126 ===========================
127 print(string)
128 QGraphicsItem
129 createPrototype(
130 QTimer
131 plasmoid.setAspectRatioMode
132 plasmoid.setBusy