File indexing completed on 2024-04-28 05:50:44

0001 /*
0002     This source file is part of Konsole, a terminal emulator.
0003 
0004     SPDX-FileCopyrightText: 2007-2008 Robert Knight <robertknight@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef PROFILECOMMANDPARSER_H
0010 #define PROFILECOMMANDPARSER_H
0011 
0012 // Konsole
0013 #include "Profile.h"
0014 
0015 class QVariant;
0016 template<typename, typename>
0017 class QHash;
0018 
0019 namespace Konsole
0020 {
0021 /**
0022  * Parses an input string consisting of property names
0023  * and assigned values and returns a table of properties
0024  * and values.
0025  *
0026  * The input string will typically look like this:
0027  *
0028  * @code
0029  *   PropertyName=Value;PropertyName=Value ...
0030  * @endcode
0031  *
0032  * For example:
0033  *
0034  * @code
0035  *   Icon=konsole;Directory=/home/bob
0036  * @endcode
0037  */
0038 class KONSOLEPRIVATE_EXPORT ProfileCommandParser
0039 {
0040 public:
0041     /**
0042      * Parses an input string consisting of property names
0043      * and assigned values and returns a table of
0044      * properties and values.
0045      */
0046     Profile::PropertyMap parse(const QString &input);
0047 };
0048 }
0049 
0050 #endif