| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6b798db commit 9ab3bcf
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,81 @@ | |||
| 1 | + /* GNUPLOT - gnuplot_qt.cpp */ | ||
| 2 | + | ||
| 3 | + /*[ | ||
| 4 | + * Copyright 2011 Jérôme Lodewyck | ||
| 5 | + * | ||
| 6 | + * Permission to use, copy, and distribute this software and its | ||
| 7 | + * documentation for any purpose with or without fee is hereby granted, | ||
| 8 | + * provided that the above copyright notice appear in all copies and | ||
| 9 | + * that both that copyright notice and this permission notice appear | ||
| 10 | + * in supporting documentation. | ||
| 11 | + * | ||
| 12 | + * Permission to modify the software is granted, but not the right to | ||
| 13 | + * distribute the complete modified source code. Modifications are to | ||
| 14 | + * be distributed as patches to the released version. Permission to | ||
| 15 | + * distribute binaries produced by compiling modified sources is granted, | ||
| 16 | + * provided you | ||
| 17 | + * 1. distribute the corresponding source modifications from the | ||
| 18 | + * released version in the form of a patch file along with the binaries, | ||
| 19 | + * 2. add special version identification to distinguish your version | ||
| 20 | + * in addition to the base release version number, | ||
| 21 | + * 3. provide your name and address as the primary contact for the | ||
| 22 | + * support of your modified version, and | ||
| 23 | + * 4. retain our contact information in regard to use of the base | ||
| 24 | + * software. | ||
| 25 | + * Permission to distribute the released version of the source code along | ||
| 26 | + * with corresponding source modifications in the form of a patch file is | ||
| 27 | + * granted with same provisions 2 through 4 for binary distributions. | ||
| 28 | + * | ||
| 29 | + * This software is provided "as is" without express or implied warranty | ||
| 30 | + * to the extent permitted by applicable law. | ||
| 31 | + * | ||
| 32 | + * | ||
| 33 | + * Alternatively, the contents of this file may be used under the terms of the | ||
| 34 | + * GNU General Public License Version 2 or later (the "GPL"), in which case the | ||
| 35 | + * provisions of GPL are applicable instead of those above. If you wish to allow | ||
| 36 | + * use of your version of this file only under the terms of the GPL and not | ||
| 37 | + * to allow others to use your version of this file under the above gnuplot | ||
| 38 | + * license, indicate your decision by deleting the provisions above and replace | ||
| 39 | + * them with the notice and other provisions required by the GPL. If you do not | ||
| 40 | + * delete the provisions above, a recipient may use your version of this file | ||
| 41 | + * under either the GPL or the gnuplot license. | ||
| 42 | + ]*/ | ||
| 43 | + | ||
| 44 | + #include "QtGnuplotApplication.h" | ||
| 45 | + #include <QtCore> | ||
| 46 | + #include <signal.h> | ||
| 47 | + | ||
| 48 | + int main(int argc, char* argv[]) | ||
| 49 | + { | ||
| 50 | + signal(SIGINT, SIG_IGN); // Do not listen to SIGINT signals anymore | ||
| 51 | + | ||
| 52 | + #if QT_VERSION < 0x040700 | ||
| 53 | + /* | ||
| 54 | + * FIXME: EAM Nov 2011 | ||
| 55 | + * It is better to use environmental variable | ||
| 56 | + * QT_GRAPHICSSYSTEM but this requires qt >= 4.7 | ||
| 57 | + * "raster" is ~5x faster than "native" (default). | ||
| 58 | + * Unfortunately "opengl" isn't recognized on my test systems :-( | ||
| 59 | + */ | ||
| 60 | + // This makes a huge difference to the speed of polygon rendering. | ||
| 61 | + // Alternatives are "native", "raster", "opengl" | ||
| 62 | + QApplication::setGraphicsSystem("raster"); | ||
| 63 | + #endif | ||
| 64 | + | ||
| 65 | + QtGnuplotApplication application(argc, argv); | ||
| 66 | + | ||
| 67 | + // Load translations for the qt library | ||
| 68 | + QTranslator qtTranslator; | ||
| 69 | + qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); | ||
| 70 | + application.installTranslator(&qtTranslator); | ||
| 71 | + | ||
| 72 | + // Load translations for the qt terminal | ||
| 73 | + QTranslator translator; | ||
| 74 | + translator.load("qtgnuplot_" + QLocale::system().name(), QTGNUPLOT_DATA_DIR); | ||
| 75 | + application.installTranslator(&translator); | ||
| 76 | + | ||
| 77 | + // Start | ||
| 78 | + application.exec(); | ||
| 79 | + | ||
| 80 | + return 0; | ||
| 81 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments