-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
395 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright (C) 2024 Petr Mironychev | ||
* | ||
* This file is part of QodeAssist. | ||
* | ||
* QodeAssist is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* QodeAssist is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "ContextSettings.hpp" | ||
|
||
#include <coreplugin/dialogs/ioptionspage.h> | ||
#include <utils/layoutbuilder.h> | ||
|
||
#include "QodeAssistConstants.hpp" | ||
#include "QodeAssisttr.h" | ||
|
||
namespace QodeAssist::Settings { | ||
ContextSettings &contextSettings() | ||
{ | ||
static ContextSettings settings; | ||
return settings; | ||
} | ||
|
||
ContextSettings::ContextSettings() | ||
{ | ||
setAutoApply(false); | ||
|
||
setDisplayName(Tr::tr("Context")); | ||
|
||
setLayouter([this]() { | ||
using namespace Layouting; | ||
return Column{Stretch{1}}; | ||
}); | ||
} | ||
|
||
class ContextSettingsPage : public Core::IOptionsPage | ||
{ | ||
public: | ||
ContextSettingsPage() | ||
{ | ||
setId(Constants::QODE_ASSIST_CONTEXT_SETTINGS_PAGE_ID); | ||
setDisplayName(Tr::tr("Context")); | ||
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY); | ||
setSettingsProvider([] { return &contextSettings(); }); | ||
} | ||
}; | ||
|
||
const ContextSettingsPage contextSettingsPage; | ||
|
||
} // namespace QodeAssist::Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2024 Petr Mironychev | ||
* | ||
* This file is part of QodeAssist. | ||
* | ||
* QodeAssist is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* QodeAssist is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <utils/aspects.h> | ||
|
||
namespace QodeAssist::Settings { | ||
|
||
class ContextSettings : public Utils::AspectContainer | ||
{ | ||
public: | ||
ContextSettings(); | ||
}; | ||
|
||
ContextSettings &contextSettings(); | ||
|
||
} // namespace QodeAssist::Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright (C) 2024 Petr Mironychev | ||
* | ||
* This file is part of QodeAssist. | ||
* | ||
* QodeAssist is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* QodeAssist is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "CustomPromptSettings.hpp" | ||
|
||
#include <coreplugin/dialogs/ioptionspage.h> | ||
#include <utils/layoutbuilder.h> | ||
|
||
#include "QodeAssistConstants.hpp" | ||
#include "QodeAssisttr.h" | ||
|
||
namespace QodeAssist::Settings { | ||
|
||
CustomPromptSettings &customPromptSettings() | ||
{ | ||
static CustomPromptSettings settings; | ||
return settings; | ||
} | ||
|
||
CustomPromptSettings::CustomPromptSettings() | ||
{ | ||
setAutoApply(false); | ||
|
||
setDisplayName(Tr::tr("Custom Prompt")); | ||
|
||
setLayouter([this]() { | ||
using namespace Layouting; | ||
return Column{Stretch{1}}; | ||
}); | ||
} | ||
|
||
class CustomPromptSettingsPage : public Core::IOptionsPage | ||
{ | ||
public: | ||
CustomPromptSettingsPage() | ||
{ | ||
setId(Constants::QODE_ASSIST_CUSTOM_PROMPT_SETTINGS_PAGE_ID); | ||
setDisplayName(Tr::tr("Custom Prompt")); | ||
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY); | ||
setSettingsProvider([] { return &customPromptSettings(); }); | ||
} | ||
}; | ||
|
||
const CustomPromptSettingsPage customPromptSettingsPage; | ||
|
||
} // namespace QodeAssist::Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2024 Petr Mironychev | ||
* | ||
* This file is part of QodeAssist. | ||
* | ||
* QodeAssist is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* QodeAssist is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <utils/aspects.h> | ||
|
||
namespace QodeAssist::Settings { | ||
|
||
class CustomPromptSettings : public Utils::AspectContainer | ||
{ | ||
public: | ||
CustomPromptSettings(); | ||
}; | ||
|
||
CustomPromptSettings &customPromptSettings(); | ||
|
||
} // namespace QodeAssist::Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright (C) 2024 Petr Mironychev | ||
* | ||
* This file is part of QodeAssist. | ||
* | ||
* QodeAssist is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* QodeAssist is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "GeneralSettings.hpp" | ||
|
||
#include <coreplugin/dialogs/ioptionspage.h> | ||
#include <utils/layoutbuilder.h> | ||
|
||
#include "QodeAssistConstants.hpp" | ||
#include "QodeAssisttr.h" | ||
|
||
namespace QodeAssist::Settings { | ||
|
||
GeneralSettings &generalSettings() | ||
{ | ||
static GeneralSettings settings; | ||
return settings; | ||
} | ||
|
||
GeneralSettings::GeneralSettings() | ||
{ | ||
setAutoApply(false); | ||
|
||
setDisplayName(Tr::tr("General")); | ||
|
||
setLayouter([this]() { | ||
using namespace Layouting; | ||
return Column{Stretch{1}}; | ||
}); | ||
} | ||
|
||
class GeneralSettingsPage : public Core::IOptionsPage | ||
{ | ||
public: | ||
GeneralSettingsPage() | ||
{ | ||
setId(Constants::QODE_ASSIST_GENERAL_SETTINGS_PAGE_ID); | ||
setDisplayName(Tr::tr("General")); | ||
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY); | ||
setSettingsProvider([] { return &generalSettings(); }); | ||
} | ||
}; | ||
|
||
const GeneralSettingsPage generalSettingsPage; | ||
|
||
} // namespace QodeAssist::Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2024 Petr Mironychev | ||
* | ||
* This file is part of QodeAssist. | ||
* | ||
* QodeAssist is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* QodeAssist is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <utils/aspects.h> | ||
|
||
namespace QodeAssist::Settings { | ||
|
||
class GeneralSettings : public Utils::AspectContainer | ||
{ | ||
public: | ||
GeneralSettings(); | ||
}; | ||
|
||
GeneralSettings &generalSettings(); | ||
|
||
} // namespace QodeAssist::Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright (C) 2024 Petr Mironychev | ||
* | ||
* This file is part of QodeAssist. | ||
* | ||
* QodeAssist is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* QodeAssist is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "PresetPromptsSettings.hpp" | ||
|
||
#include <coreplugin/dialogs/ioptionspage.h> | ||
#include <utils/layoutbuilder.h> | ||
|
||
#include "QodeAssistConstants.hpp" | ||
#include "QodeAssisttr.h" | ||
|
||
namespace QodeAssist::Settings { | ||
|
||
PresetPromptsSettings &presetPromptsSettings() | ||
{ | ||
static PresetPromptsSettings settings; | ||
return settings; | ||
} | ||
|
||
PresetPromptsSettings::PresetPromptsSettings() | ||
{ | ||
setAutoApply(false); | ||
|
||
setDisplayName(Tr::tr("Preset Prompts Params")); | ||
|
||
setLayouter([this]() { | ||
using namespace Layouting; | ||
return Column{Stretch{1}}; | ||
}); | ||
} | ||
|
||
class PresetPromptsSettingsPage : public Core::IOptionsPage | ||
{ | ||
public: | ||
PresetPromptsSettingsPage() | ||
{ | ||
setId(Constants::QODE_ASSIST_PRESET_PROMPTS_SETTINGS_PAGE_ID); | ||
setDisplayName(Tr::tr("Preset Prompts Params")); | ||
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY); | ||
setSettingsProvider([] { return &presetPromptsSettings(); }); | ||
} | ||
}; | ||
|
||
const PresetPromptsSettingsPage presetPromptsSettingsPage; | ||
|
||
} // namespace QodeAssist::Settings |
Oops, something went wrong.