Changeset 07e43cf61a in tspsg for src/globals.h
- Timestamp:
- Oct 5, 2012, 5:30:23 PM (12 years ago)
- Branches:
- appveyor, imgbot, master, readme
- Children:
- 47c811cc09
- Parents:
- 7a39458d16
- git-author:
- Oleksii Serdiuk <contacts@…> (10/05/12 17:30:23)
- git-committer:
- Oleksii Serdiuk <contacts@…> (10/05/12 21:58:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/globals.h
r7a39458d16 r07e43cf61a 30 30 31 31 // INCLUDES 32 #include <Qt Core>32 #include <QtGlobal> 33 33 #if QT_VERSION < QT_VERSION_CHECK(4,5,0) 34 34 # error You are using Qt version < 4.5 but minimum required version is 4.5.0. Compilation aborted. … … 39 39 # define QT_NO_STATUSTIP 40 40 #endif 41 #include <QtGui>42 41 #if defined(QT_NO_SVG) && !defined(NOSVG) 43 42 # define NOSVG 44 43 #endif 45 #if !defined(NOSVG)46 # include <QtSvg>47 #endif // NOSVG48 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)49 # include <QtConcurrent>50 # include <QtPrintSupport>51 #endif52 44 53 #ifndef HANDHELD54 # include "qttoolbardialog.h"55 #endif56 57 // Version info58 #include "version.h"59 // OS and ARCH detection60 #include "os.h"61 45 // TSPSG Defaults 62 46 #include "defaults.h" 63 // TSPSolver64 #include "tspsolver.h"65 #ifndef HANDHELD66 // Eyecandy67 # include "qtwin.h"68 #endif // HANDHELD69 47 70 48 // DEFINES … … 84 62 /*! 85 63 * \def PATH_DOCS 86 * \brief Bath to documentation files.64 * \brief Path to documentation files. 87 65 */ 88 66 #ifndef PATH_DOCS … … 111 89 #define HQ_FACTOR 2 112 90 113 // FUNCTIONS114 /*!115 * \brief Checks whether \a x contains an integer value.116 * \param x A value to check.117 * \return \c true if \a x countains an integer, oherwise \c false.118 */119 inline bool isInteger(double x)120 {121 double i;122 return (modf(x, &i) == 0.0);123 }124 125 91 /*! 126 92 * \brief Checks whether the updater app is installed/available. … … 129 95 * On other systems this function always returns \c false. 130 96 */ 131 inline bool hasUpdater() 132 { 133 #ifdef Q_OS_WIN32 134 return QFile::exists("updater/Update.exe"); 135 #else // Q_OS_WIN32 136 return false; 137 #endif // Q_OS_WIN32 138 } 97 bool hasUpdater(); 139 98 140 /*! 141 * \brief Converts \a in into Base64 format with lines wrapped at 64 characters. 142 * \param in A byte array to be converted. 143 * \return Converted byte array. 144 */ 145 inline QByteArray toWrappedBase64(const QByteArray &in) 146 { 147 QByteArray out, base64(in.toBase64()); 148 for (int i = 0; i <= base64.size() - 64; i += 64) { 149 out.append(QByteArray::fromRawData(base64.data() + i, 64)).append('\n'); 150 } 151 if (int rest = base64.size() % 64) 152 out.append(QByteArray::fromRawData(base64.data() + base64.size() - rest, rest)); 153 return out; 154 } 155 99 class QSettings; 100 class QObject; 156 101 /*! 157 102 * \brief Creates QSettings instance with TSPSG-specific options. … … 162 107 163 108 #ifndef HANDHELD 109 class QWidget; 164 110 /*! 165 111 * \brief Enables or disables a mask for the \a widget. … … 173 119 174 120 #ifndef DOXYGEN_EXCLUDE 175 176 #ifndef QT_NO_PRINTER177 Q_DECLARE_METATYPE(QPrinter::PageSize)178 Q_DECLARE_METATYPE(QPrinter::Orientation)179 #endif180 121 181 122 #ifdef HANDHELD
Note: See TracChangeset
for help on using the changeset viewer.