Changeset View
Changeset View
Standalone View
Standalone View
src/app/mainwindow.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
44 | MainWindow::MainWindow(Minuet::Core *core, QWidget *parent, Qt::WindowFlags f) : | 44 | MainWindow::MainWindow(Minuet::Core *core, QWidget *parent, Qt::WindowFlags f) : | ||
45 | KXmlGuiWindow(parent, f), | 45 | KXmlGuiWindow(parent, f), | ||
46 | m_quickView(new QQuickView), | 46 | m_quickView(new QQuickView), | ||
47 | m_initialGroup(KSharedConfig::openConfig(), "version") | 47 | m_initialGroup(KSharedConfig::openConfig(), "version") | ||
48 | { | 48 | { | ||
49 | QQmlContext *rootContext = m_quickView->engine()->rootContext(); | 49 | QQmlContext *rootContext = m_quickView->engine()->rootContext(); | ||
50 | rootContext->setContextProperty(QStringLiteral("core"), core); | 50 | rootContext->setContextProperty(QStringLiteral("core"), core); | ||
51 | 51 | | |||
52 | m_quickView->setSource(QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("qml/Main.qml")))); | 52 | m_quickView->setSource(QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("minuet/qml/Main.qml")))); | ||
53 | m_quickView->setResizeMode(QQuickView::SizeRootObjectToView); | 53 | m_quickView->setResizeMode(QQuickView::SizeRootObjectToView); | ||
54 | setCentralWidget(QWidget::createWindowContainer(m_quickView, this)); | 54 | setCentralWidget(QWidget::createWindowContainer(m_quickView, this)); | ||
55 | 55 | | |||
56 | KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection()); | 56 | KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection()); | ||
57 | KStandardAction::preferences(this, SLOT(settingsConfigure()), actionCollection()); | 57 | KStandardAction::preferences(this, SLOT(settingsConfigure()), actionCollection()); | ||
58 | 58 | | |||
59 | setupGUI(Keys | Save | Create); | 59 | setupGUI(Keys | Save | Create); | ||
60 | foreach (QToolBar *toolBar, findChildren<QToolBar*>()) | 60 | foreach (QToolBar *toolBar, findChildren<QToolBar*>()) | ||
Show All 30 Lines |