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
33 #include <VisionX/interface/core/ImageProviderInterface.h>
34 #include <VisionX/gui-plugins/ImageRecorder/ui_ChannelConfigWidget.h>
36 
37 
38 namespace visionx
39 {
40 
41  class ChannelConfigWidget : public QWidget
42  {
43 
44  Q_OBJECT
45 
46  private:
47 
48  Ui::channel_config_widget m_widget;
49  std::string m_channel_name;
50  visionx::imrec::ChannelPreferences m_channel_prefs;
51 
52  public:
53 
54  ChannelConfigWidget(QWidget* parent, const visionx::imrec::ChannelConfig& channel_config, const visionx::imrec::ChannelPreferences& channel_prefs);
55 
56  virtual ~ChannelConfigWidget();
57 
58  const std::string& getChannelName() const;
59 
60  void confirmChannelName(const std::string& new_name);
61 
62  void rejectChannelName(const std::string& new_name);
63 
64  void setChannelPreferences(const imrec::ChannelPreferences& channel_prefs);
65 
66  imrec::ChannelConfig toChannelConfig(bool disabled) const;
67 
68  private:
69 
70  void update_file_formats(bool require_lossless);
71 
72  void set_visible_file_fps(const QString& format_str);
73 
74  void set_visible_file_fps(bool visible);
75 
76  signals:
77 
78  void channelRenamed(const std::string& old_name, const std::string& new_name);
79 
80  private slots:
81 
82  void channel_name_changed(const QString& new_name);
83 
84  void lossless_state_changed(int state);
85 
86  void file_format_changed(const QString& new_format_str);
87 
88  };
89 
90 }
visionx
ArmarX headers.
Definition: OpenPoseStressTest.h:38
visionx::ChannelConfigWidget::toChannelConfig
imrec::ChannelConfig toChannelConfig(bool disabled) const
Definition: ChannelConfigWidget.cpp:103
visionx::ChannelConfigWidget::getChannelName
const std::string & getChannelName() const
Definition: ChannelConfigWidget.cpp:73
visionx::ChannelConfigWidget
Definition: ChannelConfigWidget.h:41
visionx::ChannelConfigWidget::ChannelConfigWidget
ChannelConfigWidget(QWidget *parent, const visionx::imrec::ChannelConfig &channel_config, const visionx::imrec::ChannelPreferences &channel_prefs)
Definition: ChannelConfigWidget.cpp:36
visionx::ChannelConfigWidget::~ChannelConfigWidget
virtual ~ChannelConfigWidget()
Definition: ChannelConfigWidget.cpp:66
visionx::ChannelConfigWidget::rejectChannelName
void rejectChannelName(const std::string &new_name)
Definition: ChannelConfigWidget.cpp:88
visionx::ChannelConfigWidget::channelRenamed
void channelRenamed(const std::string &old_name, const std::string &new_name)
ImageRecorderWidgetController.h
visionx::ChannelConfigWidget::setChannelPreferences
void setChannelPreferences(const imrec::ChannelPreferences &channel_prefs)
Definition: ChannelConfigWidget.cpp:96
visionx::ChannelConfigWidget::confirmChannelName
void confirmChannelName(const std::string &new_name)
Definition: ChannelConfigWidget.cpp:80