libyui
 
Loading...
Searching...
No Matches
YSimpleInputField.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YSimpleInputField.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YSimpleInputField_h
26#define YSimpleInputField_h
27
28#include "YWidget.h"
29
31
32
38{
39protected:
43 YSimpleInputField( YWidget * parent, const std::string & label );
44
45public:
49 virtual ~YSimpleInputField();
50
57 virtual std::string value() = 0;
58
65 virtual void setValue( const std::string & text ) = 0;
66
70 std::string label() const;
71
78 virtual void setLabel( const std::string & label );
79
90 virtual bool setProperty( const std::string & propertyName,
91 const YPropertyValue & val );
92
99 virtual YPropertyValue getProperty( const std::string & propertyName );
100
107 virtual const YPropertySet & propertySet();
108
114 virtual std::string shortcutString() const { return label(); }
115
121 virtual void setShortcutString( const std::string & str )
122 { setLabel( str ); }
123
128 const char * userInputProperty() { return YUIProperty_Value; }
129
130
131private:
132
134};
135
136
137#endif // YSimpleInputField_h
Definition ImplPtr.h:43
Definition YProperty.h:198
Definition YProperty.h:105
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YSimpleInputField.cc:114
virtual const YPropertySet & propertySet()
Definition YSimpleInputField.cc:78
YSimpleInputField(YWidget *parent, const std::string &label)
Definition YSimpleInputField.cc:47
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YSimpleInputField.cc:98
virtual void setShortcutString(const std::string &str)
Definition YSimpleInputField.h:121
virtual void setLabel(const std::string &label)
Definition YSimpleInputField.cc:70
const char * userInputProperty()
Definition YSimpleInputField.h:128
virtual std::string shortcutString() const
Definition YSimpleInputField.h:114
virtual void setValue(const std::string &text)=0
std::string label() const
Definition YSimpleInputField.cc:64
virtual std::string value()=0
virtual ~YSimpleInputField()
Definition YSimpleInputField.cc:58
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YSimpleInputField.cc:36