StelGuiBase.cpp   StelGuiBase.cpp 
skipping to change at line 31 skipping to change at line 31
#include "StelAppGraphicsWidget.hpp" #include "StelAppGraphicsWidget.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include <QAction> #include <QAction>
StelGuiBase::StelGuiBase() : stelAppGraphicsWidget(NULL) StelGuiBase::StelGuiBase() : stelAppGraphicsWidget(NULL)
{ {
} }
void StelGuiBase::init(QGraphicsWidget* atopLevelGraphicsWidget, StelAppGra phicsWidget* astelAppGraphicsWidget) void StelGuiBase::init(QGraphicsWidget* atopLevelGraphicsWidget, StelAppGra phicsWidget* astelAppGraphicsWidget)
{ {
Q_UNUSED(atopLevelGraphicsWidget);
stelAppGraphicsWidget = astelAppGraphicsWidget; stelAppGraphicsWidget = astelAppGraphicsWidget;
} }
void StelGuiBase::updateI18n() void StelGuiBase::updateI18n()
{ {
// Translate all action texts // Translate all action texts
foreach (QObject* obj, stelAppGraphicsWidget->children()) foreach (QObject* obj, stelAppGraphicsWidget->children())
{ {
QAction* a = qobject_cast<QAction*>(obj); QAction* a = qobject_cast<QAction*>(obj);
if (a) if (a)
skipping to change at line 56 skipping to change at line 57
} }
} }
} }
} }
// Note: "text" and "helpGroup" must be in English -- this method and the h elp // Note: "text" and "helpGroup" must be in English -- this method and the h elp
// dialog take care of translating them. Of course, they still have to be // dialog take care of translating them. Of course, they still have to be
// marked for translation using the N_() macro. // marked for translation using the N_() macro.
QAction* StelGuiBase::addGuiActions(const QString& actionName, const QStrin g& text, const QString& shortCut, const QString& helpGroup, bool checkable, bool autoRepeat) QAction* StelGuiBase::addGuiActions(const QString& actionName, const QStrin g& text, const QString& shortCut, const QString& helpGroup, bool checkable, bool autoRepeat)
{ {
Q_UNUSED(helpGroup);
QAction* a; QAction* a;
a = new QAction(stelAppGraphicsWidget); a = new QAction(stelAppGraphicsWidget);
a->setObjectName(actionName); a->setObjectName(actionName);
a->setText(q_(text)); a->setText(q_(text));
QList<QKeySequence> shortcuts; QList<QKeySequence> shortcuts;
QStringList shortcutStrings = shortCut.split(QRegExp(",(?!,|$)")); QRegExp shortCutSplitRegEx(",(?!,|$)");
QStringList shortcutStrings = shortCut.split(shortCutSplitRegEx);
for (int i = 0; i < shortcutStrings.size(); ++i) for (int i = 0; i < shortcutStrings.size(); ++i)
shortcuts << QKeySequence(shortcutStrings.at(i).trimmed()); shortcuts << QKeySequence(shortcutStrings.at(i).trimmed());
a->setShortcuts(shortcuts); a->setShortcuts(shortcuts);
a->setCheckable(checkable); a->setCheckable(checkable);
a->setAutoRepeat(autoRepeat); a->setAutoRepeat(autoRepeat);
a->setProperty("englishText", QVariant(text)); a->setProperty("englishText", QVariant(text));
a->setShortcutContext(Qt::WidgetShortcut); a->setShortcutContext(Qt::WidgetShortcut);
stelAppGraphicsWidget->addAction(a); stelAppGraphicsWidget->addAction(a);
return a; return a;
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 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/