LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
dimensionsmain.h
Go to the documentation of this file.
1 /* @@@LICENSE
2 *
3 * Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * LICENSE@@@ */
18 
19 
20 
21 
22 #ifndef DIMENSIONSMAIN_H_
23 #define DIMENSIONSMAIN_H_
24 
25 #include "dimensionstypes.h"
26 #include "quicklaunchbar.h"
27 #include "Window.h"
28 #include <QPointer>
29 #include <QMap>
30 #include <QUuid>
31 
32 namespace DimensionsSystemInterface
33 {
34 class ExternalApp;
35 class WebOSApp;
36 class PageSaver;
37 class PageRestore;
38 }
39 
40 class LauncherObject;
41 class TextBox;
42 
43 class DimensionsUI : public Window
44 {
45  Q_OBJECT
46  Q_INTERFACES(QGraphicsItem)
47 
48 public:
49 
50  friend class LauncherObject; //to keep from having to write passthru's; DimensionsUI is just a wrapper for LauncherObject anyways
51 
52  //TODO: should make this return a const obj, and assure all functions that are useful to the outside are const as well
53  // or, DimensionsUI could be a proper singleton...but that precludes some eeeevil, advanced ideas I have for it....
54  static DimensionsUI * primaryInstance();
55 
56  DimensionsUI(quint32 width,quint32 height);
57  virtual ~DimensionsUI();
58 
59  virtual void resize(int w, int h);
60 
61  QRectF geometry() const;
62 
63  static LauncherObject * launcher();
64 
65 public Q_SLOTS:
66 
69  void slotLauncherFullyOpen();
70  void slotLauncherFullyClosed(bool reCreate=false);
71 
72  void slotDestroyLauncher();
73  void slotCreateLauncher();
74  void slotReCreateLauncher();
75 
76 Q_SIGNALS:
77  void signalReady();
78  void signalNotReady();
79 
82 
83  void signalDropIconOnQuicklaunch(const QString&);
84 
89 
90 protected:
91 
92  void setupProxySignals();
93 
94  QRectF quickLaunchArea() const;
95  QPointF quickLaunchPosition() const;
96 
97 protected:
98  static QPointer<DimensionsUI> s_qp_primaryInstance;
99  static QPointer<LauncherObject> s_qp_primaryLauncher;
100 
102 };
103 
104 
105 
106 
107 
108 class Quicklauncher : public Window
109 {
110  Q_OBJECT
111  Q_INTERFACES(QGraphicsItem)
113 
114 public:
115  friend class QuickLaunchBar;
116 
117  static Quicklauncher * primaryInstance();
118  Quicklauncher(quint32 width,quint32 height);
119  virtual ~Quicklauncher();
120 
121  virtual void resize(int w, int h);
122 
123  virtual QRectF geometry() const;
124  virtual int normalHeight() const;
125 
126  static QuickLaunchBar * quickLaunchBar();
127 
128  virtual void save();
129  virtual void restore();
130 
131  //property 'backgroundTransparency'
132  qreal backgroundOpacity() const { return m_bgOpacity; }
133  void setBackgroundOpacity(const qreal& v);
134 
135  void setHighlightAt(int x, int y);
136  void removeHighlight();
137 
138 public Q_SLOTS:
139 
143 
144 Q_SIGNALS:
145  void signalReady();
146  void signalNotReady();
147 
150 
151 protected:
152 
153  void setupProxySignals();
154 
155 protected:
156  qreal m_bgOpacity;
157 
158  static QPointer<Quicklauncher> s_qp_primaryInstance;
159  static QPointer<QuickLaunchBar> s_qp_primaryQuickLaunchBar;
160 
162 
163 
164 };
165 
166 #endif /* DIMENSIONSMAIN_H_ */