HelpDialog.cpp   HelpDialog.cpp 
skipping to change at line 44 skipping to change at line 44
#include "ui_helpDialogGui.h" #include "ui_helpDialogGui.h"
#include "HelpDialog.hpp" #include "HelpDialog.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelStyle.hpp" #include "StelStyle.hpp"
#include "StelLogger.hpp" #include "StelLogger.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelGuiItems.hpp"
HelpDialog::HelpDialog() HelpDialog::HelpDialog()
{ {
ui = new Ui_helpDialogForm; ui = new Ui_helpDialogForm;
// Make some key and mouse bindings translatable. Keys starting with // Make some key and mouse bindings translatable. Keys starting with
// "!NUMBER-" are made up; the number is there to keep the entries // "!NUMBER-" are made up; the number is there to keep the entries
// sorted (at least relative to each other). // sorted (at least relative to each other).
specialKeys["Space"] = N_("Space"); specialKeys["Space"] = N_("Space");
specialKeys["!01-arrows-and-left-drag"] = N_("Arrow keys & left mous e drag"); specialKeys["!01-arrows-and-left-drag"] = N_("Arrow keys & left mous e drag");
skipping to change at line 72 skipping to change at line 73
setKey(group, "", "!01-arrows-and-left-drag", N_("Pan view around th e sky")); setKey(group, "", "!01-arrows-and-left-drag", N_("Pan view around th e sky"));
setKey(group, "", "!02-page-up/down", N_("Zoom in/out")); setKey(group, "", "!02-page-up/down", N_("Zoom in/out"));
setKey(group, "", "!03-ctrl+up/down", N_("Zoom in/out")); setKey(group, "", "!03-ctrl+up/down", N_("Zoom in/out"));
setKey(group, "", "!04-left-click", N_("Select object")); setKey(group, "", "!04-left-click", N_("Select object"));
setKey(group, "", "!05-right-click", N_("Clear selection")); setKey(group, "", "!05-right-click", N_("Clear selection"));
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
setKey(group, "", "!06-ctrl+left-click", N_("Clear selection")); setKey(group, "", "!06-ctrl+left-click", N_("Clear selection"));
#endif #endif
group = N_("When a Script is Running"); group = N_("When a Script is Running");
setKey(group, "", "4", N_("Stop currently running script"));
setKey(group, "", "5", N_("Pause script execution"));
setKey(group, "", "6", N_("Resume script execution"));
setKey(group, "", "J", N_("Slow down the script execution rate")); setKey(group, "", "J", N_("Slow down the script execution rate"));
setKey(group, "", "L", N_("Speed up the script execution rate")); setKey(group, "", "L", N_("Speed up the script execution rate"));
setKey(group, "", "K", N_("Set the normal script execution rate")); setKey(group, "", "K", N_("Set the normal script execution rate"));
// Add keys for those plugins which do not have GUI actions. // Add keys for those plugins which do not have GUI actions.
group = N_("Plugin Key Bindings"); group = N_("Plugin Key Bindings");
setKey(group, "", "Alt+M", N_("Text User Interface")); setKey(group, "", "Alt+M", N_("Text User Interface"));
} }
HelpDialog::~HelpDialog() HelpDialog::~HelpDialog()
skipping to change at line 104 skipping to change at line 109
} }
void HelpDialog::styleChanged() void HelpDialog::styleChanged()
{ {
if (dialog) if (dialog)
{ {
updateText(); updateText();
} }
} }
void HelpDialog::updateIconsColor()
{
QPixmap pixmap(50, 50);
QStringList icons;
icons << "help" << "info" << "logs";
bool redIcon = false;
if (StelApp::getInstance().getVisionModeNight())
redIcon = true;
foreach(const QString &iconName, icons)
{
pixmap.load(":/graphicGui/tabicon-" + iconName +".png");
if (redIcon)
pixmap = StelButton::makeRed(pixmap);
ui->stackListWidget->item(icons.indexOf(iconName))->setIcon(
QIcon(pixmap));
}
}
void HelpDialog::createDialogContent() void HelpDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate())); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate()));
connect(&StelApp::getInstance(), SIGNAL(colorSchemeChanged(QString)) , this, SLOT(updateIconsColor()));
ui->stackedWidget->setCurrentIndex(0); ui->stackedWidget->setCurrentIndex(0);
updateIconsColor();
ui->stackListWidget->setCurrentRow(0); ui->stackListWidget->setCurrentRow(0);
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
updateText(); updateText();
ui->logPathLabel->setText(QString("%1/log.txt:").arg(StelFileMgr::ge tUserDir())); ui->logPathLabel->setText(QString("%1/log.txt:").arg(StelFileMgr::ge tUserDir()));
connect(ui->stackedWidget, SIGNAL(currentChanged(int)), this, SLOT(u pdateLog(int))); connect(ui->stackedWidget, SIGNAL(currentChanged(int)), this, SLOT(u pdateLog(int)));
connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refreshLog( ))); connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refreshLog( )));
connect(ui->stackListWidget, SIGNAL(currentItemChanged(QListWidgetIt em *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWi dgetItem*))); connect(ui->stackListWidget, SIGNAL(currentItemChanged(QListWidgetIt em *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWi dgetItem*)));
 End of changes. 5 change blocks. 
0 lines changed or deleted 27 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/