-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performing all plugins configuration in a single widget.
- Loading branch information
Showing
10 changed files
with
295 additions
and
55 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,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>PluginConfigWrapWidget</class> | ||
<widget class="QWidget" name="PluginConfigWrapWidget"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>102</width> | ||
<height>54</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<widget class="QGroupBox" name="m_wrapGroupBox"> | ||
<property name="title"> | ||
<string>GroupBox</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout_2"/> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
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,39 @@ | ||
// | ||
// Copyright 2024 - 2025 (C). Alex Robenko. All rights reserved. | ||
// | ||
|
||
// This file 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. | ||
// | ||
// This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
#include "PluginConfigWrapWidget.h" | ||
|
||
#include <cassert> | ||
|
||
namespace cc_tools_qt | ||
{ | ||
|
||
PluginConfigWrapWidget::PluginConfigWrapWidget(PluginInfoPtr pluginInfo, QWidget* configWidget, QWidget* parentObj) : | ||
Base(parentObj) | ||
{ | ||
assert(configWidget != nullptr); | ||
m_ui.setupUi(this); | ||
auto* layout = qobject_cast<QVBoxLayout*>(m_ui.m_wrapGroupBox->layout()); | ||
layout->addWidget(configWidget); | ||
|
||
m_ui.m_wrapGroupBox->setTitle(pluginInfo->getName()); | ||
m_pluginInfo = pluginInfo; | ||
} | ||
|
||
PluginConfigWrapWidget::~PluginConfigWrapWidget() = default; | ||
|
||
} // namespace cc_tools_qt |
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,54 @@ | ||
// | ||
// Copyright 2024 - 2025 (C). Alex Robenko. All rights reserved. | ||
// | ||
|
||
// This file 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. | ||
// | ||
// This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
#pragma once | ||
|
||
#include <QtWidgets/QWidget> | ||
|
||
#include "cc_tools_qt/PluginMgr.h" | ||
|
||
#include "ui_PluginConfigWrapWidget.h" | ||
|
||
namespace cc_tools_qt | ||
{ | ||
|
||
class PluginConfigWrapWidget: public QWidget | ||
{ | ||
using Base = QWidget; | ||
|
||
public: | ||
using Type = PluginMgr::PluginInfo::Type; | ||
using PluginInfoPtr = PluginMgr::PluginInfoPtr; | ||
PluginConfigWrapWidget(PluginInfoPtr pluginInfo, QWidget* configWidget, QWidget* parentObj = nullptr); | ||
~PluginConfigWrapWidget(); | ||
|
||
const QString& getIid() const | ||
{ | ||
return m_pluginInfo->getIid(); | ||
} | ||
|
||
Type getType() const | ||
{ | ||
return m_pluginInfo->getType(); | ||
} | ||
|
||
private: | ||
Ui::PluginConfigWrapWidget m_ui; | ||
PluginInfoPtr m_pluginInfo; | ||
}; | ||
|
||
} // namespace cc_tools_qt |
Oops, something went wrong.