trikRuntime
lazyMainWidgetWrapper.h
Go to the documentation of this file.
1 /* Copyright 2015 CyberTech Labs Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License. */
14 
15 #pragma once
16 
17 #include <QtCore/qglobal.h>
18 
19 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
20  #include <QtGui/QHBoxLayout>
21 #else
22  #include <QtWidgets/QHBoxLayout>
23 #endif
24 
26 
27 #include "lazyMainWidget.h"
28 
29 namespace trikGui {
30 
33 {
34  Q_OBJECT
35 
36 public:
40  LazyMainWidgetWrapper(trikControl::DisplayWidgetInterface *wrappedWidget, QWidget *parent = nullptr);
41 
42  ~LazyMainWidgetWrapper() override;
43  void renewFocus() override;
44 
45 private slots:
47  void emitShowMe();
48 
49 private:
52  QWidget * const mWrappedWidget;
53 
56  QHBoxLayout * const mLayout;
57 };
58 }
59 
Interface for widget on which Brick draws its graphics. Can notify when it shows or hides itself...
Definition: displayWidgetInterface.h:30
~LazyMainWidgetWrapper() override
Definition: lazyMainWidgetWrapper.cpp:35
Wrapper that adapts DisplayWidgetInterface to LazyMainWidget.
Definition: lazyMainWidgetWrapper.h:32
Definition: abstractIndicator.h:21
LazyMainWidgetWrapper(trikControl::DisplayWidgetInterface *wrappedWidget, QWidget *parent=nullptr)
Constructor.
Definition: lazyMainWidgetWrapper.cpp:21
void renewFocus() override
Set focus properly on this widget or one of its children.
Definition: lazyMainWidgetWrapper.cpp:30
Abstract class for widgets which will be used for conversation with user (but when it doesn&#39;t want to...
Definition: lazyMainWidget.h:31