1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include "QtInstanceWidget.hxx"
14 #include <QtWidgets/QLineEdit>
16 class QtInstanceEntry
: public QtInstanceWidget
, public virtual weld::Entry
20 QLineEdit
* m_pLineEdit
;
23 QtInstanceEntry(QLineEdit
* pLineEdit
);
25 virtual void set_text(const OUString
& rText
) override
;
26 virtual OUString
get_text() const override
;
27 virtual void set_width_chars(int nChars
) override
;
28 virtual int get_width_chars() const override
;
29 virtual void set_max_length(int nChars
) override
;
30 virtual void select_region(int nStartPos
, int nEndPos
) override
;
31 virtual bool get_selection_bounds(int& rStartPos
, int& rEndPos
) override
;
32 virtual void replace_selection(const OUString
& rText
) override
;
33 virtual void set_position(int nCursorPos
) override
;
34 virtual int get_position() const override
;
35 virtual void set_editable(bool bEditable
) override
;
36 virtual bool get_editable() const override
;
37 virtual void set_message_type(weld::EntryMessageType eType
) override
;
38 virtual void set_placeholder_text(const OUString
& rText
) override
;
40 virtual void set_overwrite_mode(bool bOn
) override
;
41 virtual bool get_overwrite_mode() const override
;
43 virtual void set_font(const vcl::Font
& rFont
) override
;
44 virtual void set_font_color(const Color
& rColor
) override
;
46 virtual void cut_clipboard() override
;
47 virtual void copy_clipboard() override
;
48 virtual void paste_clipboard() override
;
50 virtual void set_alignment(TxtAlign eXAlign
) override
;
52 static void setMessageType(QLineEdit
& rLineEdit
, weld::EntryMessageType eType
);
55 void handleTextChanged();
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */