mirror of https://github.com/OpenMW/openmw.git
Add separate setting type for subcategory
parent
fb6e429dad
commit
e07d8f3066
@ -0,0 +1,21 @@
|
||||
#include "subcategory.hpp"
|
||||
|
||||
#include <QGridLayout>
|
||||
|
||||
namespace CSMPrefs
|
||||
{
|
||||
class Category;
|
||||
|
||||
Subcategory::Subcategory(Category* parent, QMutex* mutex, const QString& label)
|
||||
: Setting(parent, mutex, "", label)
|
||||
{
|
||||
}
|
||||
|
||||
SettingWidgets Subcategory::makeWidgets(QWidget* /*parent*/)
|
||||
{
|
||||
QGridLayout* const layout = new QGridLayout();
|
||||
layout->setSizeConstraint(QLayout::SetMinAndMaxSize);
|
||||
|
||||
return SettingWidgets{ .mLabel = nullptr, .mInput = nullptr, .mLayout = layout };
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
#ifndef OPENMW_APPS_OPENCS_MODEL_PREFS_SUBCATEGORY_H
|
||||
#define OPENMW_APPS_OPENCS_MODEL_PREFS_SUBCATEGORY_H
|
||||
|
||||
#include "setting.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace CSMPrefs
|
||||
{
|
||||
class Category;
|
||||
|
||||
class Subcategory final : public Setting
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Subcategory(Category* parent, QMutex* mutex, const QString& label);
|
||||
|
||||
SettingWidgets makeWidgets(QWidget* parent) override;
|
||||
|
||||
void updateWidget() override {}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue