vconstants.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef VCONSTANTS_H
  2. #define VCONSTANTS_H
  3. // Html: rich text file;
  4. // Markdown: Markdown text file;
  5. // List: Infinite list file like WorkFlowy;
  6. // Container: a composite file containing multiple files;
  7. enum class DocType { Html = 0, Markdown, List, Container, Invalid };
  8. // Normal: note file managed by VNote;
  9. // Orphan: external file;
  10. enum class FileType { Normal, Orphan };
  11. enum class ClipboardOpType { Invalid, CopyFile, CopyDir };
  12. enum class OpenFileMode {Read = 0, Edit};
  13. static const qreal c_webZoomFactorMax = 5;
  14. static const qreal c_webZoomFactorMin = 0.25;
  15. static const int c_tabSequenceBase = 1;
  16. // HTML and JS.
  17. static const QString c_htmlJSHolder = "JS_PLACE_HOLDER";
  18. static const QString c_htmlExtraHolder = "<!-- EXTRA_PLACE_HOLDER -->";
  19. // Directory Config file items.
  20. namespace DirConfig
  21. {
  22. static const QString c_version = "version";
  23. static const QString c_subDirectories = "sub_directories";
  24. static const QString c_files = "files";
  25. static const QString c_imageFolder = "image_folder";
  26. static const QString c_name = "name";
  27. }
  28. static const QString c_emptyHeaderName = "[EMPTY]";
  29. enum class TextDecoration { None,
  30. Bold,
  31. Italic,
  32. Underline,
  33. Strikethrough,
  34. InlineCode };
  35. enum FindOption
  36. {
  37. CaseSensitive = 0x1U,
  38. WholeWordOnly = 0x2U,
  39. RegularExpression = 0x4U,
  40. IncrementalSearch = 0x8U
  41. };
  42. enum class ImageProperty {/* ID of the image preview (long long). Unique for each source. */
  43. ImageID = 1,
  44. /* Source type of the preview, such as image, codeblock. */
  45. ImageSource,
  46. /* Type of the preview, block or inline. */
  47. ImageType };
  48. enum class PreviewImageType { Block, Inline, Invalid };
  49. enum class PreviewImageSource { Image, CodeBlock, Invalid };
  50. enum HighlightBlockState
  51. {
  52. Normal = 0,
  53. // A fenced code block.
  54. CodeBlockStart,
  55. CodeBlock,
  56. CodeBlockEnd,
  57. // This block is inside a HTML comment region.
  58. Comment
  59. };
  60. enum class LineNumberType
  61. {
  62. None = 0,
  63. Absolute,
  64. Relative,
  65. CodeBlock
  66. };
  67. #endif