File indexing completed on 2024-05-19 15:46:03

0001 /*
0002     SPDX-FileCopyrightText: 2019 Daniel Mensinger <daniel@mensinger-ka.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QDialog>
0010 
0011 namespace Ui
0012 {
0013 class MesonListEditor;
0014 }
0015 
0016 class MesonListEditor : public QDialog
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     explicit MesonListEditor(const QStringList& content, QWidget* parent);
0022     virtual ~MesonListEditor();
0023 
0024     QStringList content() const;
0025 
0026 public Q_SLOTS:
0027     void add();
0028     void remove();
0029     void first();
0030     void up();
0031     void down();
0032     void last();
0033     void currentItemChanged();
0034 
0035 private:
0036     Ui::MesonListEditor* m_ui = nullptr;
0037 
0038     void moveItem(int src, int dst);
0039 };