trikRuntime
trikGuiDialog.h
Go to the documentation of this file.
1 /* Copyright 2014 - 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/QEventLoop>
18 
19 #include "mainWidget.h"
20 
21 namespace trikGui {
22 
24 class TrikGuiDialog : public MainWidget
25 {
26  Q_OBJECT
27 
28 public:
31  explicit TrikGuiDialog(QWidget *parent = 0);
32 
33  virtual ~TrikGuiDialog() {}
34 
35  enum Result {
38  };
39 
43  virtual int exec();
44 
45 protected:
46  virtual void keyPressEvent(QKeyEvent *event);
47 
48  virtual void exit();
49 
50  virtual void goHome();
51 
52 private:
53  QEventLoop mEventLoop;
54 };
55 
56 }
Abstract class for widgets which will be used for conversation with user.
Definition: mainWidget.h:28
TrikGuiDialog(QWidget *parent=0)
Constructor.
Definition: trikGuiDialog.cpp:21
Base class for all trikGui dialog widgets.
Definition: trikGuiDialog.h:24
Definition: abstractIndicator.h:21
virtual void goHome()
Definition: trikGuiDialog.cpp:56
Result
Definition: trikGuiDialog.h:35
Definition: trikGuiDialog.h:37
virtual void exit()
Definition: trikGuiDialog.cpp:50
Definition: trikGuiDialog.h:36
virtual int exec()
Show widget and wait until it will be closed.
Definition: trikGuiDialog.cpp:26
virtual void keyPressEvent(QKeyEvent *event)
Definition: trikGuiDialog.cpp:32
virtual ~TrikGuiDialog()
Definition: trikGuiDialog.h:33