trikRuntime
updateWidget.h
Go to the documentation of this file.
1 /* Copyright 2014 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/QWidget>
21  #include <QtGui/QHBoxLayout>
22  #include <QtGui/QLabel>
23 #else
24  #include <QtWidgets/QWidget>
25  #include <QtWidgets/QHBoxLayout>
26  #include <QtWidgets/QLabel>
27 #endif
28 
29 #include "trikGuiDialog.h"
30 
31 namespace trikGui {
32 
35 {
36  Q_OBJECT
37 
38 public:
41  explicit UpdateWidget(QWidget *parent = 0);
42 
44  ~UpdateWidget();
45 
47  static QString menuEntry();
48 
49  int exec() override;
50 
51 public slots:
52  void renewFocus() override;
53 
54 private:
55  void showStatus(const QString &text, bool isError = false);
56 
58  QHBoxLayout mLayout;
59 
60  QLabel mStatusLabel;
61 };
62 
63 }
int exec() override
Show widget and wait until it will be closed.
Definition: updateWidget.cpp:63
Widget that allows to update a TrikRuntime.
Definition: updateWidget.h:34
UpdateWidget(QWidget *parent=0)
Constructor.
Definition: updateWidget.cpp:23
Base class for all trikGui dialog widgets.
Definition: trikGuiDialog.h:24
~UpdateWidget()
Destructor.
Definition: updateWidget.cpp:38
Definition: abstractIndicator.h:21
static QString menuEntry()
String that shall appear in menu for this widget.
Definition: updateWidget.cpp:46
void renewFocus() override
Definition: updateWidget.cpp:42