toonz/sources/toonz/preferencespopup.cpp
//-----------------------------------------------------------------------------
// returns list for combo items
// ComboBoxItem consists of an item label string and data to be stored in
// preferences
returns list for combo items
ComboBoxItem consists of an item label string and data to be stored in
preferences
returns list for combo items ComboBoxItem consists of an item label string and data to be stored in preferences
QList<ComboBoxItem> PreferencesPopup::getComboItemList(
    PreferencesItemId id) const {
  const static QMap<PreferencesItemId, QList<ComboBoxItem>> comboItemsTable = {
      {pathAliasPriority,
       {{tr("Project Folder Aliases (+drawings, +scenes, etc.)"),
         Preferences::ProjectFolderAliases},
        {tr("Scene Folder Alias ($scenefolder)"),
         Preferences::SceneFolderAlias},
        {tr("Use Project Folder Aliases Only"),
         Preferences::ProjectFolderOnly}}},
      {linearUnits,  
       {{tr("cm"), "cm"},
        {tr("mm"), "mm"},
        {tr("inch"), "inch"},
        {tr("field"), "field"},
        {tr("pixel"), "pixel"}}},
      {functionEditorToggle,
       {{tr("Graph Editor Opens in Popup"),
         Preferences::ShowGraphEditorInPopup},
        {tr("Spreadsheet Opens in Popup"),
         Preferences::ShowFunctionSpreadsheetInPopup},
        {tr("Toggle Between Graph Editor and Spreadsheet"),
         Preferences::ToggleBetweenGraphAndSpreadsheet}}},
      {viewerZoomCenter, {{tr("Mouse Cursor"), 0}, {tr("Viewer Center"), 1}}},
      {importPolicy,
       {{tr("Always ask before loading or importing"), 0},
        {tr("Always import the file to the current project"), 1},
        {tr("Always load the file from the current location"), 2}}},
      {initialLoadTlvCachingBehavior,
       {{tr("On Demand"), 0},
        {tr("All Icons"), 1},
        {tr("All Icons & Images"), 2}}},
      {columnIconLoadingPolicy,
       {{tr("At Once"), Preferences::LoadAtOnce},
        {tr("On Demand"), Preferences::LoadOnDemand}}},
      {scanLevelType, {{"tif", "tif"}, {"png", "png"}}},
      {DefLevelType,
       {{tr("Toonz Vector Level"), PLI_XSHLEVEL},
        {tr("Toonz Raster Level"), TZP_XSHLEVEL},
        {tr("Raster Level"), OVL_XSHLEVEL}}},
      {NumberingSystem,
       {{tr("Incremental"), 0}, {tr("Use Xsheet as Animation Sheet"), 1}}},
      {vectorSnappingTarget,
       {{tr("Strokes"), 0}, {tr("Guides"), 1}, {tr("All"), 2}}},
      {cursorBrushType,
       {{tr("Small"), "Small"},
        {tr("Large"), "Large"},
        {tr("Crosshair"), "Crosshair"}}},
      {cursorBrushStyle,
       {{tr("Default"), "Default"},
        {tr("Left-Handed"), "Left-Handed"},
        {tr("Simple"), "Simple"}}},
      {levelBasedToolsDisplay,
       {{tr("Default"), 0},
        {tr("Enable Tools For Level Only"), 1},
        {tr("Show Tools For Level Only"), 2}}},
      {xsheetLayoutPreference,
       {{tr("Classic"), "Classic"},
        {tr("Classic-revised"), "Classic-revised"},
        {tr("Compact"), "Compact"}}},
      {DragCellsBehaviour,
       {{tr("Cells Only"), 0}, {tr("Cells and Column Data"), 1}}},
      {keyframeType,  
       {{tr("Constant"), 1},
        {tr("Linear"), 2},
        {tr("Speed In / Speed Out"), 3},
        {tr("Ease In / Ease Out"), 4},
        {tr("Ease In / Ease Out %"), 5},
        {tr("Exponential"), 6},
        {tr("Expression "), 7},
        {tr("File"), 8}}},
      {animatedGuidedDrawing,
       {{tr("Arrow Markers"), 0}, {tr("Animated Guide"), 1}}}};
  assert(comboItemsTable.contains(id));
  return comboItemsTable.value(id, QList<ComboBoxItem>());
}
QList < ComboBoxItem > PreferencesPopup :: getComboItemList ( PreferencesItemId id ) const { const static QMap < PreferencesItemId , QList < ComboBoxItem > > comboItemsTable = { { pathAliasPriority , { { tr ( " " ) , Preferences :: ProjectFolderAliases } , { tr ( " " ) , Preferences :: SceneFolderAlias } , { tr ( " " ) , Preferences :: ProjectFolderOnly } } } , { linearUnits , { { tr ( " " ) , " " } , { tr ( " " ) , " " } , { tr ( " " ) , " " } , { tr ( " " ) , " " } , { tr ( " " ) , " " } } } , { functionEditorToggle , { { tr ( " " ) , Preferences :: ShowGraphEditorInPopup } , { tr ( " " ) , Preferences :: ShowFunctionSpreadsheetInPopup } , { tr ( " " ) , Preferences :: ToggleBetweenGraphAndSpreadsheet } } } , { viewerZoomCenter , { { tr ( " " ) , 0 } , { tr ( " " ) , 1 } } } , { importPolicy , { { tr ( " " ) , 0 } , { tr ( " " ) , 1 } , { tr ( " " ) , 2 } } } , { initialLoadTlvCachingBehavior , { { tr ( " " ) , 0 } , { tr ( " " ) , 1 } , { tr ( " " ) , 2 } } } , { columnIconLoadingPolicy , { { tr ( " " ) , Preferences :: LoadAtOnce } , { tr ( " " ) , Preferences :: LoadOnDemand } } } , { scanLevelType , { { " " , " " } , { " " , " " } } } , { DefLevelType , { { tr ( " " ) , PLI_XSHLEVEL } , { tr ( " " ) , TZP_XSHLEVEL } , { tr ( " " ) , OVL_XSHLEVEL } } } , { NumberingSystem , { { tr ( " " ) , 0 } , { tr ( " " ) , 1 } } } , { vectorSnappingTarget , { { tr ( " " ) , 0 } , { tr ( " " ) , 1 } , { tr ( " " ) , 2 } } } , { cursorBrushType , { { tr ( " " ) , " " } , { tr ( " " ) , " " } , { tr ( " " ) , " " } } } , { cursorBrushStyle , { { tr ( " " ) , " " } , { tr ( " " ) , " " } , { tr ( " " ) , " " } } } , { levelBasedToolsDisplay , { { tr ( " " ) , 0 } , { tr ( " " ) , 1 } , { tr ( " " ) , 2 } } } , { xsheetLayoutPreference , { { tr ( " " ) , " " } , { tr ( " " ) , " " } , { tr ( " " ) , " " } } } , { DragCellsBehaviour , { { tr ( " " ) , 0 } , { tr ( " " ) , 1 } } } , { keyframeType , { { tr ( " " ) , 1 } , { tr ( " " ) , 2 } , { tr ( " " ) , 3 } , { tr ( " " ) , 4 } , { tr ( " " ) , 5 } , { tr ( " " ) , 6 } , { tr ( " " ) , 7 } , { tr ( " " ) , 8 } } } , { animatedGuidedDrawing , { { tr ( " " ) , 0 } , { tr ( " " ) , 1 } } } } ; assert ( comboItemsTable . contains ( id ) ) ; return comboItemsTable . value ( id , QList < ComboBoxItem > ( ) ) ; }
returns list for combo items
ComboBoxItem consists of an item label string and data to be stored in
preferences
returns list for combo items ComboBoxItem consists of an item label string and data to be stored in preferences
// cameraUnits shares items with linearUnits //{dropdownShortcutsCycleOptions, // {{tr("Open the dropdown to display all options"), 0}, //  {tr("Cycle through the available options"), 1}}}, // note that the value starts from 1, not 0