Eval » Historie » Version 23
Maximilian Seesslen, 24.08.2022 13:14
1 | 1 | Maximilian Seesslen | h1. Eval |
---|---|---|---|
2 | |||
3 | h2. Widgets |
||
4 | |||
5 | 3 | Maximilian Seesslen | There is a ODesktop that holds a list of OScreens (or only the curent). |
6 | 1 | Maximilian Seesslen | There is a OScreen that holds a list of OWidgets. |
7 | When the touch is pressed, the corresponding button can be determined. |
||
8 | An signal can be emmited. |
||
9 | An press-event can be queued, An release-event can be queued. An click-event can be queued if current button matches original pressed button. |
||
10 | |||
11 | * OButton::draw(): completely draws the widget |
||
12 | * OButton::update(): only draw status-relevant items, e.g. pressed, released, time changed... |
||
13 | |||
14 | 2 | Maximilian Seesslen | All screens can be prepared at start. |
15 | 1 | Maximilian Seesslen | A Screen can be active or inactive. |
16 | 3 | Maximilian Seesslen | |
17 | 12 | Maximilian Seesslen | Only one screen is active plus an navigation-screen? |
18 | |||
19 | 3 | Maximilian Seesslen | h2. Touch |
20 | |||
21 | 16 | Maximilian Seesslen | There is an touch class that helps converting raw values to X-Y-coordinates. [[Biwak:touch]] |
22 | 17 | Maximilian Seesslen | CTouch will emit signals "pressed, released, clicked" that can be connected to libocelli. |
23 | 2 | Maximilian Seesslen | |
24 | 1 | Maximilian Seesslen | h2. Watch |
25 | |||
26 | 5 | Maximilian Seesslen | * the OWatch class shows an clock with specific style, analog or digital |
27 | 1 | Maximilian Seesslen | |
28 | 6 | Maximilian Seesslen | h2. Example: Minutnik |
29 | 1 | Maximilian Seesslen | |
30 | * Main screen; CWatch, Add-Button |
||
31 | * Add-Screen |
||
32 | ** Espresso, Weisswurst, Weiches Ei, Hartes Ei, Nudeln, Pizza, Waschmaschine, Cancel; Height 32 |
||
33 | * Alarm Screen |
||
34 | * Logo, Splash screen at boot time and stand-by-screen |
||
35 | 7 | Maximilian Seesslen | * Release v2.0.0: Mode-Screen: Minutnik, Clock, StopWatch |
36 | 6 | Maximilian Seesslen | |
37 | 7 | Maximilian Seesslen | h2. Example: CANDis |
38 | 1 | Maximilian Seesslen | |
39 | 7 | Maximilian Seesslen | * Main screen |
40 | 10 | Maximilian Seesslen | ** Button for Light, Sensemux-Diagram, Activity (TV, Musik, Solder, Off), Miniminutnik |
41 | 7 | Maximilian Seesslen | ** Header with Clock |
42 | 8 | Maximilian Seesslen | * Light-Screen |
43 | ** Power-Widget |
||
44 | ** Ok-Button |
||
45 | 7 | Maximilian Seesslen | * Clock-Screen (Screen saver) |
46 | 9 | Maximilian Seesslen | ** Clock, Date, Temperature, Quick-Access-Buttons |
47 | 18 | Maximilian Seesslen | |
48 | h2. Pointers |
||
49 | |||
50 | Like in Qt an widget has an parent. |
||
51 | |||
52 | h2. Single App class vs. Screens |
||
53 | |||
54 | Having everything in an single class may be confusing. It may be split to per-Screen-classes. |
||
55 | 19 | Maximilian Seesslen | <pre><code class="cpp"> |
56 | 18 | Maximilian Seesslen | |
57 | 22 | Maximilian Seesslen | class Ocelli |
58 | { |
||
59 | OScreen *currentScreen; |
||
60 | OScreen *previousScreen; |
||
61 | public: |
||
62 | setCurrentScreen(OScreen *screen); |
||
63 | 23 | Maximilian Seesslen | setPreviousScreen(); |
64 | 22 | Maximilian Seesslen | } |
65 | 1 | Maximilian Seesslen | |
66 | 23 | Maximilian Seesslen | class CApp: Ocelli |
67 | 18 | Maximilian Seesslen | { |
68 | public: |
||
69 | 21 | Maximilian Seesslen | // OScreen *screens[3]; |
70 | 22 | Maximilian Seesslen | int |
71 | 21 | Maximilian Seesslen | CApp() |
72 | { |
||
73 | addScreen(new ); |
||
74 | } |
||
75 | 1 | Maximilian Seesslen | } |
76 | |||
77 | 23 | Maximilian Seesslen | class CScreenMain: public OScreen |
78 | 18 | Maximilian Seesslen | { |
79 | 20 | Maximilian Seesslen | CApp &app; |
80 | OButton buttonAddTimer; |
||
81 | 1 | Maximilian Seesslen | public: |
82 | 20 | Maximilian Seesslen | CScreenMain() |
83 | buttonAddTimer(this) |
||
84 | { |
||
85 | } |
||
86 | 18 | Maximilian Seesslen | addItemPressed() |
87 | { |
||
88 | 1 | Maximilian Seesslen | app.switchScreen( eDesktopItems ); |
89 | 18 | Maximilian Seesslen | } |
90 | 22 | Maximilian Seesslen | } |
91 | 23 | Maximilian Seesslen | class CScreenMain: public OScreen |
92 | 22 | Maximilian Seesslen | { |
93 | CApp &app; |
||
94 | 18 | Maximilian Seesslen | } |
95 | 19 | Maximilian Seesslen | </code></pre> |