1 /******************************************************************************
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
15 #ifndef _INPUTSTRING_H
16 #define _INPUTSTRING_H
22 #include <QStringList>
30 class InputString : public QObject, public Input
35 enum StringMode { StringFree=0,
42 InputString( QGridLayout *layout,int &row,
43 const QString &id, const QString &s,
46 const QString &absPath = QString() );
48 void addValue(QString s);
54 Kind kind() const { return String; }
55 QString docs() const { return m_docs; }
56 QString id() const { return m_id; }
57 QString templateDocs() const { return m_tdocs; }
58 void addDependency(Input *) { Q_ASSERT(false); }
59 void setEnabled(bool);
60 void updateDependencies() {}
61 void writeValue(QTextStream &t,QTextCodec *codec);
62 void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
66 void setValue(const QString&);
70 void showHelp(Input *);