|
28 | 28 |
|
29 | 29 | #include <QAKCore/actionregistry.h> |
30 | 30 |
|
31 | | -#include <SVSCraftQuick/Theme.h> |
32 | 31 | #include <SVSCraftQuick/MessageBox.h> |
| 32 | +#include <SVSCraftQuick/Theme.h> |
33 | 33 |
|
34 | 34 | #include <loadapi/initroutine.h> |
35 | 35 |
|
36 | 36 | #include <coreplugin/CoreInterface.h> |
| 37 | +#include <coreplugin/DspxClipboard.h> |
37 | 38 | #include <coreplugin/HomeWindowInterface.h> |
| 39 | +#include <coreplugin/ProjectWindowInterface.h> |
38 | 40 | #include <coreplugin/internal/AfterSavingNotifyAddOn.h> |
39 | 41 | #include <coreplugin/internal/AppearancePage.h> |
40 | 42 | #include <coreplugin/internal/BehaviorPreference.h> |
| 43 | +#include <coreplugin/internal/CloseSaveCheckAddOn.h> |
41 | 44 | #include <coreplugin/internal/ColorSchemeCollection.h> |
42 | 45 | #include <coreplugin/internal/ColorSchemePage.h> |
43 | 46 | #include <coreplugin/internal/EditActionsAddOn.h> |
44 | 47 | #include <coreplugin/internal/FileBackupPage.h> |
45 | 48 | #include <coreplugin/internal/FindActionsAddOn.h> |
46 | 49 | #include <coreplugin/internal/GeneralPage.h> |
47 | | -#include <coreplugin/internal/InsertItemAddOn.h> |
48 | 50 | #include <coreplugin/internal/HomeAddOn.h> |
| 51 | +#include <coreplugin/internal/InsertItemAddOn.h> |
49 | 52 | #include <coreplugin/internal/KeymapPage.h> |
50 | 53 | #include <coreplugin/internal/LogPage.h> |
51 | 54 | #include <coreplugin/internal/MenuPage.h> |
52 | 55 | #include <coreplugin/internal/MetadataAddOn.h> |
53 | 56 | #include <coreplugin/internal/NotificationAddOn.h> |
| 57 | +#include <coreplugin/internal/PlatformJumpListHelper.h> |
54 | 58 | #include <coreplugin/internal/ProjectStartupTimerAddOn.h> |
55 | 59 | #include <coreplugin/internal/ProjectWindowNavigatorAddOn.h> |
| 60 | +#include <coreplugin/internal/PropertiesAddOn.h> |
56 | 61 | #include <coreplugin/internal/RecentFileAddOn.h> |
57 | 62 | #include <coreplugin/internal/TimeIndicatorPage.h> |
58 | 63 | #include <coreplugin/internal/TimelineAddOn.h> |
59 | 64 | #include <coreplugin/internal/UndoAddOn.h> |
60 | 65 | #include <coreplugin/internal/ViewVisibilityAddOn.h> |
61 | 66 | #include <coreplugin/internal/WorkspaceAddOn.h> |
62 | | -#include <coreplugin/ProjectWindowInterface.h> |
63 | | -#include <coreplugin/internal/CloseSaveCheckAddOn.h> |
64 | | -#include <coreplugin/internal/PlatformJumpListHelper.h> |
65 | | -#include <coreplugin/DspxClipboard.h> |
| 67 | +#include <coreplugin/PropertyEditorManager.h> |
66 | 68 |
|
67 | 69 | static auto getCoreActionExtension() { |
68 | 70 | return QAK_STATIC_ACTION_EXTENSION(coreplugin); |
@@ -188,6 +190,7 @@ namespace Core::Internal { |
188 | 190 | initializeColorScheme(); |
189 | 191 | initializeJumpList(); |
190 | 192 | initializeHelpContents(); |
| 193 | + initializePropertyEditors(); |
191 | 194 |
|
192 | 195 | QApplication::setQuitOnLastWindowClosed(false); |
193 | 196 |
|
@@ -252,7 +255,7 @@ namespace Core::Internal { |
252 | 255 | CoreInterface::actionRegistry()->addIconManifest(":/diffscope/coreplugin/icons/config.json"); |
253 | 256 | } |
254 | 257 |
|
255 | | - void CorePlugin::initializeSettings() const { |
| 258 | + void CorePlugin::initializeSettings() { |
256 | 259 | GeneralPage::setCorePluginTranslationsPath(pluginSpec()->location() + QStringLiteral("/translations")); |
257 | 260 | auto sc = CoreInterface::settingCatalog(); |
258 | 261 | auto generalPage = new GeneralPage; |
@@ -286,6 +289,7 @@ namespace Core::Internal { |
286 | 289 | ProjectWindowInterfaceRegistry::instance()->attach<ProjectWindowNavigatorAddOn>(); |
287 | 290 | ProjectWindowInterfaceRegistry::instance()->attach<AfterSavingNotifyAddOn>(); |
288 | 291 | ProjectWindowInterfaceRegistry::instance()->attach<CloseSaveCheckAddOn>(); |
| 292 | + ProjectWindowInterfaceRegistry::instance()->attach<PropertiesAddOn>(); |
289 | 293 |
|
290 | 294 | auto windowSystem = CoreInterface::windowSystem(); |
291 | 295 | connect(windowSystem, &WindowSystem::windowAboutToDestroy, this, [](WindowInterface *windowInterface) { |
@@ -374,6 +378,29 @@ namespace Core::Internal { |
374 | 378 | } |
375 | 379 | } |
376 | 380 |
|
| 381 | + void CorePlugin::initializePropertyEditors() { |
| 382 | + auto labelPropertyEditorComponent = new QQmlComponent(RuntimeInterface::qmlEngine(), "DiffScope.Core", "LabelPropertyEditor", this); |
| 383 | + if (labelPropertyEditorComponent->isError()) { |
| 384 | + qFatal() << labelPropertyEditorComponent->errorString(); |
| 385 | + } |
| 386 | + CoreInterface::propertyEditorManager()->addLabelComponent(labelPropertyEditorComponent); |
| 387 | + auto tempoPropertyEditorComponent = new QQmlComponent(RuntimeInterface::qmlEngine(), "DiffScope.Core", "TempoPropertyEditor", this); |
| 388 | + if (tempoPropertyEditorComponent->isError()) { |
| 389 | + qFatal() << tempoPropertyEditorComponent->errorString(); |
| 390 | + } |
| 391 | + CoreInterface::propertyEditorManager()->addTempoComponent(tempoPropertyEditorComponent); |
| 392 | + auto trackPropertyEditorComponent = new QQmlComponent(RuntimeInterface::qmlEngine(), "DiffScope.Core", "TrackPropertyEditor", this); |
| 393 | + if (trackPropertyEditorComponent->isError()) { |
| 394 | + qFatal() << trackPropertyEditorComponent->errorString(); |
| 395 | + } |
| 396 | + CoreInterface::propertyEditorManager()->addTrackComponent(trackPropertyEditorComponent); |
| 397 | + auto trackControlPropertyEditorComponent = new QQmlComponent(RuntimeInterface::qmlEngine(), "DiffScope.Core", "ControlPropertyEditor", this); |
| 398 | + if (trackControlPropertyEditorComponent->isError()) { |
| 399 | + qFatal() << trackControlPropertyEditorComponent->errorString(); |
| 400 | + } |
| 401 | + CoreInterface::propertyEditorManager()->addTrackComponent(trackControlPropertyEditorComponent); |
| 402 | + } |
| 403 | + |
377 | 404 | void CorePlugin::checkLastRun() { |
378 | 405 | auto settings = RuntimeInterface::settings(); |
379 | 406 | settings->setValue("lastInitializationAbortedFlag", false); |
|
0 commit comments