ShortcutDialog.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package MemoryX::gui-plugins::SceneEditor
19  * @date 2015
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 #pragma once
25 
26 #include <QDialog>
27 #include <QLineEdit>
28 
29 #include "../ShortcutTableModel.h"
30 #include "../ShortcutController.h"
31 #include "../../controller/Controller.h"
32 #include <QSortFilterProxyModel>
33 
34 namespace Ui
35 {
36  class ShortcutDialog;
37 }
38 
39 namespace gui::dialog
40 {
41  class ShortcutDialog : public QDialog
42  {
43  Q_OBJECT
44 
45  public:
46  /**
47  * Constructor
48  *
49  * Creates a new Instance of this class.
50  *
51  * @param control Pointer to Main Controller
52  * @param parent Pointer to parent Widget
53  */
54  explicit ShortcutDialog(controller::ControllerPtr control, QWidget* parent = 0);
55 
56  /**
57  * Destructor.
58  *
59  */
60  ~ShortcutDialog() override;
61 
62  /**
63  * Translates all translatable strings in this dialog.
64  */
65  void retranslate();
66 
67  private Q_SLOTS:
68  void shortcutClicked(QModelIndex index);
69  void shortcutChanged();
70 
71  private:
72  void showEvent(QShowEvent* event) override;
73  Ui::ShortcutDialog* ui;
74  QPointer<ShortcutTableModel> tableModel;
75  QPointer<QSortFilterProxyModel> proxyModel;
76  std::shared_ptr<gui::ShortcutController> shortcutController;
77  QString activeAction;
78  };
79 }
index
uint8_t index
Definition: EtherCATFrame.h:59
gui::dialog
Definition: GroupExplorerDialog.h:41
gui::dialog::ShortcutDialog
Definition: ShortcutDialog.h:41
gui::dialog::ShortcutDialog::retranslate
void retranslate()
Translates all translatable strings in this dialog.
Definition: ShortcutDialog.cpp:83
gui::dialog::ShortcutDialog::ShortcutDialog
ShortcutDialog(controller::ControllerPtr control, QWidget *parent=0)
Constructor.
Definition: ShortcutDialog.cpp:30
Ui
ArmarX Headers.
Definition: ArmarXMainWindow.h:54
controller::ControllerPtr
std::shared_ptr< Controller > ControllerPtr
Definition: ClassDefinitions.h:41
gui::dialog::ShortcutDialog::~ShortcutDialog
~ShortcutDialog() override
Destructor.
Definition: ShortcutDialog.cpp:51
control
This file is part of ArmarX.