示例#1
0
文件: EntityApp.C 项目: juddy/edcde
EntityApp::EntityApp()
: mapCatalogDocument_(0),
  systemCharset_(UnivCharsetDesc(&range, 1))
{
  registerOption('c', SP_T("catalog_sysid"));
  registerOption('C');
  registerOption('D', SP_T("dir"));
}
ObjectTrackingSample::ObjectTrackingSample()
: m_algorithmName("LKT")
, m_maxCorners(200)
{
    std::vector<std::string> algos;
    algos.push_back("LKT");
    registerOption("Algorithm",       "", &m_algorithmName, algos);
    
    // object tracking options
    registerOption("m_maxCorners", "Tracking", &m_maxCorners, 0, 1000);
}
示例#3
0
    Tutorial()
      : SceneLoadingTutorialApplication("pathtracer",FEATURE_RTCORE)
    {
      registerOption("spp", [] (Ref<ParseStream> cin, const FileName& path) {
          g_spp = cin->getInt();
        }, "--spp <int>: sets number of samples per pixel");

      registerOption("max-path-length", [] (Ref<ParseStream> cin, const FileName& path) {
          g_max_path_length = cin->getInt();
        }, "--max-path-length <int>: sets maximal path length (1=primary+shadow)");

      registerOption("accumulate", [] (Ref<ParseStream> cin, const FileName& path) {
          g_accumulate = cin->getInt();
        }, "--accumulate <bool>: accumulate samples (on by default)");
    }
VideoTrackingSample::VideoTrackingSample()
: m_orbMatcher(cv::NORM_HAMMING, true)
, m_briefMatcher(cv::NORM_HAMMING, true)
, m_fastDetector(cv::Ptr<cv::FeatureDetector>(new cv::FastFeatureDetector()), 500)
{
    m_maxNumberOfPoints = 50;
    
    m_detector = cv::FeatureDetector::create("GridFAST");
    
    std::vector<std::string> trackingAlgorithms;
    
    trackingAlgorithms.push_back(TrackingAlgorithmKLT);
    trackingAlgorithms.push_back(TrackingAlgorithmORB);
    trackingAlgorithms.push_back(TrackingAlgorithmBRIEF);
    
    registerOption("Algorithm", "", &m_activeTrackingAlgorithm, trackingAlgorithms, 0);
    
    registerOption("Points count", "KLT", &m_maxNumberOfPoints, 1, 100);
}
示例#5
0
  Application::Application(int features)
    : rtcore("start_threads=1,set_affinity=1")
  {
    registerOption("help", [this] (Ref<ParseStream> cin, const FileName& path) {
        printCommandLineHelp();
        exit(1);
      }, "--help: prints help for all supported command line options");

    if (features & FEATURE_RTCORE)
    {
      registerOption("rtcore", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += "," + cin->getString();
        }, "--rtcore <string>: uses <string> to configure Embree device");
    
      registerOption("threads", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",threads=" + toString(cin->getInt());
        }, "--threads <int>: number of threads to use");
      
      registerOption("affinity", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",set_affinity=1";
        }, "--affinity: affinitize threads");

      registerOption("set_affinity", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",set_affinity=" + cin->getString();
        }, "--set_affinity <0/1>: enables or disables affinitizing of threads");
      registerOptionAlias("set_affinity","set-affinity");

      registerOption("start_threads", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",start_threads=" + cin->getString();
        }, "--start_threads <0/1>: starts threads at device creation time if set to 1");
      registerOptionAlias("start_threads","start-threads");
      
      registerOption("verbose", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",verbose=" + toString(cin->getInt());
        }, "--verbose <int>: sets verbosity level");
      
      registerOption("isa", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",isa=" + cin->getString();
        }, "--isa <string>: selects instruction set to use:\n"
        "  sse: select SSE codepath\n"
        "  sse2: select SSE2 codepath\n"
        "  sse3: select SSE3 codepath\n"
        "  ssse3: select SSSE3 codepath\n"
        "  sse4.1: select SSE4.1 codepath\n"
        "  sse4.2: select SSE4.2 codepath\n"
        "  avx: select AVX codepath\n"
        "  avxi: select AVXI codepath\n"
        "  avx2: select AVX2 codepath\n"
        "  avx512knl: select AVX512 codepath for KNL\n"
        "  avx512skx: select AVX512 codepath for SKX\n");
    } 
  }
示例#6
0
void GfuiApplication::initialize(bool bLoggingEnabled, int argc, char **argv)
{
	// Base initialization first.
	GfApplication::initialize(bLoggingEnabled, argc, argv);
	
	// Register command line options.
	registerOption("m", "hardmouse", /* nHasValue = */ false);
	
	// Help about these options.
	addOptionsHelpSyntaxLine("[-m|--hardmouse]");
	addOptionsHelpExplainLine("- hardmouse : Use hardware mouse cursor");
}
    Tutorial()
      : TutorialApplication("motion_blur_geometry",FEATURE_RTCORE) 
    {
      registerOption("time", [this] (Ref<ParseStream> cin, const FileName& path) {
        g_time = cin->getFloat();
      }, "--time <float>: time to render image at");

      registerOption("time-steps", [this] (Ref<ParseStream> cin, const FileName& path) {
        g_num_time_steps = cin->getInt();
        if (g_num_time_steps < 2) throw std::runtime_error("at least 2 time steps have to be used");
      }, "--time-steps <int>: number of time steps to use");

      registerOption("time-steps2", [this] (Ref<ParseStream> cin, const FileName& path) {
        g_num_time_steps2 = cin->getInt();
        if (g_num_time_steps2 < 2) throw std::runtime_error("at least 2 time steps have to be used");
      }, "--time-steps2 <int>: number of time steps to use");
    
      /* set default camera */
      camera.from = Vec3fa(6,11,0);
      camera.to   = Vec3fa(0,0,0);
    }
DrawingCanvasSample::DrawingCanvasSample()
: m_bilateralSigmaThreshold(100)
, m_bilateralColorThreshold(100)
, m_bilateralD(5)
, m_thresholdBlockSize(9)
, m_thresholdC(5)
{
    std::vector<std::string> stages;
    
    stages.push_back(kStageGrayscale);
    stages.push_back(kStageBilateralFilter);
    stages.push_back(kStageThreshold);
    stages.push_back(kStateResult);
    
    registerOption("View", "", &m_currentView, stages, 3);
    
    // Bilateral filter options:
    registerOption("Color threshold", "Bilateral filter", &m_bilateralColorThreshold, 1, 255);
    registerOption("Sigma threshold", "Bilateral filter", &m_bilateralSigmaThreshold, 1, 255);
    registerOption("B",               "Bilateral filter", &m_bilateralD, 1, 15);
    
    // Adaptive threshold options:
    registerOption("Block size", "Adaptive threshold",    &m_thresholdBlockSize, 1, 9);
    registerOption("C",          "Adaptive threshold",    &m_thresholdC,       -10, 10);
}
示例#9
0
void Application::initialize(bool bLoggingEnabled, int argc, char **argv)
{
	// Base initialization first.
	GfApplication::initialize(bLoggingEnabled, argc, argv);
	
	// Specific options.
	registerOption("c", "category", /* nHasValue = */ true);
	registerOption("n", "name", /* nHasValue = */ true);
	registerOption("b", "bump", /* nHasValue = */ false);
	registerOption("B", "noborder", /* nHasValue = */ false);
	registerOption("a", "all", /* nHasValue = */ false);
	registerOption("z", "calc", /* nHasValue = */ false);
	registerOption("s", "split", /* nHasValue = */ false);
	registerOption("S", "splitall", /* nHasValue = */ false);
	registerOption("E", "saveelev", /* nHasValue = */ true);
	registerOption("H", "height4", /* nHasValue = */ true);

	// Help on specific options.
	addOptionsHelpSyntaxLine("-c|--category <cat> -n|--name <name> [-b|bump] [-B|--noborder]");
	addOptionsHelpSyntaxLine("[-a|--all] [-z|--calc] [-s|split] [-S|splitall]");
	addOptionsHelpSyntaxLine("[-E|--saveelev <#ef> [-H|height4 <#hs>]]");
	
    addOptionsHelpExplainLine("<cat>    : track category (road, speedway, dirt...)");
    addOptionsHelpExplainLine("<name>   : track name");
    addOptionsHelpExplainLine("bump     : draw bump track");
    addOptionsHelpExplainLine("noborder : don't use terrain border "
							  "(relief supplied int clockwise, ext CC)");
    addOptionsHelpExplainLine("all      : draw all (default is track only)");
    addOptionsHelpExplainLine("calc     : only calculate track parameters and exit");
    addOptionsHelpExplainLine("split    : split the track and the terrain");
    addOptionsHelpExplainLine("splitall : split all");
    addOptionsHelpExplainLine("<#ef>    : # of the elevation file to save");
    addOptionsHelpExplainLine("  0: all elevation files");
    addOptionsHelpExplainLine("  1: elevation file of terrain + track");
    addOptionsHelpExplainLine("  2: elevation file of terrain with track white");
    addOptionsHelpExplainLine("  3: track only");
    addOptionsHelpExplainLine("  4: track elevations with height steps");
    addOptionsHelpExplainLine("<#hs> : nb of height steps for 4th elevation file [30]");
}
FeatureDetectionSample::FeatureDetectionSample()
: m_fdAlgorithmName("ORB")
, m_feAlgorithmName("FREAK")
, m_hessianThreshold(400)
, m_nFeatures(500)
, m_minMatches(4)
, m_drawEpipolarLines(false)
, m_drawMatches(true)
, m_drawPerspective(true)
{
    
    std::vector<std::string> fdAlgos, feAlgos;
    // feature detection options
    fdAlgos.push_back("ORB");
    fdAlgos.push_back("ORB");
    registerOption("Detector",       "", &m_fdAlgorithmName, fdAlgos);
    
    // feature extraction options
    feAlgos.push_back("ORB");
    feAlgos.push_back("SURF");
    feAlgos.push_back("FREAK");
    registerOption("Extractor",       "", &m_feAlgorithmName, feAlgos);
    
    // SURF feature detector options
    registerOption("hessianThreshold", "SURF", &m_hessianThreshold, 300, 500);
    
    // ORB feature detector options
    registerOption("nFeatures", "ORB", &m_nFeatures, 0, 1500);
    
    // Matcher options
    registerOption("Minumum matches", "Matcher", &m_minMatches, 4, 200);
    
    // Display options
    registerOption("Matches", "Draw", &m_drawMatches);
    registerOption("Epipolar", "Draw", &m_drawEpipolarLines);
    registerOption("Perspective", "Draw", &m_drawPerspective);
}
示例#11
0
  SceneLoadingTutorialApplication::SceneLoadingTutorialApplication (const std::string& tutorialName, int features)

    : TutorialApplication(tutorialName, features),
      scene(new SceneGraph::GroupNode),
      convert_tris_to_quads(false),
      convert_tris_to_quads_prop(inf),
      convert_bezier_to_lines(false),
      convert_hair_to_curves(false),
      convert_bezier_to_bspline(false),
      convert_bspline_to_bezier(false),
      remove_mblur(false),
      remove_non_mblur(false),
      sceneFilename(""),
      instancing_mode(SceneGraph::INSTANCING_NONE),
      print_scene_cameras(false)
  {
    registerOption("i", [this] (Ref<ParseStream> cin, const FileName& path) {
        sceneFilename = path + cin->getFileName();
      }, "-i <filename>: parses scene from <filename>");

    registerOption("animlist", [this] (Ref<ParseStream> cin, const FileName& path) {
        FileName listFilename = path + cin->getFileName();

        std::ifstream listFile;
        listFile.open(listFilename.c_str());
        if (!listFile.is_open()) {
          THROW_RUNTIME_ERROR("cannot open " + listFilename.str());
        }
        else
        {
          while (!listFile.eof())
          {
            std::string line;
            listFile >> line;
            if (line != "")
              keyFramesFilenames.push_back(listFilename.path() + line);
          }
        }
      }, "-animlist <filename>: parses a sequence of .obj/.xml files listed in <filename> and adds them to the scene");
示例#12
0
  TutorialApplication::TutorialApplication (const std::string& tutorialName, int features)

    : Application(features),
      tutorialName(tutorialName),

      shader(SHADER_DEFAULT),

      width(512),
      height(512),
      pixels(nullptr),

      outputImageFilename(""),

      skipBenchmarkFrames(0),
      numBenchmarkFrames(0),
      numBenchmarkRepetitions(1),

      interactive(true),
      fullscreen(false),

      window_width(512),
      window_height(512),
      windowID(0),

      time0(getSeconds()),
      debug_int0(0),
      debug_int1(0),

      mouseMode(0),
      clickX(0), clickY(0),
      speed(1.0f),
      moveDelta(zero),
      command_line_camera(false),
      print_frame_rate(false),
      avg_render_time(64,1.0),
      avg_frame_time(64,1.0),
      avg_mrayps(64,1.0),
      print_camera(false),

      debug0(0),
      debug1(0),
      debug2(0),
      debug3(0),

      iflags_coherent(RTC_INTERSECT_COHERENT),
      iflags_incoherent(RTC_INTERSECT_INCOHERENT)
  {
    /* only a single instance of this class is supported */
    assert(instance == nullptr);
    instance = this;

    /* for best performance set FTZ and DAZ flags in MXCSR control and status register */
    _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
    _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);

    registerOption("c", [this] (Ref<ParseStream> cin, const FileName& path) {
        FileName file = path + cin->getFileName();
        parseCommandLine(new ParseStream(new LineCommentFilter(file, "#")), file.path());
      }, "-c <filename>: parses command line option from <filename>");

    registerOption("o", [this] (Ref<ParseStream> cin, const FileName& path) {
        outputImageFilename = cin->getFileName();
        interactive = false;
      }, "-o <filename>: output image filename");

    /* camera settings */
    registerOption("vp", [this] (Ref<ParseStream> cin, const FileName& path) {
        camera.from = cin->getVec3fa();
        command_line_camera = true;
      }, "--vp <float> <float> <float>: camera position");

    registerOption("vi", [this] (Ref<ParseStream> cin, const FileName& path) {
        camera.to = cin->getVec3fa();
        command_line_camera = true;
      }, "--vi <float> <float> <float>: camera lookat position");

    registerOption("vd", [this] (Ref<ParseStream> cin, const FileName& path) {
        camera.to = camera.from + cin->getVec3fa();
        command_line_camera = true;
      }, "--vd <float> <float> <float>: camera direction vector");

    registerOption("vu", [this] (Ref<ParseStream> cin, const FileName& path) {
        camera.up = cin->getVec3fa();
        command_line_camera = true;
      }, "--vu <float> <float> <float>: camera up vector");

    registerOption("fov", [this] (Ref<ParseStream> cin, const FileName& path) {
        camera.fov = cin->getFloat();
        command_line_camera = true;
      }, "--fov <float>: vertical field of view");

    /* framebuffer settings */
    registerOption("size", [this] (Ref<ParseStream> cin, const FileName& path) {
        width = cin->getInt();
        height = cin->getInt();
      }, "--size <width> <height>: sets image size");

    registerOption("fullscreen", [this] (Ref<ParseStream> cin, const FileName& path) {
        fullscreen = true;
      }, "--fullscreen: starts in fullscreen mode");

    registerOption("benchmark", [this] (Ref<ParseStream> cin, const FileName& path) {
        skipBenchmarkFrames = cin->getInt();
        numBenchmarkFrames  = cin->getInt();
        if (cin->peek() != "" && cin->peek()[0] != '-')
          numBenchmarkRepetitions = cin->getInt();
        interactive = false;
        rtcore += ",benchmark=1,start_threads=1";
      }, "--benchmark <N> <M> <R>: enabled benchmark mode, builds scene, skips N frames, renders M frames, and repeats this R times");

    registerOption("nodisplay", [this] (Ref<ParseStream> cin, const FileName& path) {
        skipBenchmarkFrames = 0;
        numBenchmarkFrames  = 2048;
        interactive = false;
      }, "--nodisplay: enabled benchmark mode, continously renders frames");

    registerOption("print-frame-rate", [this] (Ref<ParseStream> cin, const FileName& path) {
        print_frame_rate = true;
      }, "--print-frame-rate: prints framerate for each frame on console");

     registerOption("print-camera", [this] (Ref<ParseStream> cin, const FileName& path) {
         print_camera = true;
      }, "--print-camera: prints camera for each frame on console");

     registerOption("debug0", [this] (Ref<ParseStream> cin, const FileName& path) {
         debug0 = cin->getInt();
       }, "--debug0: sets internal debugging value");

     registerOption("debug1", [this] (Ref<ParseStream> cin, const FileName& path) {
         debug1 = cin->getInt();
       }, "--debug1: sets internal debugging value");

     registerOption("debug2", [this] (Ref<ParseStream> cin, const FileName& path) {
         debug2 = cin->getInt();
       }, "--debug2: sets internal debugging value");

     registerOption("debug3", [this] (Ref<ParseStream> cin, const FileName& path) {
         debug3 = cin->getInt();
       }, "--debug3: sets internal debugging value");

    /* output filename */
    registerOption("shader", [this] (Ref<ParseStream> cin, const FileName& path) {
        std::string mode = cin->getString();
        if      (mode == "default" ) shader = SHADER_DEFAULT;
        else if (mode == "eyelight") shader = SHADER_EYELIGHT;
        else if (mode == "occlusion") shader = SHADER_OCCLUSION;
        else if (mode == "uv"      ) shader = SHADER_UV;
        else if (mode == "texcoords") shader = SHADER_TEXCOORDS;
        else if (mode == "texcoords-grid") shader = SHADER_TEXCOORDS_GRID;
        else if (mode == "Ng"      ) shader = SHADER_NG;
        else if (mode == "cycles"  ) { shader = SHADER_CYCLES; scale = cin->getFloat(); }
        else if (mode == "geomID"  ) shader = SHADER_GEOMID;
        else if (mode == "primID"  ) shader = SHADER_GEOMID_PRIMID;
        else if (mode == "ao"      ) shader = SHADER_AMBIENT_OCCLUSION;
        else throw std::runtime_error("invalid shader:" +mode);
      },
      "--shader <string>: sets shader to use at startup\n"
      "  default: default tutorial shader\n"
      "  eyelight: eyelight shading\n"
      "  occlusion: occlusion shading\n"
      "  uv: uv debug shader\n"
      "  texcoords: texture coordinate debug shader\n"
      "  texcoords-grid: grid texture debug shader\n"
      "  Ng: visualization of shading normal\n"
      "  cycles <float>: CPU cycle visualization\n"
      "  geomID: visualization of geometry ID\n"
      "  primID: visualization of geometry and primitive ID\n"
      "  ao: ambient occlusion shader");

    if (features & FEATURE_STREAM)
    {
      /* register parsing of stream mode */
      registerOption("mode", [] (Ref<ParseStream> cin, const FileName& path) {
          std::string mode = cin->getString();
          if      (mode == "normal") g_mode = MODE_NORMAL;
          else if (mode == "stream") g_mode = MODE_STREAM;
          else throw std::runtime_error("invalid mode:" +mode);
        },
        "--mode: sets rendering mode\n"
        "  normal  : normal mode\n"
        "  stream  : stream mode\n");
    }

    registerOption("coherent", [this] (Ref<ParseStream> cin, const FileName& path) {
        g_iflags_coherent   = iflags_coherent   = RTC_INTERSECT_COHERENT;
        g_iflags_incoherent = iflags_incoherent = RTC_INTERSECT_COHERENT;
      }, "--coherent: force using RTC_INTERSECT_COHERENT hint when tracing rays");

    registerOption("incoherent", [this] (Ref<ParseStream> cin, const FileName& path) {
        g_iflags_coherent   = iflags_coherent   = RTC_INTERSECT_INCOHERENT;
        g_iflags_incoherent = iflags_incoherent = RTC_INTERSECT_INCOHERENT;
      }, "--incoherent: force using RTC_INTERSECT_INCOHERENT hint when tracing rays");
  }
示例#13
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
bool ProgramOptions::registerOption(const String& optionName, ValueReq valueReq, OptionFlags optionFlags)
{
    return registerOption(optionName, "", "", valueReq, optionFlags);
}
示例#14
0
  Application::Application(int features)
    : rtcore("start_threads=1,set_affinity=1"), verbosity(0),
      log_delta(false),
      start_time(getSeconds()),
      last_time(start_time),
      last_virtual_memory(0),
      last_resident_memory(0)
  {
    if (instance)
      throw std::runtime_error("internal error: applicaton already created");

    instance = this;

    registerOption("help", [this] (Ref<ParseStream> cin, const FileName& path) {
        printCommandLineHelp();
        exit(1);
      }, "--help: prints help for all supported command line options");

    if (features & FEATURE_RTCORE)
    {
      registerOption("rtcore", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += "," + cin->getString();
        }, "--rtcore <string>: uses <string> to configure Embree device");
    
      registerOption("threads", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",threads=" + toString(cin->getInt());
        }, "--threads <int>: number of threads to use");
      
      registerOption("affinity", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",set_affinity=1";
        }, "--affinity: affinitize threads");

      registerOption("set_affinity", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",set_affinity=" + cin->getString();
        }, "--set_affinity <0/1>: enables or disables affinitizing of threads");
      registerOptionAlias("set_affinity","set-affinity");

      registerOption("start_threads", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",start_threads=" + cin->getString();
        }, "--start_threads <0/1>: starts threads at device creation time if set to 1");
      registerOptionAlias("start_threads","start-threads");
      
      registerOption("verbose", [this] (Ref<ParseStream> cin, const FileName& path) {
          verbosity = cin->getInt();
          rtcore += ",verbose=" + toString(verbosity);
        }, "--verbose <int>: sets verbosity level");

      registerOption("delta", [this] (Ref<ParseStream> cin, const FileName& path) {
          log_delta = true;
        }, "--delta: print delta numbers in log");
      
      registerOption("isa", [this] (Ref<ParseStream> cin, const FileName& path) {
          rtcore += ",isa=" + cin->getString();
        }, "--isa <string>: selects instruction set to use:\n"
        "  sse: select SSE codepath\n"
        "  sse2: select SSE2 codepath\n"
        "  sse3: select SSE3 codepath\n"
        "  ssse3: select SSSE3 codepath\n"
        "  sse4.1: select SSE4.1 codepath\n"
        "  sse4.2: select SSE4.2 codepath\n"
        "  avx: select AVX codepath\n"
        "  avxi: select AVXI codepath\n"
        "  avx2: select AVX2 codepath\n"
        "  avx512knl: select AVX512 codepath for KNL\n"
        "  avx512skx: select AVX512 codepath for SKX\n");
    } 
  }
示例#15
0
void SettingsManager::createInstance(const QString &path, QObject *parent)
{
	if (m_instance)
	{
		return;
	}

	m_instance = new SettingsManager(parent);
	m_globalPath = path + QLatin1String("/otter.conf");
	m_overridePath = path + QLatin1String("/override.ini");
	m_optionIdentifierEnumerator = m_instance->metaObject()->indexOfEnumerator(QLatin1String("OptionIdentifier").data());
	m_identifierCounter = m_instance->metaObject()->enumerator(m_optionIdentifierEnumerator).keyCount();

	m_definitions.reserve(m_identifierCounter);

	registerOption(AddressField_CompletionDisplayModeOption, QLatin1String("compact"), EnumerationType, QStringList({QLatin1String("compact"), QLatin1String("columns")}));
	registerOption(AddressField_CompletionModeOption, QLatin1String("inlineAndPopup"), EnumerationType, QStringList({QLatin1String("none"), QLatin1String("inline"), QLatin1String("popup"), QLatin1String("inlineAndPopup")}));
	registerOption(AddressField_DropActionOption, QLatin1String("replace"), EnumerationType, QStringList({QLatin1String("replace"), QLatin1String("paste"), QLatin1String("pasteAndGo")}));
	registerOption(AddressField_EnableHistoryDropdownOption, true, BooleanType);
	registerOption(AddressField_HostLookupTimeoutOption, 200, IntegerType);
	registerOption(AddressField_PasteAndGoOnMiddleClickOption, true, BooleanType);
	registerOption(AddressField_SelectAllOnFocusOption, true, BooleanType);
	registerOption(AddressField_ShowBookmarkIconOption, true, BooleanType);
	registerOption(AddressField_ShowCompletionCategoriesOption, true, BooleanType);
	registerOption(AddressField_ShowFeedsIconOption, true, BooleanType);
	registerOption(AddressField_ShowLoadPluginsIconOption, true, BooleanType);
	registerOption(AddressField_ShowUrlIconOption, false, BooleanType);
	registerOption(AddressField_SuggestBookmarksOption, true, BooleanType);
	registerOption(AddressField_SuggestHistoryOption, true, BooleanType);
	registerOption(AddressField_SuggestLocalPathsOption, true, BooleanType);
	registerOption(AddressField_SuggestSearchOption, true, BooleanType);
	registerOption(AddressField_SuggestSpecialPagesOption, true, BooleanType);
	registerOption(Backends_PasswordsOption, QLatin1String("file"), EnumerationType, QStringList(QLatin1String("file")));
	registerOption(Backends_WebOption, QLatin1String("qtwebkit"), EnumerationType, QStringList(QLatin1String("qtwebkit")));
	registerOption(Browser_AlwaysAskWhereToSaveDownloadOption, true, BooleanType);
	registerOption(Browser_DelayRestoringOfBackgroundTabsOption, false, BooleanType);
	registerOption(Browser_EnableFullScreenOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")}));
	registerOption(Browser_EnableGeolocationOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")}));
	registerOption(Browser_EnableImagesOption, QLatin1String("enable"), EnumerationType, QStringList({QLatin1String("enable"), QLatin1String("onlyCached"), QLatin1String("disabled")}));
	registerOption(Browser_EnableJavaOption, true, BooleanType);
	registerOption(Browser_EnableJavaScriptOption, true, BooleanType);
	registerOption(Browser_EnableLocalStorageOption, true, BooleanType);
	registerOption(Browser_EnableMediaCaptureAudioOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")}));
	registerOption(Browser_EnableMediaCaptureVideoOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")}));
	registerOption(Browser_EnableMediaPlaybackAudioOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")}));
	registerOption(Browser_EnableMouseGesturesOption, true, BooleanType);
	registerOption(Browser_EnableNotificationsOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")}));
	registerOption(Browser_EnableOfflineStorageDatabaseOption, false, BooleanType);
	registerOption(Browser_EnableOfflineWebApplicationCacheOption, false, BooleanType);
	registerOption(Browser_EnablePluginsOption, QLatin1String("onDemand"), EnumerationType, QStringList({QLatin1String("enabled"), QLatin1String("onDemand"), QLatin1String("disabled")}));
	registerOption(Browser_EnablePointerLockOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")}));
	registerOption(Browser_EnableSingleKeyShortcutsOption, true, BooleanType);
	registerOption(Browser_EnableSpellCheckOption, true, BooleanType);
	registerOption(Browser_EnableTrayIconOption, true, BooleanType);
	registerOption(Browser_EnableWebglOption, true, BooleanType);
	registerOption(Browser_HomePageOption, QString(), StringType);
	registerOption(Browser_JavaScriptCanAccessClipboardOption, false, BooleanType);
	registerOption(Browser_JavaScriptCanChangeWindowGeometryOption, true, BooleanType);
	registerOption(Browser_JavaScriptCanCloseWindowsOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")}));
	registerOption(Browser_JavaScriptCanDisableContextMenuOption, true, BooleanType);
	registerOption(Browser_JavaScriptCanOpenWindowsOption, true, BooleanType);
	registerOption(Browser_JavaScriptCanShowStatusMessagesOption, false, BooleanType);
	registerOption(Browser_KeyboardShortcutsProfilesOrderOption, QStringList({QLatin1String("platform"), QLatin1String("default")}), ListType);
	registerOption(Browser_LocaleOption, QLatin1String("system"), StringType);
	registerOption(Browser_MouseProfilesOrderOption, QStringList(QLatin1String("default")), ListType);
	registerOption(Browser_OfflineStorageLimitOption, 10240, IntegerType);
	registerOption(Browser_OfflineWebApplicationCacheLimitOption, 10240, IntegerType);
	registerOption(Browser_OpenLinksInNewTabOption, true, BooleanType);
	registerOption(Browser_PrivateModeOption, false, BooleanType);
	registerOption(Browser_RememberPasswordsOption, false, BooleanType);
	registerOption(Browser_ReuseCurrentTabOption, false, BooleanType);
	registerOption(Browser_ShowSelectionContextMenuOnDoubleClickOption, false, BooleanType);
	registerOption(Browser_SpellCheckDictionaryOption, QString(), StringType);
	registerOption(Browser_StartupBehaviorOption, QLatin1String("continuePrevious"), EnumerationType, QStringList({QLatin1String("continuePrevious"), QLatin1String("showDialog"), QLatin1String("startHomePage"), QLatin1String("startStartPage"), QLatin1String("startEmpty")}));
	registerOption(Browser_TabCrashingActionOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("close"), QLatin1String("reload")}));
	registerOption(Browser_ToolTipsModeOption, QLatin1String("extended"), EnumerationType, QStringList({QLatin1String("disabled"), QLatin1String("standard"), QLatin1String("extended")}));
	registerOption(Browser_TransferStartingActionOption, QLatin1String("openTab"), EnumerationType, QStringList({QLatin1String("openTab"), QLatin1String("openBackgroundTab"), QLatin1String("openPanel"), QLatin1String("doNothing")}));
	registerOption(Cache_DiskCacheLimitOption, 51200, IntegerType);
	registerOption(Cache_PagesInMemoryLimitOption, 5, IntegerType);
	registerOption(Choices_WarnFormResendOption, true, BooleanType);
	registerOption(Choices_WarnLowDiskSpaceOption, QLatin1String("warn"), EnumerationType, QStringList({QLatin1String("warn"), QLatin1String("continueReadOnly"), QLatin1String("continueReadWrite")}));
	registerOption(Choices_WarnOpenBookmarkFolderOption, true, BooleanType);
	registerOption(Choices_WarnOpenMultipleDroppedUrlsOption, true, BooleanType);
	registerOption(Choices_WarnQuitOption, QLatin1String("noWarn"), EnumerationType, QStringList({QLatin1String("alwaysWarn"), QLatin1String("warnOpenTabs"), QLatin1String("noWarn")}));
	registerOption(Choices_WarnQuitTransfersOption, true, BooleanType);
	registerOption(Content_BackgroundColorOption, QLatin1String("#FFFFFF"), ColorType);
	registerOption(Content_CursiveFontOption, QLatin1String("Impact"), FontType);
	registerOption(Content_DefaultCharacterEncodingOption, QLatin1String("auto"), StringType);
	registerOption(Content_DefaultFixedFontSizeOption, 16, IntegerType);
	registerOption(Content_DefaultFontSizeOption, 16, IntegerType);
	registerOption(Content_DefaultZoomOption, 100, IntegerType);
	registerOption(Content_FantasyFontOption, QLatin1String("Comic Sans MS"), FontType);
	registerOption(Content_FixedFontOption, QLatin1String("DejaVu Sans Mono"), FontType);
	registerOption(Content_LinkColorOption, QLatin1String("#0000EE"), ColorType);
	registerOption(Content_MinimumFontSizeOption, -1, IntegerType);
	registerOption(Content_PageReloadTimeOption, -1, IntegerType);
	registerOption(Content_PopupsPolicyOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("blockAll"), QLatin1String("openAll"), QLatin1String("openAllInBackground")}));
	registerOption(Content_SansSerifFontOption, QLatin1String("DejaVu Sans"), FontType);
	registerOption(Content_SerifFontOption, QLatin1String("DejaVu Serif"), FontType);
	registerOption(Content_StandardFontOption, QLatin1String("DejaVu Serif"), FontType);
	registerOption(Content_TextColorOption, QLatin1String("#000000"), ColorType);
	registerOption(Content_UserStyleSheetOption, QString(), PathType);
	registerOption(Content_VisitedLinkColorOption, QLatin1String("#551A8B"), ColorType);
	registerOption(Content_ZoomTextOnlyOption, false, BooleanType);
	registerOption(ContentBlocking_CosmeticFiltersModeOption, QLatin1String("all"), EnumerationType, QStringList({QLatin1String("all"), QLatin1String("domainOnly"), QLatin1String("none")}));
	registerOption(ContentBlocking_EnableContentBlockingOption, true, BooleanType);
	registerOption(ContentBlocking_EnableWildcardsOption, true, BooleanType);
	registerOption(ContentBlocking_ProfilesOption, QStringList(), ListType);
	registerOption(History_BrowsingLimitAmountGlobalOption, 1000, IntegerType);
	registerOption(History_BrowsingLimitAmountWindowOption, 50, IntegerType);
	registerOption(History_BrowsingLimitPeriodOption, 30, IntegerType);
	registerOption(History_ClearOnCloseOption, QStringList(), ListType);
	registerOption(History_DownloadsLimitPeriodOption, 7, IntegerType);
	registerOption(History_ExpandBranchesOption, QLatin1String("first"), EnumerationType, QStringList({QLatin1String("first"), QLatin1String("all"), QLatin1String("none")}));
	registerOption(History_ManualClearOptionsOption, QStringList({QLatin1String("browsing"), QLatin1String("cookies"), QLatin1String("forms"), QLatin1String("downloads"), QLatin1String("caches")}), ListType);
	registerOption(History_ManualClearPeriodOption, 1, IntegerType);
	registerOption(History_RememberBrowsingOption, true, BooleanType);
	registerOption(History_RememberDownloadsOption, true, BooleanType);
	registerOption(History_StoreFaviconsOption, true, BooleanType);
	registerOption(Interface_DateTimeFormatOption, QString(), StringType);
	registerOption(Interface_LastTabClosingActionOption, QLatin1String("openTab"), EnumerationType, QStringList({QLatin1String("openTab"), QLatin1String("closeWindow"), QLatin1String("closeWindowIfNotLast"), QLatin1String("doNothing")}));
	registerOption(Interface_LockToolBarsOption, false, BooleanType);
	registerOption(Interface_MaximizeNewWindowsOption, true, BooleanType);
	registerOption(Interface_NewTabOpeningActionOption, QLatin1String("maximizeTab"), EnumerationType, QStringList({QLatin1String("doNothing"), QLatin1String("maximizeTab"), QLatin1String("cascadeAll"), QLatin1String("tileAll")}));
	registerOption(Interface_NotificationVisibilityDurationOption, 5, IntegerType);
	registerOption(Interface_ShowScrollBarsOption, true, BooleanType);
	registerOption(Interface_ShowSizeGripOption, true, BooleanType);
	registerOption(Interface_StyleSheetOption, QString(), PathType);
	registerOption(Interface_UseNativeNotificationsOption, true, BooleanType);
	registerOption(Interface_UseSystemIconThemeOption, false, BooleanType);
	registerOption(Interface_WidgetStyleOption, QString(), StringType);
	registerOption(Network_AcceptLanguageOption, QLatin1String("system,*;q=0.9"), StringType);
	registerOption(Network_CookiesKeepModeOption, QLatin1String("keepUntilExpires"), EnumerationType, QStringList({QLatin1String("keepUntilExpires"), QLatin1String("keepUntilExit"), QLatin1String("ask")}));
	registerOption(Network_CookiesPolicyOption, QLatin1String("acceptAll"), EnumerationType, QStringList({QLatin1String("acceptAll"), QLatin1String("acceptExisting"), QLatin1String("readOnly"), QLatin1String("ignore")}));
	registerOption(Network_DoNotTrackPolicyOption, QLatin1String("skip"), EnumerationType, QStringList({QLatin1String("skip"), QLatin1String("allow"), QLatin1String("doNotAllow")}));
	registerOption(Network_EnableReferrerOption, true, BooleanType);
	registerOption(Network_ProxyModeOption, QLatin1String("system"), EnumerationType, QStringList({QLatin1String("noproxy"), QLatin1String("manual"), QLatin1String("system"), QLatin1String("automatic")}));
	registerOption(Network_ThirdPartyCookiesAcceptedHostsOption, QStringList(), ListType);
	registerOption(Network_ThirdPartyCookiesPolicyOption, QLatin1String("acceptAll"), EnumerationType, QStringList({QLatin1String("acceptAll"), QLatin1String("acceptExisting"), QLatin1String("ignore")}));
	registerOption(Network_ThirdPartyCookiesRejectedHostsOption, QStringList(), ListType);
	registerOption(Network_UserAgentOption, QLatin1String("default"), StringType);
	registerOption(Network_WorkOfflineOption, false, BooleanType);
	registerOption(Paths_DownloadsOption, QStandardPaths::writableLocation(QStandardPaths::DownloadLocation), PathType);
	registerOption(Paths_OpenFileOption, QStandardPaths::standardLocations(QStandardPaths::HomeLocation).value(0), PathType);
	registerOption(Paths_SaveFileOption, QStandardPaths::writableLocation(QStandardPaths::DownloadLocation), PathType);
	registerOption(Proxy_AutomaticConfigurationPathOption, QString(), PathType);
	registerOption(Proxy_CommonPortOption, 8080, IntegerType);
	registerOption(Proxy_CommonServersOption, QString(), StringType);
	registerOption(Proxy_ExceptionsOption, QStringList(QLatin1String("localhost")), ListType);
	registerOption(Proxy_FtpPortOption, 8080, IntegerType);
	registerOption(Proxy_FtpServersOption, QString(), StringType);
	registerOption(Proxy_HttpPortOption, 8080, IntegerType);
	registerOption(Proxy_HttpServersOption, QString(), StringType);
	registerOption(Proxy_HttpsPortOption, 8080, IntegerType);
	registerOption(Proxy_HttpsServersOption, QString(), StringType);
	registerOption(Proxy_SocksPortOption, 0, IntegerType);
	registerOption(Proxy_SocksServersOption, QString(), StringType);
	registerOption(Proxy_UseCommonOption, false, BooleanType);
	registerOption(Proxy_UseFtpOption, false, BooleanType);
	registerOption(Proxy_UseHttpOption, false, BooleanType);
	registerOption(Proxy_UseHttpsOption, false, BooleanType);
	registerOption(Proxy_UseSocksOption, false, BooleanType);
	registerOption(Proxy_UseSystemAuthenticationOption, false, BooleanType);
	registerOption(Search_DefaultQuickSearchEngineOption, QLatin1String("duckduckgo"), EnumerationType, QStringList(QLatin1String("duckduckgo")));
	registerOption(Search_DefaultSearchEngineOption, QLatin1String("duckduckgo"), EnumerationType, QStringList(QLatin1String("duckduckgo")));
	registerOption(Search_EnableFindInPageAsYouTypeOption, true, BooleanType);
	registerOption(Search_ReuseLastQuickFindQueryOption, false, BooleanType);
	registerOption(Search_SearchEnginesOrderOption, QStringList({QLatin1String("duckduckgo"), QLatin1String("wikipedia"), QLatin1String("startpage"), QLatin1String("google"), QLatin1String("yahoo"), QLatin1String("bing"), QLatin1String("youtube")}), ListType);
	registerOption(Search_SearchEnginesSuggestionsOption, false, BooleanType);
	registerOption(Security_CiphersOption, QStringList(QLatin1String("default")), ListType);
	registerOption(Security_IgnoreSslErrorsOption, QStringList(), ListType);
	registerOption(Sessions_OpenInExistingWindowOption, false, BooleanType);
	registerOption(Sidebar_CurrentPanelOption, QString(), StringType);
	registerOption(Sidebar_PanelsOption, QStringList({QLatin1String("bookmarks"), QLatin1String("history"), QLatin1String("notes"), QLatin1String("transfers")}), ListType);
	registerOption(Sidebar_ReverseOption, false, BooleanType);
	registerOption(Sidebar_ShowToggleEdgeOption, false, BooleanType);
	registerOption(Sidebar_VisibleOption, false, BooleanType);
	registerOption(Sidebar_WidthOption, 300, IntegerType);
	registerOption(SourceViewer_ShowLineNumbersOption, true, BooleanType);
	registerOption(SourceViewer_WrapLinesOption, false, BooleanType);
	registerOption(StartPage_BackgroundColorOption, QString(), ColorType);
	registerOption(StartPage_BackgroundModeOption, QLatin1String("standard"), EnumerationType, QStringList({QLatin1String("standard"), QLatin1String("bestFit"), QLatin1String("center"), QLatin1String("stretch"), QLatin1String("tile")}));
	registerOption(StartPage_BackgroundPathOption, QString(), StringType);
	registerOption(StartPage_BookmarksFolderOption, QLatin1String("/Start Page/"), StringType);
	registerOption(StartPage_EnableStartPageOption, true, BooleanType);
	registerOption(StartPage_ShowAddTileOption, true, BooleanType);
	registerOption(StartPage_ShowSearchFieldOption, true, BooleanType);
	registerOption(StartPage_TileBackgroundModeOption, QLatin1String("thumbnail"), EnumerationType, QStringList({QLatin1String("none"), QLatin1String("thumbnail"), QLatin1String("favicon")}));
	registerOption(StartPage_TileHeightOption, 190, IntegerType);
	registerOption(StartPage_TileWidthOption, 270, IntegerType);
	registerOption(StartPage_TilesPerRowOption, 0, IntegerType);
	registerOption(StartPage_ZoomLevelOption, 100, IntegerType);
	registerOption(TabBar_EnablePreviewsOption, true, BooleanType);
	registerOption(TabBar_EnableThumbnailsOption, false, BooleanType);
	registerOption(TabBar_MaximumTabHeightOption, -1, IntegerType);
	registerOption(TabBar_MinimumTabHeightOption, -1, IntegerType);
	registerOption(TabBar_MaximumTabWidthOption, 250, IntegerType);
	registerOption(TabBar_MinimumTabWidthOption, -1, IntegerType);
	registerOption(TabBar_OpenNextToActiveOption, true, BooleanType);
	registerOption(TabBar_RequireModifierToSwitchTabOnScrollOption, true, BooleanType);
	registerOption(TabBar_ShowCloseButtonOption, true, BooleanType);
	registerOption(TabBar_ShowUrlIconOption, true, BooleanType);
	registerOption(Updates_ActiveChannelsOption, QStringList(), ListType);
	registerOption(Updates_AutomaticInstallOption, false, BooleanType);
	registerOption(Updates_CheckIntervalOption, 7, IntegerType);
	registerOption(Updates_LastCheckOption, QString(), StringType);
	registerOption(Updates_ServerUrlOption, QLatin1String("https://www.otter-browser.org/updates/update.json"), StringType);
}