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