File indexing completed on 2024-05-19 04:41:22

0001 /*
0002     SPDX-FileCopyrightText: 2018 Daniel Mensinger <daniel@mensinger-ka.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "mesonconfig.h"
0010 
0011 #include <QDialog>
0012 
0013 class QDialogButtonBox;
0014 
0015 namespace KDevelop
0016 {
0017 class IProject;
0018 }
0019 
0020 namespace Ui
0021 {
0022 class MesonNewBuildDir;
0023 }
0024 
0025 class MesonNewBuildDir : public QDialog
0026 {
0027     Q_OBJECT
0028 public:
0029     explicit MesonNewBuildDir(KDevelop::IProject* project, QWidget* parent = nullptr);
0030     ~MesonNewBuildDir() override;
0031     MesonNewBuildDir() = delete;
0032 
0033     void setStatus(const QString& str, bool validConfig);
0034 
0035     bool isConfigValid() const;
0036     Meson::BuildDir currentConfig() const;
0037     QStringList mesonArgs() const;
0038 
0039 private Q_SLOTS:
0040     void resetFields();
0041     void updated();
0042 
0043 private:
0044     bool m_configIsValid = false;
0045     KDevelop::IProject* m_project = nullptr;
0046     Ui::MesonNewBuildDir* m_ui = nullptr;
0047     QString m_oldBuildDir;
0048 };