1 /** -*- mode: c++ ; c-basic-offset: 2 -*-
2  * @file   ConstParameter.cpp
3  * @author Sebastien Fourey
4  * @date   Nov 2014
5  *
6  * @brief  Declaration of the class ConstParameter
7  *
8  * This file is part of the ZArt software's source code.
9  *
10  * Copyright Sebastien Fourey / GREYC Ensicaen (2010-...)
11  *
12  *                    https://foureys.users.greyc.fr/
13  *
14  * This software is a computer program whose purpose is to demonstrate
15  * the possibilities of the GMIC image processing language by offering the
16  * choice of several manipulations on a video stream acquired from a webcam. In
17  * other words, ZArt is a GUI for G'MIC real-time manipulations on the output
18  * of a webcam.
19  *
20  * This software is governed by the CeCILL  license under French law and
21  * abiding by the rules of distribution of free software.  You can  use,
22  * modify and/ or redistribute the software under the terms of the CeCILL
23  * license as circulated by CEA, CNRS and INRIA at the following URL
24  * "http://www.cecill.info". See also the directory "Licence" which comes
25  * with this source code for the full text of the CeCILL license.
26  *
27  * As a counterpart to the access to the source code and  rights to copy,
28  * modify and redistribute granted by the license, users are provided only
29  * with a limited warranty  and the software's author,  the holder of the
30  * economic rights,  and the successive licensors  have only  limited
31  * liability.
32  *
33  * In this respect, the user's attention is drawn to the risks associated
34  * with loading,  using,  modifying and/or developing or reproducing the
35  * software by the user in light of its specific status of free software,
36  * that may mean  that it is complicated to manipulate,  and  that  also
37  * therefore means  that it is reserved for developers  and  experienced
38  * professionals having in-depth computer knowledge. Users are therefore
39  * encouraged to load and test the software's suitability as regards their
40  * requirements in conditions enabling the security of their systems and/or
41  * data to be ensured and,  more generally, to use and operate it in the
42  * same conditions as regards security.
43  *
44  * The fact that you are presently reading this means that you have had
45  * knowledge of the CeCILL license and that you accept its terms.
46  */
47 #include "ConstParameter.h"
48 #include <QString>
49 #include "Common.h"
50 
ConstParameter(QDomNode node,QObject * parent)51 ConstParameter::ConstParameter(QDomNode node, QObject * parent) : AbstractParameter(parent)
52 {
53   _value = node.attributes().namedItem("value").nodeValue();
54 }
55 
~ConstParameter()56 ConstParameter::~ConstParameter() {}
57 
isVisible() const58 bool ConstParameter::isVisible() const
59 {
60   return false;
61 }
62 
addTo(QWidget *,int)63 void ConstParameter::addTo(QWidget *, int) {}
64 
textValue() const65 QString ConstParameter::textValue() const
66 {
67   return QString("%1").arg(_value);
68 }
69 
setValue(const QString & value)70 void ConstParameter::setValue(const QString & value)
71 {
72   _value = value;
73 }
74 
reset()75 void ConstParameter::reset() {}
76 
saveValueInDOM()77 void ConstParameter::saveValueInDOM() {}
78