File indexing completed on 2024-05-05 05:46:19
0001 /*************************************************************************** 0002 * Copyright (C) 2006 David Saxton <david@bluehaze.org> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify * 0005 * it under the terms of the GNU General Public License as published by * 0006 * the Free Software Foundation; either version 2 of the License, or * 0007 * (at your option) any later version. * 0008 ***************************************************************************/ 0009 0010 #ifndef COMPONENTMODELWIDGET_H 0011 #define COMPONENTMODELWIDGET_H 0012 0013 #include <KLineEdit> 0014 0015 class Component; 0016 class QListWidget; 0017 0018 /** 0019 @author David Saxton 0020 */ 0021 class ComponentModelWidget : public QWidget 0022 { 0023 Q_OBJECT 0024 public: 0025 ComponentModelWidget(QWidget *parent = nullptr); 0026 ~ComponentModelWidget() override; 0027 /** 0028 * Clears the list of component models. 0029 */ 0030 void reset(); 0031 /** 0032 * Fills the list with models appropriate for the given component. 0033 */ 0034 void init(Component *component); 0035 0036 public slots: 0037 /** 0038 * The filter is applied against the list of component model names. 0039 */ 0040 void setFilter(const QString &filter); 0041 0042 protected: 0043 QListWidget *m_pList; 0044 KLineEdit *m_pSearchEdit; 0045 }; 0046 0047 #endif