1 /*
2     This source file is part of Konsole, a terminal emulator.
3 
4     SPDX-FileCopyrightText: 2007-2008 Robert Knight <robertknight@gmail.com>
5 
6     SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 
9 #ifndef PROFILECOMMANDPARSER_H
10 #define PROFILECOMMANDPARSER_H
11 
12 // Konsole
13 #include "Profile.h"
14 #include "konsoleprofile_export.h"
15 
16 class QVariant;
17 template<typename, typename>
18 class QHash;
19 
20 namespace Konsole
21 {
22 /**
23  * Parses an input string consisting of property names
24  * and assigned values and returns a table of properties
25  * and values.
26  *
27  * The input string will typically look like this:
28  *
29  * @code
30  *   PropertyName=Value;PropertyName=Value ...
31  * @endcode
32  *
33  * For example:
34  *
35  * @code
36  *   Icon=konsole;Directory=/home/bob
37  * @endcode
38  */
39 class KONSOLEPROFILE_EXPORT ProfileCommandParser
40 {
41 public:
42     /**
43      * Parses an input string consisting of property names
44      * and assigned values and returns a table of
45      * properties and values.
46      */
47     QHash<Profile::Property, QVariant> parse(const QString &input);
48 };
49 }
50 
51 #endif
52