ChannelConfigWidget.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 VisionX::gui-plugins::ImageRecorder
19 * @author Christian R. G. Dreher <c.dreher@kit.edu>
20 * @date 2020
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25
26#pragma once
27
28
29// Qt
30#include <QWidget>
31
32// ArmarX
34#include <VisionX/gui-plugins/ImageRecorder/ui_ChannelConfigWidget.h>
35#include <VisionX/interface/core/ImageProviderInterface.h>
36
37namespace visionx
38{
39
40 class ChannelConfigWidget : public QWidget
41 {
42
43 Q_OBJECT
44
45 private:
46 Ui::channel_config_widget m_widget;
47 std::string m_channel_name;
48 visionx::imrec::ChannelPreferences m_channel_prefs;
49
50 public:
51 ChannelConfigWidget(QWidget* parent,
52 const visionx::imrec::ChannelConfig& channel_config,
53 const visionx::imrec::ChannelPreferences& channel_prefs);
54
55 virtual ~ChannelConfigWidget();
56
57 const std::string& getChannelName() const;
58
59 void confirmChannelName(const std::string& new_name);
60
61 void rejectChannelName(const std::string& new_name);
62
63 void setChannelPreferences(const imrec::ChannelPreferences& channel_prefs);
64
65 imrec::ChannelConfig toChannelConfig(bool disabled) const;
66
67 private:
68 void update_file_formats(bool require_lossless);
69
70 void set_visible_file_fps(const QString& format_str);
71
72 void set_visible_file_fps(bool visible);
73
74 signals:
75
76 void channelRenamed(const std::string& old_name, const std::string& new_name);
77
78 private slots:
79
80 void channel_name_changed(const QString& new_name);
81
82 void lossless_state_changed(int state);
83
84 void file_format_changed(const QString& new_format_str);
85 };
86
87} // namespace visionx
void channelRenamed(const std::string &old_name, const std::string &new_name)
imrec::ChannelConfig toChannelConfig(bool disabled) const
ChannelConfigWidget(QWidget *parent, const visionx::imrec::ChannelConfig &channel_config, const visionx::imrec::ChannelPreferences &channel_prefs)
void rejectChannelName(const std::string &new_name)
void setChannelPreferences(const imrec::ChannelPreferences &channel_prefs)
void confirmChannelName(const std::string &new_name)
const std::string & getChannelName() const
ArmarX headers.