1
0
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:
PlutonicOverkill 2017-05-09 19:58:34 +12:00
parent 3545cfa00a
commit 4879405097
4 changed files with 5 additions and 4 deletions

View File

@ -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)
{

View File

@ -15,7 +15,7 @@ namespace CSVPrefs
public:
ContextMenuWidget(QWidget* parent, const std::string& category);
ContextMenuWidget(const std::string& category, QWidget* parent = 0);
protected:

View File

@ -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"

View File

@ -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)