4 * Copyright (c) 2001, 2002, 2003, 2004 Frerich Raabe <raabe@kde.org>
6 * This program is distributed in the hope that it will be useful, but WITHOUT
7 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
8 * FOR A PARTICULAR PURPOSE. For licensing and distribution details, check the
9 * accompanying file 'COPYING'.
11 #ifndef LIBRSS_TEXTINPUT_H
12 #define LIBRSS_TEXTINPUT_H
24 * Represents a text input facility as stored in a RSS file for the purpose
25 * of allowing users to submit queries back to the publisher's site. You
26 * don't have to instantiate one of these yourself, the common way to access
27 * instances is via Document::textInput().
28 * @see Document::textInput()
34 * Default constructor.
40 * @param other The TextInput object to copy.
42 TextInput(const TextInput
&other
);
45 * Constructs a TextInput from a piece of RSS markup.
46 * @param node A QDomNode which references the DOM leaf to be used
47 * for constructing the TextInput.
49 TextInput(const QDomNode
&node
);
52 * Assignment operator.
53 * @param other The TextInput object to clone.
54 * @return A reference to the cloned TextInput object.
56 TextInput
&operator=(const TextInput
&other
);
59 * Compares two text inputs. Two text inputs are considered
60 * identical if their properties (title, description, link etc.)
62 * @param other The text input to compare with.
63 * @return Whether the two text inputs are equal.
65 bool operator==(const TextInput
&other
) const;
68 * Convenience method. Simply calls !operator==().
69 * @param other The text input to compared with.
70 * @return Whether the two text inputs are unequal.
72 bool operator!=(const TextInput
&other
) const { return !operator==(other
); }
80 * RSS 0.90 and upwards
81 * @return The title (often a label to be used for the input field)
82 * of the text input, or QString::null if no title is available.
84 QString
title() const;
87 * RSS 0.90 and upwards
88 * @return The description (usually used as a tooltip which appears
89 * if the mouse hovers above the input field for a short time) of
90 * the text input, or QString::null if no description is
93 QString
description() const;
96 * RSS 0.90 and upwards
97 * @return The name of the text input (what's this for?) of the
98 * text input, or QString::null, if no name is available.
100 QString
name() const;
103 * RSS 0.90 and upwards
104 * @return A link to which the contents of the input field should
105 * be sent after the user specified them. This is often a CGI
106 * program on a remote server which evaluates the entered
107 * information. An empty KURL is returned in case no link is
109 * Note that the RSS 0.91 Specification dictates that URLs not
110 * starting with "http://" or "ftp://" are considered invalid.
112 const KURL
&link() const;
120 #endif // LIBRSS_TEXTINPUT_H