Skip to content

Commit

Permalink
- adapt to Qt5 and mingw64
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Jul 23, 2015
1 parent e800774 commit de17f81
Show file tree
Hide file tree
Showing 42 changed files with 216 additions and 20 deletions.
5 changes: 4 additions & 1 deletion OMNotebook/OMNotebookGUI/OMNotebookGUI.pro
Expand Up @@ -5,6 +5,9 @@
# Adeel Asghar [adeel.asghar@ida.liu.se] 2011-03-05

QT += network core gui xml svg
greaterThan(QT_MAJOR_VERSION, 4) {
QT *= printsupport widgets webkitwidgets
}

TARGET = OMNotebook
TEMPLATE = app
Expand Down Expand Up @@ -143,7 +146,7 @@ FORMS += ImageSizeDlg.ui \
searchform.ui

win32 {
QMAKE_LFLAGS += -enable-auto-import
QMAKE_LFLAGS += -Wl,--enable-auto-import
DEFINES += IMPORT_INTO=1
QMAKE_CXXFLAGS += -Wl,--stack,16777216
PLOTLIBS = -L$$(OMBUILDDIR)/build/lib/omc -lOMPlot -lomqwt
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/cell.cpp
Expand Up @@ -33,12 +33,17 @@
//STD Headers

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QGridLayout>
#include <QtGui/QLabel>
#include <QtGui/QMessageBox>
#include <QtGui/QMouseEvent>
#include <QtGui/QResizeEvent>
#include <QtGui/QTextCursor>
#endif

#include <exception>
#include <stdexcept>
Expand Down
8 changes: 7 additions & 1 deletion OMNotebook/OMNotebookGUI/cell.h
Expand Up @@ -45,8 +45,14 @@
//STD Headers
#include <vector>

//QT Headers
// QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QWidget>
#endif


//IAEX Headers
#include "cellstyle.h"
Expand Down
6 changes: 0 additions & 6 deletions OMNotebook/OMNotebookGUI/cellapplication.cpp
Expand Up @@ -32,12 +32,6 @@

#define RUN_DRMODELICA_CONVERTION false

//QT Headers
#include <QtCore/QDir>
//#include <QtCore/QObject>
#include <QtGui/QImageWriter>
#include <QtGui/QMessageBox>

//IAEX Headers
#include "cellapplication.h"
#include "celldocument.h"
Expand Down
17 changes: 16 additions & 1 deletion OMNotebook/OMNotebookGUI/cellapplication.h
Expand Up @@ -34,8 +34,23 @@
#define _CELLAPPLICATION_H

// QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#include <QPrinter>
#include <QPrintDialog>
#include <QtWebKitWidgets>
#include <QTextCodec>
#include <QUrlQuery>
#include <QItemDelegate>
#include <QMessageBox>
#include <QImageWriter>
#else
#include <QtGui/QApplication>
#include <QtCore/QObject>
#include <QtGui/QImageWriter>
#include <QtGui/QMessageBox>
#include <QtCore/QDir>
#endif

// IAEX Headers
#include "application.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/cellcommandcenter.cpp
Expand Up @@ -35,7 +35,12 @@
#include <iostream>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QMessageBox>
#endif

//IAEX Headers
#include "cellcommandcenter.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/cellcursor.cpp
Expand Up @@ -43,9 +43,14 @@
#include <stdexcept>

//Qt Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QApplication>
#include <QtGui/QLabel>
#include <QtGui/QPaintEvent>
#endif

//IAEX Headers
#include "cellcursor.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/celldocument.cpp
Expand Up @@ -46,6 +46,10 @@
#include <algorithm>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtCore/QDir>
#include <QtCore/QEvent>
#include <QtCore/QFileInfo>
Expand All @@ -54,6 +58,7 @@
#include <QtGui/QImageWriter>
#include <QtGui/QScrollArea>
#include <QtGui/QScrollBar>
#endif

//IAEX Headers
#include "celldocument.h"
Expand Down
6 changes: 6 additions & 0 deletions OMNotebook/OMNotebookGUI/celldocument.h
Expand Up @@ -42,9 +42,15 @@


//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtCore/QHash>
#include <QtGui/QScrollArea>
#include <QtGui/QGridLayout>
#endif


//Forward declaration
class QDom;
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/cellfactory.cpp
Expand Up @@ -38,8 +38,13 @@


//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtCore/QObject>
#include <QtGui/QMessageBox>
#endif

#include <exception>
#include <stdexcept>
Expand Down
6 changes: 6 additions & 0 deletions OMNotebook/OMNotebookGUI/cellgroup.cpp
Expand Up @@ -43,7 +43,13 @@
#include <stdexcept>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#include <QTextEdit>
#else
#include <QtGui/QTextEdit>
#endif

//IAEX Headers
#include "cellgroup.h"
Expand Down
6 changes: 5 additions & 1 deletion OMNotebook/OMNotebookGUI/cellgroup.h
Expand Up @@ -44,11 +44,15 @@
#include <list>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QWidget>
#include <QtGui/QLayout>
//Added by qt3to4:
#include <QtGui/QMouseEvent>
#include <QtGui/QGridLayout>
#endif

//IAEX Headers
#include "cell.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/documentview.h
Expand Up @@ -34,7 +34,12 @@
#define DOCUMENTVIEW_H

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QMainWindow>
#endif

//IAEX Headers
#include "document.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/graphcell.cpp
Expand Up @@ -45,6 +45,10 @@
#include <cmath>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtCore/QDir>
#include <QtCore/QEvent>
#include <QtCore/QThread>
Expand All @@ -64,6 +68,7 @@
#include <QTextStream>
#include <QRegExp>
#include <QPushButton>
#endif

//IAEX Headers
#include "graphcell.h"
Expand Down
7 changes: 6 additions & 1 deletion OMNotebook/OMNotebookGUI/graphcell.h
Expand Up @@ -35,16 +35,21 @@


//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QAction>
#include <QtGui/QWidget>
#include <QtGui/QTextBrowser>
//Added by qt3to4:
#include <QtGui/QMouseEvent>
#include <QtGui/QGridLayout>
#include <QtGui/QResizeEvent>
#include <QtCore/QEvent>
#include <QPushButton>
#include <QTemporaryFile>
#endif

//IAEX Headers
#include "cell.h"
#include "inputcelldelegate.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/highlighterthread.cpp
Expand Up @@ -40,11 +40,16 @@
#include <iostream>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtCore/QCoreApplication>
#include <QtGui/QTextCursor>
#include <QtGui/QTextBrowser>
#include <QtGui/QTextEdit>
#include <QMessageBox>
#endif

//IAEX Headers
#include "highlighterthread.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/inputcell.cpp
Expand Up @@ -45,6 +45,10 @@
#include <sstream>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtCore/QDir>
#include <QtCore/QEvent>
#include <QtCore/QThread>
Expand All @@ -58,6 +62,7 @@
#include <QtGui/QResizeEvent>
#include <QtGui/QFrame>
#include <QtGui/QTextFrame>
#endif

//IAEX Headers
#include "inputcell.h"
Expand Down
6 changes: 5 additions & 1 deletion OMNotebook/OMNotebookGUI/inputcell.h
Expand Up @@ -43,13 +43,17 @@


//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QWidget>
#include <QtGui/QTextBrowser>
//Added by qt3to4:
#include <QtGui/QMouseEvent>
#include <QtGui/QGridLayout>
#include <QtGui/QResizeEvent>
#include <QtCore/QEvent>
#endif

//IAEX Headers
#include "cell.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/notebook.cpp
Expand Up @@ -45,6 +45,10 @@
#include <algorithm>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtCore/QTimer>
#include <QtGui/QAction>
#include <QtGui/QApplication>
Expand All @@ -67,6 +71,7 @@
#include <QtGui/QLabel>
#include <QSettings>
#include <QToolButton>
#endif

//IAEX Headers
#include "command.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/omcinteractiveenvironment.cpp
Expand Up @@ -35,12 +35,17 @@
#include <stdexcept>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QProcess>
#include <QtCore/QThread>
#include <QtCore/QMutex>
#include <QtGui/QMessageBox>
#endif

//IAEX Headers
#include "omcinteractiveenvironment.h"
Expand Down
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/printervisitor.cpp
Expand Up @@ -39,13 +39,18 @@
#include <exception>

//QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QTextCursor>
#include <QtGui/QTextDocumentFragment>
#include <QtGui/QTextEdit>
#include <QtGui/QTextTable>
#include <QtGui/QTextTableCell>
#include <QtGui/QTextTableFormat>
#include <QPrinter>
#endif

//IAEX Headers
#include "printervisitor.h"
Expand Down
4 changes: 0 additions & 4 deletions OMNotebook/OMNotebookGUI/qcombobox_search.cpp
Expand Up @@ -36,10 +36,6 @@
* \date 2006-08-24
*/


// QT Headers
#include <QtGui/QKeyEvent>

// IAEX Headers
#include "qcombobox_search.h"

Expand Down
6 changes: 6 additions & 0 deletions OMNotebook/OMNotebookGUI/qcombobox_search.h
Expand Up @@ -41,7 +41,13 @@


// QT Headers
#include <QtGlobal>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets>
#else
#include <QtGui/QComboBox>
#include <QtGui/QKeyEvent>
#endif


namespace IAEX
Expand Down

0 comments on commit de17f81

Please sign in to comment.