tdegraphics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kpdefs.h 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. Copyright (c) 2003,2004,2005 Clarence Dang <dang@kde.org>
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions
  6. are met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  13. IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  14. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  16. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  17. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  18. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  19. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  20. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  21. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. */
  23. #ifndef __kp_defs_h__
  24. #define __kp_defs_h__
  25. #include <limits.h>
  26. #include <tqglobal.h>
  27. #include <tqpoint.h>
  28. #include <tqsize.h>
  29. #include <tqstring.h>
  30. #include <tdeversion.h>
  31. #define KP_IS_TQT_3_3 ([[[TQT_VERSION IS DEPRECATED]]] >= 0x030300 && 1)
  32. #define KP_IS_KDE_3_3 ((TDE_VERSION_MAJOR >= 3 && TDE_VERSION_MINOR >= 3) && 1)
  33. // approx. 2896x2896x32bpp or 3344x3344x24bpp (TODO: 24==32?) or 4096*4096x16bpp
  34. #define KP_BIG_IMAGE_SIZE (32 * 1048576)
  35. #define KP_PI 3.141592653589793238462
  36. #define KP_DEGREES_TO_RADIANS(deg) ((deg) * KP_PI / 180.0)
  37. #define KP_RADIANS_TO_DEGREES(rad) ((rad) * 180.0 / KP_PI)
  38. #define KP_INVALID_POINT TQPoint (INT_MIN / 8, INT_MIN / 8)
  39. #define KP_INVALID_WIDTH (INT_MIN / 8)
  40. #define KP_INVALID_HEIGHT (INT_MIN / 8)
  41. #define KP_INVALID_SIZE TQSize (INT_MIN / 8, INT_MIN / 8)
  42. //
  43. // Settings
  44. //
  45. #define kpSettingsGroupGeneral TQString::fromLatin1 ("General Settings")
  46. #define kpSettingFirstTime TQString::fromLatin1 ("First Time")
  47. #define kpSettingShowGrid TQString::fromLatin1 ("Show Grid")
  48. #define kpSettingShowPath TQString::fromLatin1 ("Show Path")
  49. #define kpSettingColorSimilarity TQString::fromLatin1 ("Color Similarity")
  50. #define kpSettingDitherOnOpen TQString::fromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than")
  51. #define kpSettingPrintImageCenteredOnPage TQString::fromLatin1 ("Print Image Centered On Page")
  52. #define kpSettingsGroupFileSaveAs TQString::fromLatin1 ("File/Save As")
  53. #define kpSettingsGroupFileExport TQString::fromLatin1 ("File/Export")
  54. #define kpSettingsGroupEditCopyTo TQString::fromLatin1 ("Edit/Copy To")
  55. #define kpSettingForcedMimeType TQString::fromLatin1 ("Forced MimeType")
  56. #define kpSettingForcedColorDepth TQString::fromLatin1 ("Forced Color Depth")
  57. #define kpSettingForcedDither TQString::fromLatin1 ("Forced Dither")
  58. #define kpSettingForcedQuality TQString::fromLatin1 ("Forced Quality")
  59. #define kpSettingLastDocSize TQString::fromLatin1 ("Last Document Size")
  60. #define kpSettingMoreEffectsLastEffect TQString::fromLatin1 ("More Effects - Last Effect")
  61. #define kpSettingResizeScaleLastKeepAspect TQString::fromLatin1 ("Resize Scale - Last Keep Aspect")
  62. #define kpSettingsGroupMimeTypeProperties TQString::fromLatin1 ("MimeType Properties Version 1.2-2")
  63. #define kpSettingMimeTypeMaximumColorDepth TQString::fromLatin1 ("Maximum Color Depth")
  64. #define kpSettingMimeTypeHasConfigurableColorDepth TQString::fromLatin1 ("Configurable Color Depth")
  65. #define kpSettingMimeTypeHasConfigurableQuality TQString::fromLatin1 ("Configurable Quality Setting")
  66. #define kpSettingsGroupUndoRedo TQString::fromLatin1 ("Undo/Redo Settings")
  67. #define kpSettingUndoMinLimit TQString::fromLatin1 ("Min Limit")
  68. #define kpSettingUndoMaxLimit TQString::fromLatin1 ("Max Limit")
  69. #define kpSettingUndoMaxLimitSizeLimit TQString::fromLatin1 ("Max Limit Size Limit")
  70. #define kpSettingsGroupThumbnail TQString::fromLatin1 ("Thumbnail Settings")
  71. #define kpSettingThumbnailShown TQString::fromLatin1 ("Shown")
  72. #define kpSettingThumbnailGeometry TQString::fromLatin1 ("Geometry")
  73. #define kpSettingThumbnailZoomed TQString::fromLatin1 ("Zoomed")
  74. #define kpSettingThumbnailShowRectangle TQString::fromLatin1 ("ShowRectangle")
  75. #define kpSettingsGroupPreviewSave TQString::fromLatin1 ("Save Preview Settings")
  76. #define kpSettingPreviewSaveGeometry TQString::fromLatin1 ("Geometry")
  77. #define kpSettingPreviewSaveUpdateDelay TQString::fromLatin1 ("Update Delay")
  78. #define kpSettingsGroupTools TQString::fromLatin1 ("Tool Settings")
  79. #define kpSettingLastTool TQString::fromLatin1 ("Last Used Tool")
  80. #define kpSettingToolBoxIconSize TQString::fromLatin1 ("Tool Box Icon Size")
  81. #define kpSettingsGroupText TQString::fromLatin1 ("Text Settings")
  82. #define kpSettingFontFamily TQString::fromLatin1 ("Font Family")
  83. #define kpSettingFontSize TQString::fromLatin1 ("Font Size")
  84. #define kpSettingBold TQString::fromLatin1 ("Bold")
  85. #define kpSettingItalic TQString::fromLatin1 ("Italic")
  86. #define kpSettingUnderline TQString::fromLatin1 ("Underline")
  87. #define kpSettingStrikeThru TQString::fromLatin1 ("Strike Thru")
  88. #define kpSettingsGroupFlattenEffect TQString::fromLatin1 ("Flatten Effect Settings")
  89. #define kpSettingFlattenEffectColor1 TQString::fromLatin1 ("Color1")
  90. #define kpSettingFlattenEffectColor2 TQString::fromLatin1 ("Color2")
  91. //
  92. // Session Restore Setting
  93. //
  94. // URL of the document in the main window.
  95. //
  96. // This key only exists if the document does. If it exists, it can be empty.
  97. // The URL need not point to a file that exists e.g. "kolourpaint doesnotexist.png".
  98. #define kpSessionSettingDocumentUrl TQString::fromLatin1 ("Session Document Url")
  99. // The size of a document which is not from a URL e.g. "kolourpaint doesnotexist.png".
  100. // This key does not exist for documents from URLs.
  101. #define kpSessionSettingNotFromUrlDocumentSize TQString::fromLatin1 ("Session Not-From-Url Document Size")
  102. #endif // __kp_defs_h__