mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add support for a field to be linked to a value updated by code outside the object itself. Mark the linked field by using a background color and icons for linked/unlinked state. The auto value states is set as attributes in the project xml file. Add reference implementation in cafTestApplication, see Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp * Tree View Editor: Avoid sending notification if selection is unchanged * Use std++17 in test solution * Move icons to icon factory * add support for creating QIcon from SVG text string
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
|
|
#include "MainWindow.h"
|
|
|
|
#include "cafCmdFeatureManager.h"
|
|
#include "cafFactory.h"
|
|
#include "cafPdmDefaultObjectFactory.h"
|
|
#include "cafPdmUiFieldEditorHandle.h"
|
|
#include "cafUiAppearanceSettings.h"
|
|
|
|
#include <QApplication>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
// https://www.w3.org/wiki/CSS/Properties/color/keywords
|
|
caf::UiAppearanceSettings::instance()->setAutoValueEditorColor("moccasin");
|
|
|
|
auto appExitCode = 0;
|
|
{
|
|
QApplication app(argc, argv);
|
|
|
|
MainWindow window;
|
|
window.setWindowTitle("Ceetron Application Framework Test Application");
|
|
window.resize(1000, 810);
|
|
window.show();
|
|
|
|
appExitCode = app.exec();
|
|
}
|
|
|
|
caf::CmdFeatureManager::deleteSingleton();
|
|
caf::PdmDefaultObjectFactory::deleteSingleton();
|
|
|
|
{
|
|
auto factory = caf::Factory<caf::PdmUiFieldEditorHandle, QString>::instance();
|
|
factory->deleteCreatorObjects();
|
|
}
|
|
{
|
|
auto factory = caf::Factory<caf::CmdFeature, std::string>::instance();
|
|
factory->deleteCreatorObjects();
|
|
}
|
|
|
|
return appExitCode;
|
|
}
|