Commit 26db67ea authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Directly use KI18n QML bindings.

parent f17ce165
......@@ -31,28 +31,20 @@
#include "liblearnerprofile/src/profilemanager.h"
#include "liblearnerprofile/src/learner.h"
#include "libsound/src/outputdevicecontroller.h"
#include "artikulate_debug.h"
#include <KActionCollection>
#include <KConfigDialog>
#include <KDeclarative/KDeclarative>
#include <KHelpMenu>
#include <KLocalizedString>
#include <KLocalizedContext>
#include <KNS3/DownloadDialog>
#include <KStandardAction>
#include <QAction>
#include <QApplication>
#include <QCloseEvent>
#include <QCoreApplication>
#include "artikulate_debug.h"
#include <QGraphicsObject>
#include <QIcon>
#include <QMenuBar>
#include <QPointer>
#include <QQmlContext>
#include <QQmlProperty>
#include <QQuickItem>
#include <QQuickView>
#include <QStandardPaths>
using namespace LearnerProfile;
......@@ -64,6 +56,8 @@ MainWindow::MainWindow()
, m_profileManager(new LearnerProfile::ProfileManager(this))
, m_trainingSession(new TrainingSession(this))
{
rootContext()->setContextObject(new KLocalizedContext(this));
// load saved sound settings
OutputDeviceController::self().setVolume(Settings::audioOutputVolume());
......@@ -76,10 +70,6 @@ MainWindow::MainWindow()
m_resourceManager->registerLearningGoals(m_profileManager);
m_trainingSession->setProfileManager(m_profileManager);
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(this);
kdeclarative.setupBindings(); //TODO use result for determining touch/desktop version
// create menu
setupActions();
......
......@@ -32,8 +32,8 @@
#include <KActionCollection>
#include <KConfigDialog>
#include <KDeclarative/KDeclarative>
#include <KLocalizedString>
#include <KLocalizedContext>
#include <KMessageBox>
#include <KNS3/DownloadDialog>
#include <KStandardAction>
......@@ -79,15 +79,12 @@ MainWindowEditor::MainWindowEditor()
}
m_resourceManager->loadCourseResources();
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(m_widget->engine());
kdeclarative.setupBindings(); //TODO use result for determining touch/desktop version
// create menu
setupActions();
// set view
m_widget->resize(QSize(800, 600));
m_widget->rootContext()->setContextObject(new KLocalizedContext(m_widget));
m_widget->rootContext()->setContextProperty("g_resourceManager", m_resourceManager);
m_widget->rootContext()->setContextProperty("editorSession", m_editorSession);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment