PlotLegendConfigWidget.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2015 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
19 #include <ui_PlotLegendConfigWidget.h>
20 
22 
23 namespace rqt_multiplot {
24 
25 /*****************************************************************************/
26 /* Constructors and Destructor */
27 /*****************************************************************************/
28 
30  QWidget(parent),
31  ui_(new Ui::PlotLegendConfigWidget()),
32  config_(0) {
33  ui_->setupUi(this);
34 
35  connect(ui_->checkBoxVisible, SIGNAL(stateChanged(int)),
36  this, SLOT(checkBoxVisibleStateChanged(int)));
37 }
38 
40  delete ui_;
41 }
42 
43 /*****************************************************************************/
44 /* Accessors */
45 /*****************************************************************************/
46 
48  if (config != config_) {
49  if (config_) {
50  disconnect(config_, SIGNAL(visibleChanged(bool)),
51  this, SLOT(configVisibleChanged(bool)));
52  }
53 
54  config_ = config;
55 
56  if (config) {
57  connect(config, SIGNAL(visibleChanged(bool)),
58  this, SLOT(configVisibleChanged(bool)));
59 
61  }
62  }
63 }
64 
66  return config_;
67 }
68 
69 /*****************************************************************************/
70 /* Slots */
71 /*****************************************************************************/
72 
74  ui_->checkBoxVisible->setCheckState(visible ? Qt::Checked :
75  Qt::Unchecked);
76 }
77 
79  if (config_)
80  config_->setVisible(state == Qt::Checked);
81 }
82 
83 }


rqt_multiplot
Author(s): Ralf Kaestner
autogenerated on Wed Jul 10 2019 03:49:44