File indexing completed on 2024-05-12 05:07:58
0001 /* 0002 SPDX-FileCopyrightText: 2009-2010 Cristian Oneț <onet.cristian@gmail.com> 0003 SPDX-FileCopyrightText: 2009-2010 Alvaro Soliverez <asoliverez@gmail.com> 0004 SPDX-FileCopyrightText: 2011-2017 Thomas Baumgart <tbaumgart@kde.org> 0005 SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KMYMONEYPAYEECOMBO_H 0010 #define KMYMONEYPAYEECOMBO_H 0011 0012 #include "kmm_base_widgets_export.h" 0013 0014 // ---------------------------------------------------------------------------- 0015 // QT Includes 0016 0017 // ---------------------------------------------------------------------------- 0018 // KDE Includes 0019 0020 // ---------------------------------------------------------------------------- 0021 // Project Includes 0022 0023 #include "kmymoneymvccombo.h" 0024 0025 class MyMoneyPayee; 0026 0027 /** 0028 * This class implements a text based payee selector. 0029 * When initially used, the widget has the functionality of a KComboBox object. 0030 * Whenever a key is pressed, the set of loaded payees is searched for 0031 * payees names which match the currently entered text. 0032 * 0033 * If any match is found a list selection box is opened and the user can use 0034 * the up/down, page-up/page-down keys or the mouse to navigate in the list. If 0035 * a payee is selected, the selection box is closed. Other key-strokes are 0036 * directed to the parent object to manipulate the text. The visible contents of 0037 * the selection box is updated with every key-stroke. 0038 * 0039 * This object is a replacement of the KMyMoneyPayee object and should be used 0040 * for new code. 0041 * 0042 * @author Thomas Baumgart 0043 */ 0044 class KMM_BASE_WIDGETS_EXPORT KMyMoneyPayeeCombo : public KMyMoneyMVCCombo 0045 { 0046 Q_OBJECT 0047 Q_DISABLE_COPY(KMyMoneyPayeeCombo) 0048 0049 public: 0050 explicit KMyMoneyPayeeCombo(QWidget* parent = nullptr); 0051 ~KMyMoneyPayeeCombo() override; 0052 0053 void loadPayees(const QList<MyMoneyPayee>& list); 0054 }; 0055 0056 #endif