File indexing completed on 2024-04-28 05:49:55

0001 //  SPDX-FileCopyrightText: 1998-2005 Matthias Hoelzer <oelzer@physik.uni-wuerzburg.de>
0002 //
0003 //  SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 #ifndef KLISTBOXDIALOG_H
0006 #define KLISTBOXDIALOG_H
0007 
0008 #include <QDialog>
0009 
0010 #include <QListWidget>
0011 
0012 class QLabel;
0013 
0014 class KListBoxDialog : public QDialog
0015 {
0016     Q_OBJECT
0017 
0018 public:
0019 
0020     explicit KListBoxDialog(const QString &text, QWidget *parent = nullptr);
0021     ~KListBoxDialog() override
0022     {
0023     }
0024 
0025     QListWidget &getTable()
0026     {
0027         return *table;
0028     }
0029 
0030     void insertItem(const QString &text);
0031     void setCurrentItem(const QString &text);
0032     int currentItem() const;
0033 
0034 protected:
0035 
0036     QListWidget *table;
0037     QLabel *label;
0038 };
0039 
0040 #endif