equal
deleted
inserted
replaced
76 |
76 |
77 /** |
77 /** |
78 * Returns the requested widget casted to correct type |
78 * Returns the requested widget casted to correct type |
79 * |
79 * |
80 * @param name Name of the widget |
80 * @param name Name of the widget |
|
81 * @param loadIfNotFound Should the widget be loaded if not found in cache. |
81 * @return Pointer to the widget |
82 * @return Pointer to the widget |
82 */ |
83 */ |
83 template<class T> |
84 template<class T> |
84 T* findWidget(const QString &name) |
85 T* findWidget(const QString &name, bool loadIfNotFound = true) |
85 { |
86 { |
86 return qobject_cast<T*>(doFindWidget(name)); |
87 return qobject_cast<T*>(doFindWidget(name, loadIfNotFound)); |
87 } |
88 } |
88 |
89 |
89 /** |
90 /** |
90 * Returns the requested object casted to correct type |
91 * Returns the requested object casted to correct type |
91 * |
92 * |
92 * @param name Name of the object |
93 * @param name Name of the object |
|
94 * @param loadIfNotFound Should the widget be loaded if not found in cache. |
93 * @return Pointer to the object |
95 * @return Pointer to the object |
94 */ |
96 */ |
95 template<class T> |
97 template<class T> |
96 T* findObject(const QString &name) |
98 T* findObject(const QString &name, bool loadIfNotFound = true) |
97 { |
99 { |
98 return qobject_cast<T*>(doFindObject(name)); |
100 return qobject_cast<T*>(doFindObject(name, loadIfNotFound)); |
99 } |
101 } |
100 |
102 |
101 /** |
103 /** |
102 * Set video services in use. |
104 * Set video services in use. |
103 */ |
105 */ |
139 |
141 |
140 /** |
142 /** |
141 * Loads widget from document. |
143 * Loads widget from document. |
142 * |
144 * |
143 * @param name, Widget name. |
145 * @param name, Widget name. |
|
146 * @param loadIfNotFound Should the widget be loaded if not found in cache. |
144 * @return QGraphicsWidget*. |
147 * @return QGraphicsWidget*. |
145 */ |
148 */ |
146 QGraphicsWidget* doFindWidget(const QString &name); |
149 QGraphicsWidget* doFindWidget(const QString &name, bool loadIfNotFound); |
147 |
150 |
148 /** |
151 /** |
149 * Loads object from document. |
152 * Loads object from document. |
150 * |
153 * |
151 * @param name, Object name. |
154 * @param name, Object name. |
152 * @return QObject*. |
155 * @return QObject*. |
153 */ |
156 */ |
154 QObject* doFindObject(const QString &name); |
157 QObject* doFindObject(const QString &name, bool loadIfNotFound); |
155 |
158 |
156 /** |
159 /** |
157 * Adds a ui section to async loading queue. |
160 * Adds a ui section to async loading queue. |
158 */ |
161 */ |
159 void addToQueue(VideoCollectionUiLoaderParam ¶m, |
162 void addToQueue(VideoCollectionUiLoaderParam ¶m, |