SkillDashboardConfigWindow.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-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 ArmarXGui::gui-plugins::OperatorViewWidgetController
19 * @author Leonie Leven
20 * @date 2024
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27#include <stack>
28
29#include <QDialog>
30#include <QHBoxLayout>
31#include <QLabel>
32#include <QPushButton>
33#include <QWidget>
34
36
37// ui_SkillDashboardConfig.h is included by the .cpp, not here: moc textually inlines
38// every #include it can resolve, and parsing the uic-generated header alongside this
39// one makes moc mis-qualify this class as Ui::armarx::*.
40namespace Ui
41{
42 class SkillDashboardConfig;
43}
44
45namespace armarx
46{
47
48
49 class SkillDashboardConfigWindow : public QDialog
50 {
51 Q_OBJECT
52
53 signals:
55
56 private slots:
57 void onShortcutNameChanged();
58 void openNerdFontSearch();
59
60 public:
61 explicit SkillDashboardConfigWindow(QWidget* parent = nullptr);
63 QString getShortcutName();
64 QString getSkillId();
65 QString getIconName();
66 QString getSkillConfig();
67 void setShortcutName(const std::string& name);
68 void setSkillId(const std::string& id);
69 void setIconName(const std::string& iconName);
70 void setSkillConfig(const std::string& config);
71 void setInfoText(const std::string& info);
72
73 private:
74 Ui::SkillDashboardConfig* ui;
75 };
76
77 class MessageWidget : public QWidget
78 {
79 Q_OBJECT
80 public:
81 explicit MessageWidget(bool withShowAll, QWidget* parent = nullptr);
82 void newErrorMessage(const QString& text);
83
84 private:
85 std::stack<QString> messages;
86 QHBoxLayout* hboxLayout;
87 QLabel* label;
88 QPushButton* closeButton;
89 QPushButton* showAllButton;
90 std::vector<MessageWidget*> allMessageWidgets;
91 bool closeAllButton = false;
92 private slots:
93 void closeButtonClicked();
94 void showAllButtonClicked();
95 void closeAllButtonClicked();
96 };
97
98} // namespace armarx
void newErrorMessage(const QString &text)
MessageWidget(bool withShowAll, QWidget *parent=nullptr)
void setIconName(const std::string &iconName)
void setShortcutName(const std::string &name)
void setSkillConfig(const std::string &config)
ArmarX Headers.
This file offers overloads of toIce() and fromIce() functions for STL container types.