File indexing completed on 2024-04-28 16:44:26

0001 /*  This file is part of the KDE project
0002     SPDX-FileCopyrightText: 2000 David Faure <faure@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef __kserviceselectdlg_h
0008 #define __kserviceselectdlg_h
0009 
0010 #include <QDialog>
0011 #include <QListWidget>
0012 
0013 #include <kservice.h>
0014 
0015 class QDialogButtonBox;
0016 
0017 class KServiceSelectDlg : public QDialog
0018 {
0019     Q_OBJECT
0020 public:
0021     /**
0022      * Create a dialog to select a service (not application) for a given service type.
0023      *
0024      * @param serviceType the service type we want to choose a service for.
0025      * @param value is the initial service to select (not implemented currently)
0026      * @param parent parent widget
0027      */
0028     explicit KServiceSelectDlg(const QString &serviceType, const QString &value = QString(), QWidget *parent = nullptr);
0029 
0030     ~KServiceSelectDlg() override;
0031 
0032     /**
0033      * @return the chosen service
0034      */
0035     KService::Ptr service();
0036 
0037 private:
0038     QListWidget *m_listbox;
0039     QDialogButtonBox *m_buttonBox;
0040 };
0041 
0042 #endif