imagesettings.hh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // Copyright 2010 wkhtmltopdf authors
  2. //
  3. // This file is part of wkhtmltopdf.
  4. //
  5. // wkhtmltopdf is free software: you can redistribute it and/or modify
  6. // it under the terms of the GNU Lesser General Public License as published by
  7. // the Free Software Foundation, either version 3 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // wkhtmltopdf is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.
  17. #ifndef __IMAGESETTINGS_HH__
  18. #define __IMAGESETTINGS_HH__
  19. #include <QString>
  20. #include <wkhtmltox/loadsettings.hh>
  21. #include <wkhtmltox/websettings.hh>
  22. #include <wkhtmltox/dllbegin.inc>
  23. namespace wkhtmltopdf {
  24. namespace settings {
  25. /*! \brief Settings for cropping image */
  26. struct DLL_PUBLIC CropSettings {
  27. CropSettings();
  28. //! Cropping left/x coord
  29. int left;
  30. //! Cropping top/y coord
  31. int top;
  32. //! Cropping width/w dime
  33. int width;
  34. //! Cropping height/h dime
  35. int height;
  36. };
  37. /*! \brief Class holding all user settings.
  38. This class holds all the user settings, settings can be filled in by hand,
  39. or with other methods.
  40. \sa CommandLineParser::parse()
  41. */
  42. struct DLL_PUBLIC ImageGlobal {
  43. ImageGlobal();
  44. //! Crop related settings
  45. CropSettings crop;
  46. //! Scale related settings
  47. // ScaleSettings scale;
  48. LoadGlobal loadGlobal;
  49. LoadPage loadPage;
  50. Web web;
  51. //! Be less verbose
  52. bool quiet;
  53. bool transparent;
  54. //! Should we use the graphics system
  55. bool useGraphics;
  56. QString in;
  57. //! The file for output
  58. QString out;
  59. //! The output format
  60. QString fmt;
  61. //! Set the screen width
  62. int screenWidth;
  63. //! Set the screen height
  64. int screenHeight;
  65. //! Image Quality
  66. int quality;
  67. bool smartWidth;
  68. QString get(const char * name);
  69. bool set(const char * name, const QString & value);
  70. };
  71. #include <wkhtmltox/dllend.inc>
  72. }
  73. }
  74. #endif //__IMAGESETTINGS_HH__