Skip to content

Commit

Permalink
added the missing shortcuts for the new windows, and set the shortcut…
Browse files Browse the repository at this point in the history
…s visibility to be set on whether the window is configured to be visibile or not.
  • Loading branch information
weschristiansen committed Jul 5, 2011
1 parent b3a879e commit 4ca24a6
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 2 deletions.
19 changes: 19 additions & 0 deletions src/Interface/Application/ShortcutsInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
// Application includes
#include <Application/Tool/ToolFactory.h>
#include <Application/ToolManager/ToolManager.h>
#include <Application/InterfaceManager/InterfaceManager.h>

// QtUtils includes
#include <QtUtils/Utils/QtPointer.h>
Expand Down Expand Up @@ -65,6 +66,8 @@ ShortcutsInterface::ShortcutsInterface( QWidget *parent ) :
{
// Set up the private internals of the MessageWindow class
this->private_->ui_.setupUi( this );
this->private_->ui_.python_shortcut_label_->hide();
this->private_->ui_.controller_shortcut_label_->hide();

// Update the title of the dialog
std::string title = std::string( "Keyboard/Mouse Shortcuts - " )
Expand Down Expand Up @@ -92,6 +95,22 @@ ShortcutsInterface::ShortcutsInterface( QWidget *parent ) :

// Update fonts and text
update_fonts_and_text();


//=========== HANDLE SPECIAL MENU ITEM VISIBILITY ===========//
// Python Shortcut visible
#ifdef BUILD_WITH_PYTHON
this->private_->ui_.python_shortcut_label_->show();
#endif

// Controller Shortcut visible
{
Core::StateEngine::lock_type lock( Core::StateEngine::GetMutex() );
if ( InterfaceManager::Instance()->enable_controller_state_->get() )
{
this->private_->ui_.controller_shortcut_label_->show();
}
}
}

ShortcutsInterface::~ShortcutsInterface()
Expand Down
133 changes: 131 additions & 2 deletions src/Interface/Application/ShortcutsInterface.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,9 @@ QWidget#scrollAreaWidgetContents_4{
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-307</y>
<width>396</width>
<height>646</height>
<height>698</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
Expand Down Expand Up @@ -2126,6 +2126,12 @@ QWidget#scrollAreaWidgetContents_4{
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>178</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>0</number>
Expand Down Expand Up @@ -2378,6 +2384,129 @@ QWidget#scrollAreaWidgetContents_4{
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_62" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_57" stretch="2,1">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_98">
<property name="text">
<string>Volume View Window:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_99">
<property name="text">
<string>CTRL+SHIFT+V</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="python_shortcut_label_" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_58" stretch="2,1">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_100">
<property name="text">
<string>Python Console Window:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_101">
<property name="text">
<string>CTRL+SHIFT+Y</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="controller_shortcut_label_" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_59" stretch="2,1">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_102">
<property name="text">
<string>Controller Window:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_103">
<property name="text">
<string>CTRL+SHIFT+C</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down

0 comments on commit 4ca24a6

Please sign in to comment.