| 53 | }; |
| 54 | |
| 55 | struct ToolInfo |
| 56 | { |
| 57 | QString id; |
| 58 | QString displyGroup; |
| 59 | QString name; |
| 60 | QString description; |
| 61 | int type { CommandTool }; |
| 62 | QString command; |
| 63 | QString arguments; |
| 64 | QString workingDirectory; |
| 65 | int outputOption { ShowInApplicationOutput }; |
| 66 | int errorOutputOption { ShowInApplicationOutput }; |
| 67 | bool addToToolbar { false }; |
| 68 | QString icon { "binarytools_default" }; |
| 69 | QVariantMap environment; |
| 70 | AdvancedSettings advSettings; |
| 71 | |
| 72 | ToolInfo() = default; |
| 73 | explicit ToolInfo(const ToolInfo &other) |
| 74 | : id(other.id), |
| 75 | displyGroup(other.displyGroup), |
| 76 | name(other.name), |
| 77 | description(other.description), |
| 78 | type(other.type), |
| 79 | command(other.command), |
| 80 | arguments(other.arguments), |
| 81 | workingDirectory(other.workingDirectory), |
| 82 | outputOption(other.outputOption), |
| 83 | errorOutputOption(other.errorOutputOption), |
| 84 | addToToolbar(other.addToToolbar), |
| 85 | icon(other.icon), |
| 86 | environment(other.environment), |
| 87 | advSettings(other.advSettings) |
| 88 | { |
| 89 | } |
| 90 | |
| 91 | bool isValid() const { return !name.isEmpty(); } |
| 92 | inline bool operator==(const ToolInfo &other) const { return id == other.id; } |
| 93 | ToolInfo &operator=(const ToolInfo &other) |
| 94 | { |
| 95 | id = other.id; |
| 96 | displyGroup = other.displyGroup; |
| 97 | name = other.name; |
| 98 | description = other.description; |
| 99 | type = other.type; |
| 100 | command = other.command; |
| 101 | arguments = other.arguments; |
| 102 | workingDirectory = other.workingDirectory; |
| 103 | outputOption = other.outputOption; |
| 104 | errorOutputOption = other.errorOutputOption; |
| 105 | addToToolbar = other.addToToolbar; |
| 106 | icon = other.icon; |
| 107 | environment = other.environment; |
| 108 | advSettings = other.advSettings; |
| 109 | |
| 110 | return *this; |
| 111 | } |
| 112 | }; |