File indexing completed on 2024-04-28 04:38:24
0001 /* 0002 SPDX-FileCopyrightText: 2010 Andreas Pakulat <apaku@gmx.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-or-later 0005 */ 0006 0007 #ifndef CUSTOMBUILDSYSTEMCONFIG_H 0008 #define CUSTOMBUILDSYSTEMCONFIG_H 0009 0010 #include <QVector> 0011 #include <QUrl> 0012 #include <QMetaType> 0013 0014 struct CustomBuildSystemTool 0015 { 0016 enum ActionType { Build = 0, Configure, Install, Clean, Prune, Undefined }; 0017 static QString toolName(ActionType type); 0018 0019 CustomBuildSystemTool() {} 0020 bool enabled = false; 0021 QUrl executable; 0022 QString arguments; 0023 QString envGrp; 0024 ActionType type = Undefined; 0025 }; 0026 0027 Q_DECLARE_METATYPE( CustomBuildSystemTool ) 0028 Q_DECLARE_TYPEINFO(CustomBuildSystemTool, Q_MOVABLE_TYPE); 0029 0030 struct CustomBuildSystemConfig 0031 { 0032 QString title; 0033 QUrl buildDir; 0034 QVector<CustomBuildSystemTool> tools; 0035 0036 CustomBuildSystemConfig() 0037 { 0038 tools.reserve(CustomBuildSystemTool::Undefined - CustomBuildSystemTool::Build); 0039 for (int i = CustomBuildSystemTool::Build; i < CustomBuildSystemTool::Undefined; ++i) { 0040 CustomBuildSystemTool tool; 0041 tool.type = CustomBuildSystemTool::ActionType(i); 0042 tool.enabled = false; 0043 tools << tool; 0044 } 0045 } 0046 }; 0047 0048 Q_DECLARE_TYPEINFO(CustomBuildSystemConfig, Q_MOVABLE_TYPE); 0049 0050 #endif