mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 21:42:13 +00:00
new keyboard shortcut (T): move focus from scene widget to toolbar
This commit is contained in:
parent
688d413b8c
commit
92af093856
@ -3,6 +3,7 @@
|
||||
#include <QEvent>
|
||||
#include <QResizeEvent>
|
||||
#include <QTimer>
|
||||
#include <QShortcut>
|
||||
|
||||
#include <OgreRoot.h>
|
||||
#include <OgreRenderWindow.h>
|
||||
@ -51,7 +52,11 @@ namespace CSVRender
|
||||
QTimer *timer = new QTimer (this);
|
||||
|
||||
connect (timer, SIGNAL (timeout()), this, SLOT (update()));
|
||||
timer->start (20); /// \todo make this configurable
|
||||
timer->start (20); ///< \todo make this configurable
|
||||
|
||||
/// \todo make shortcut configurable
|
||||
QShortcut *focusToolbar = new QShortcut (Qt::Key_T, this);
|
||||
connect (focusToolbar, SIGNAL (activated()), this, SIGNAL (focusToolbarRequest()));
|
||||
}
|
||||
|
||||
CSVWidget::SceneToolMode *SceneWidget::makeLightingSelector (CSVWidget::SceneToolbar *parent)
|
||||
|
@ -111,6 +111,10 @@ namespace CSVRender
|
||||
void update();
|
||||
|
||||
void selectLightingMode (const std::string& mode);
|
||||
|
||||
signals:
|
||||
|
||||
void focusToolbarRequest();
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ CSVWorld::PreviewSubView::PreviewSubView (const CSMWorld::UniversalId& id, CSMDo
|
||||
connect (mScene, SIGNAL (closeRequest()), this, SLOT (closeRequest()));
|
||||
connect (mScene, SIGNAL (referenceableIdChanged (const std::string&)),
|
||||
this, SLOT (referenceableIdChanged (const std::string&)));
|
||||
connect (mScene, SIGNAL (focusToolbarRequest()), toolbar, SLOT (setFocus()));
|
||||
}
|
||||
|
||||
void CSVWorld::PreviewSubView::setEditLock (bool locked) {}
|
||||
|
@ -238,6 +238,8 @@ void CSVWorld::SceneSubView::replaceToolbarAndWorldspace (CSVRender::WorldspaceW
|
||||
mScene = widget;
|
||||
mToolbar = toolbar;
|
||||
|
||||
connect (mScene, SIGNAL (focusToolbarRequest()), mToolbar, SLOT (setFocus()));
|
||||
|
||||
mLayout->addWidget (mToolbar, 0);
|
||||
mLayout->addWidget (mScene, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user