Changeset View
Changeset View
Standalone View
Standalone View
krunner/view.cpp
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 55 | { | |||
---|---|---|---|---|---|
66 | setFreeFloating(m_config.readEntry("FreeFloating", false)); | 66 | setFreeFloating(m_config.readEntry("FreeFloating", false)); | ||
67 | reloadConfig(); | 67 | reloadConfig(); | ||
68 | 68 | | |||
69 | new AppAdaptor(this); | 69 | new AppAdaptor(this); | ||
70 | QDBusConnection::sessionBus().registerObject(QStringLiteral("/App"), this); | 70 | QDBusConnection::sessionBus().registerObject(QStringLiteral("/App"), this); | ||
71 | 71 | | |||
72 | QAction *a = new QAction(nullptr); | 72 | QAction *a = new QAction(nullptr); | ||
73 | QObject::connect(a, &QAction::triggered, this, &View::displayOrHide); | 73 | QObject::connect(a, &QAction::triggered, this, &View::displayOrHide); | ||
74 | a->setText(i18n("Run Command")); | 74 | a->setText(i18n("Show KRunner")); | ||
75 | a->setObjectName(QStringLiteral("run command")); | 75 | a->setObjectName(QStringLiteral("run command")); | ||
76 | a->setProperty("componentDisplayName", i18nc("Name for krunner shortcuts category", "Run Command")); | 76 | a->setProperty("componentDisplayName", i18nc("Name for krunner shortcuts category", "KRunner")); | ||
77 | KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << QKeySequence(Qt::ALT + Qt::Key_Space), KGlobalAccel::NoAutoloading); | 77 | KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << QKeySequence(Qt::ALT + Qt::Key_Space), KGlobalAccel::NoAutoloading); | ||
78 | KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << QKeySequence(Qt::ALT + Qt::Key_Space) << QKeySequence(Qt::ALT + Qt::Key_F2) << Qt::Key_Search); | 78 | KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << QKeySequence(Qt::ALT + Qt::Key_Space) << QKeySequence(Qt::ALT + Qt::Key_F2) << Qt::Key_Search); | ||
79 | 79 | | |||
80 | a = new QAction(nullptr); | 80 | a = new QAction(nullptr); | ||
81 | QObject::connect(a, &QAction::triggered, this, &View::displayWithClipboardContents); | 81 | QObject::connect(a, &QAction::triggered, this, &View::displayWithClipboardContents); | ||
82 | a->setText(i18n("Run Command on clipboard contents")); | 82 | a->setText(i18n("Run Command on clipboard contents")); | ||
83 | a->setObjectName(QStringLiteral("run command on clipboard contents")); | 83 | a->setObjectName(QStringLiteral("run command on clipboard contents")); | ||
84 | a->setProperty("componentDisplayName", i18nc("Name for krunner shortcuts category", "Run Command")); | 84 | a->setProperty("componentDisplayName", i18nc("Name for krunner shortcuts category", "KRunner")); | ||
85 | KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << QKeySequence(Qt::ALT+Qt::SHIFT+Qt::Key_F2)); | 85 | KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << QKeySequence(Qt::ALT+Qt::SHIFT+Qt::Key_F2)); | ||
86 | KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << QKeySequence(Qt::ALT+Qt::SHIFT+Qt::Key_F2)); | 86 | KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << QKeySequence(Qt::ALT+Qt::SHIFT+Qt::Key_F2)); | ||
87 | 87 | | |||
88 | m_qmlObj = new KDeclarative::QmlObject(this); | 88 | m_qmlObj = new KDeclarative::QmlObject(this); | ||
89 | m_qmlObj->setInitializationDelayed(true); | 89 | m_qmlObj->setInitializationDelayed(true); | ||
90 | connect(m_qmlObj, &KDeclarative::QmlObject::finished, this, &View::objectIncubated); | 90 | connect(m_qmlObj, &KDeclarative::QmlObject::finished, this, &View::objectIncubated); | ||
91 | 91 | | |||
92 | KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); | 92 | KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); | ||
▲ Show 20 Lines • Show All 313 Lines • Show Last 20 Lines |