mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Add reset context menu for key binding pages
This commit is contained in:
parent
3545cfa00a
commit
4879405097
4 changed files with 5 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "../../model/prefs/state.hpp"
|
#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)
|
:QWidget(parent)
|
||||||
,mCategory(category)
|
,mCategory(category)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace CSVPrefs
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ContextMenuWidget(QWidget* parent, const std::string& category);
|
ContextMenuWidget(const std::string& category, QWidget* parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "../../model/prefs/setting.hpp"
|
#include "../../model/prefs/setting.hpp"
|
||||||
#include "../../model/prefs/category.hpp"
|
#include "../../model/prefs/category.hpp"
|
||||||
|
#include "../../view/prefs/contextmenuwidget.hpp"
|
||||||
|
|
||||||
namespace CSVPrefs
|
namespace CSVPrefs
|
||||||
{
|
{
|
||||||
|
@ -19,7 +20,7 @@ namespace CSVPrefs
|
||||||
, mPageSelector(0)
|
, mPageSelector(0)
|
||||||
{
|
{
|
||||||
// Need one widget for scroll area
|
// Need one widget for scroll area
|
||||||
QWidget* topWidget = new QWidget();
|
CSVPrefs::ContextMenuWidget* topWidget = new CSVPrefs::ContextMenuWidget(category.getKey());
|
||||||
QVBoxLayout* topLayout = new QVBoxLayout(topWidget);
|
QVBoxLayout* topLayout = new QVBoxLayout(topWidget);
|
||||||
|
|
||||||
// Allows switching between "pages"
|
// Allows switching between "pages"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
CSVPrefs::Page::Page (CSMPrefs::Category& category, QWidget *parent)
|
CSVPrefs::Page::Page (CSMPrefs::Category& category, QWidget *parent)
|
||||||
: PageBase (category, 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);
|
mGrid = new QGridLayout (widget);
|
||||||
|
|
||||||
for (CSMPrefs::Category::Iterator iter = category.begin(); iter!=category.end(); ++iter)
|
for (CSMPrefs::Category::Iterator iter = category.begin(); iter!=category.end(); ++iter)
|
||||||
|
|
Loading…
Reference in a new issue