PageRenderTime 34ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/http_debugger.1.0/loadconfig.h

http://fop-miniscribus.googlecode.com/
C Header | 121 lines | 98 code | 20 blank | 3 comment | 4 complexity | 84586d8948f503d7302fe668ac2c63e7 MD5 | raw file
Possible License(s): LGPL-3.0, GPL-2.0
  1. #ifndef LOADCONFIG_H_
  2. #define LOADCONFIG_H_
  3. #include <QtCore>
  4. #include <QtGui>
  5. #include <QtGui>
  6. #include <QtCore>
  7. #include <QWidget>
  8. #include <QPair>
  9. #include <QTextDocument>
  10. #include <QPair>
  11. #include <QMap>
  12. #include <QDateTime>
  13. #include <QFile>
  14. #include <QtCore>
  15. #include <QCoreApplication>
  16. #include <iostream>
  17. #include <stdlib.h>
  18. #include <stdio.h>
  19. #include <errno.h>
  20. #include <stdlib.h>
  21. #include <QInputDialog>
  22. #include <QMenu>
  23. #include <QString>
  24. #include <QtDebug>
  25. #include <QDebug>
  26. #include <QDesktopServices>
  27. #include <QDebug>
  28. #include <QString>
  29. #include <QMap>
  30. #include <QList>
  31. #include <QStringList>
  32. #include <QObject>
  33. #include <QDateTime>
  34. #include <QDate>
  35. #include <QImageReader>
  36. #include <QPixmap>
  37. #include <QSettings>
  38. #include <QTimer>
  39. #include <QProgressDialog>
  40. #include <QPainter>
  41. #include <QPixmap>
  42. #include <QUrl>
  43. #include <QColorDialog>
  44. #include <QMessageBox>
  45. #include <QWorkspace>
  46. #include <QNetworkInterface>
  47. #include <QDomDocument>
  48. #include <QtDebug>
  49. #include <QDebug>
  50. #include <QSettings>
  51. #include <QDomDocument>
  52. #include <QDomElement>
  53. #include <QDomImplementation>
  54. #include <QDomProcessingInstruction>
  55. #include <QFile>
  56. #include <QTextCodec>
  57. #include <QString>
  58. #include <QTextDocument>
  59. #include <QTextCursor>
  60. #include <QTextBrowser>
  61. #include <QTextBlockFormat>
  62. #include <QTextFrame>
  63. #include <QTextTable>
  64. typedef QMap<QString,QString> HeaderSend;
  65. #include "ModelSwap.h"
  66. static inline void OpenDeskBrowser( QUrl loc )
  67. {
  68. #if defined Q_WS_MAC
  69. QProcess *m = new QProcess();
  70. QStringList macs;
  71. macs << loc.toString(); /* oeffnet der default browser */
  72. m->startDetached(QString("open") , macs );
  73. ///////std::cout << "OpenDesktop [" << qPrintable(macs.join(" ")) << "]" << std::endl;
  74. return;
  75. #endif
  76. #if defined Q_WS_WIN
  77. QString fullFileName = loc.toString();
  78. if (fullFileName.startsWith("http://", Qt::CaseInsensitive) ||
  79. fullFileName.startsWith("https://", Qt::CaseInsensitive) ||
  80. fullFileName.startsWith("ftp://", Qt::CaseInsensitive) ||
  81. fullFileName.startsWith("news://", Qt::CaseInsensitive) ||
  82. fullFileName.startsWith("mailto:", Qt::CaseInsensitive) ||
  83. fullFileName.startsWith("webdav://", Qt::CaseInsensitive) )
  84. {
  85. /* all ok */
  86. } else {
  87. fullFileName.prepend("file:///");
  88. }
  89. bool wr = QDesktopServices::openUrl(QUrl(fullFileName));
  90. if (!wr) {
  91. QMessageBox::warning(0, qApp->tr("Error"),qApp->tr("Window Unable to open action file or dir %1").arg(loc.toString()));
  92. }
  93. return;
  94. #endif
  95. /* linux */
  96. bool r = QDesktopServices::openUrl(loc);
  97. if (!r) {
  98. QMessageBox::warning(0, qApp->tr("Error"),qApp->tr("Linux Unable to open action file or dir %1").arg(loc.toString()));
  99. }
  100. }
  101. #endif /*CONFIG_H_*/