mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Add reset context menu for key binding pages
This commit is contained in:
parent
3545cfa00a
commit
4879405097
@ -5,7 +5,7 @@
|
||||
|
||||
#include "../../model/prefs/state.hpp"
|
||||
|
||||
CSVPrefs::ContextMenuWidget::ContextMenuWidget(QWidget* parent, const std::string& category)
|
||||
CSVPrefs::ContextMenuWidget::ContextMenuWidget(const std::string& category, QWidget* parent)
|
||||
:QWidget(parent)
|
||||
,mCategory(category)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace CSVPrefs
|
||||
|
||||
public:
|
||||
|
||||
ContextMenuWidget(QWidget* parent, const std::string& category);
|
||||
ContextMenuWidget(const std::string& category, QWidget* parent = 0);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "../../model/prefs/setting.hpp"
|
||||
#include "../../model/prefs/category.hpp"
|
||||
#include "../../view/prefs/contextmenuwidget.hpp"
|
||||
|
||||
namespace CSVPrefs
|
||||
{
|
||||
@ -19,7 +20,7 @@ namespace CSVPrefs
|
||||
, mPageSelector(0)
|
||||
{
|
||||
// Need one widget for scroll area
|
||||
QWidget* topWidget = new QWidget();
|
||||
CSVPrefs::ContextMenuWidget* topWidget = new CSVPrefs::ContextMenuWidget(category.getKey());
|
||||
QVBoxLayout* topLayout = new QVBoxLayout(topWidget);
|
||||
|
||||
// Allows switching between "pages"
|
||||
|
@ -10,7 +10,7 @@
|
||||
CSVPrefs::Page::Page (CSMPrefs::Category& category, QWidget *parent)
|
||||
: PageBase (category, parent)
|
||||
{
|
||||
CSVPrefs::ContextMenuWidget *widget = new CSVPrefs::ContextMenuWidget (parent, category.getKey());
|
||||
CSVPrefs::ContextMenuWidget *widget = new CSVPrefs::ContextMenuWidget (category.getKey(), parent);
|
||||
mGrid = new QGridLayout (widget);
|
||||
|
||||
for (CSMPrefs::Category::Iterator iter = category.begin(); iter!=category.end(); ++iter)
|
||||
|
Loading…
x
Reference in New Issue
Block a user