libyui-qt
YQMultiLineEdit.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: YQMultiLineEdit.h
20 
21  Author: Stefan Hundhammer <shundhammer@suse.de>
22 
23 /-*/
24 
25 
26 #ifndef YQMultiLineEdit_h
27 #define YQMultiLineEdit_h
28 
29 #include <QFrame>
30 #include <yui/YMultiLineEdit.h>
31 
32 class YQWidgetCaption;
33 class QTextEdit;
34 
35 
39 class YQMultiLineEdit : public QFrame, public YMultiLineEdit
40 {
41  Q_OBJECT
42 
43 public:
47  YQMultiLineEdit( YWidget * parent, const std::string & label );
48 
52  virtual ~YQMultiLineEdit();
53 
60  virtual std::string value();
61 
68  virtual void setValue( const std::string & text );
69 
75  virtual void setLabel( const std::string & label );
76 
83  virtual void setInputMaxLength( int numberOfChars );
84 
90  virtual void setEnabled( bool enabled );
91 
97  virtual int preferredWidth();
98 
104  virtual int preferredHeight();
105 
111  virtual void setSize( int newWidth, int newHeight );
112 
116  virtual bool setKeyboardFocus();
117 
118 
119 protected slots:
120 
124  void changed();
125 
135  void enforceMaxInputLength();
136 
137 
138 protected:
139 
140  YQWidgetCaption * _caption;
141  QTextEdit * _qt_textEdit;
142 };
143 
144 
145 #endif // YQMultiLineEdit_h
void changed()
Definition: YQMultiLineEdit.cc:120
virtual std::string value()
Definition: YQMultiLineEdit.cc:78
virtual void setEnabled(bool enabled)
Definition: YQMultiLineEdit.cc:129
Definition: YQMultiLineEdit.h:39
virtual void setValue(const std::string &text)
Definition: YQMultiLineEdit.cc:84
virtual int preferredWidth()
Definition: YQMultiLineEdit.cc:137
virtual ~YQMultiLineEdit()
Definition: YQMultiLineEdit.cc:72
Definition: YQWidgetCaption.h:38
virtual void setInputMaxLength(int numberOfChars)
Definition: YQMultiLineEdit.cc:99
virtual bool setKeyboardFocus()
Definition: YQMultiLineEdit.cc:161
virtual void setSize(int newWidth, int newHeight)
Definition: YQMultiLineEdit.cc:155
void enforceMaxInputLength()
Definition: YQMultiLineEdit.cc:113
virtual void setLabel(const std::string &label)
Definition: YQMultiLineEdit.cc:92
virtual int preferredHeight()
Definition: YQMultiLineEdit.cc:143
YQMultiLineEdit(YWidget *parent, const std::string &label)
Definition: YQMultiLineEdit.cc:43