MessageFieldLineEdit.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 <QCompleter>
20 
22 
24 
25 namespace rqt_multiplot {
26 
27 /*****************************************************************************/
28 /* Constructors and Destructor */
29 /*****************************************************************************/
30 
32  QLineEdit(parent),
33  completer_(new MessageFieldCompleter(this)),
34  completerModel_(new MessageFieldItemModel(this)) {
35  completer_->setModel(completerModel_);
36  setCompleter(completer_);
37 
38  connect(this, SIGNAL(editingFinished()), this, SLOT(editingFinished()));
39 }
40 
42 }
43 
44 /*****************************************************************************/
45 /* Accessors */
46 /*****************************************************************************/
47 
49  MessageDataType& dataType) {
51 }
52 
56 }
57 
58 void MessageFieldLineEdit::setCurrentField(const QString& field) {
59  if (field != currentField_) {
60  currentField_ = field;
61 
62  setText(field);
63 
65  }
66 }
67 
69  return currentField_;
70 }
71 
75 }
76 
79 }
80 
81 /*****************************************************************************/
82 /* Slots */
83 /*****************************************************************************/
84 
86  setCurrentField(text());
87 }
88 
89 }
variant_topic_tools::DataType getCurrentFieldDataType() const
variant_topic_tools::MessageDataType getMessageDataType() const
void setCurrentField(const QString &field)
void currentFieldChanged(const QString &field)
void setMessageDataType(const variant_topic_tools::MessageDataType &dataType)
variant_topic_tools::DataType getFieldDataType(const QString &field) const
void setMessageDataType(const variant_topic_tools::MessageDataType &dataType)
variant_topic_tools::MessageDataType getMessageDataType() const


rqt_multiplot_plugin
Author(s): Ralf Kaestner
autogenerated on Fri Jan 15 2021 03:47:53