Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine  1.5.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
RadiumHelpDialog.cpp
1 #include <Gui/AboutDialog/RadiumHelpDialog.hpp>
2 
3 #include <Gui/Utils/KeyMappingManager.hpp>
4 
5 #include "ui_RadiumHelpDialog.h"
6 
7 namespace Ra {
8 namespace Gui {
9 RadiumHelpDialog::RadiumHelpDialog( QWidget* parent ) :
10  QDialog( parent ), ui( new Ui::RadiumHelpDialog ) {
11  ui->setupUi( this );
12  auto kmappingMngr = Gui::KeyMappingManager::getInstance();
13  std::string keyMappingHelp;
14  ui->keymapping->document()->setDefaultStyleSheet(
15  "table { border-collapse: collapse; }"
16  "table tr th {padding-top: .4em; padding-bottom: .2em; text-align: left; border-bottom: "
17  "1px solid gray;}"
18  "table tr td {padding-top: .4em; padding-bottom: .2em; padding-left:1em; border-bottom: "
19  "1px solid gray;}" );
20  keyMappingHelp += "<h1> UI action mapping </h1>\n";
21  keyMappingHelp += kmappingMngr->getHelpText();
22  keyMappingHelp += "<br/>\n";
23  ui->keymapping->setText( keyMappingHelp.c_str() );
24 }
25 
26 // default detor define here, after inclusion of ui_HelpDialog, to have unique_ptr of forward decl
27 // type, and prevent "invalid application of 'sizeof' to an incomplete type"
28 RadiumHelpDialog::~RadiumHelpDialog() = default;
29 
30 } // namespace Gui
31 } // namespace Ra
Definition: Cage.cpp:3