Qt4 build fixed

This commit is contained in:
Arin Alexander 2017-10-26 13:12:05 +04:00
commit 741fc55d12
2 changed files with 19 additions and 0 deletions

View File

@ -51,7 +51,12 @@ namespace LimeReport {
ReportDesignWidget::ReportDesignWidget(ReportEnginePrivate *report, QMainWindow *mainWindow, QWidget *parent) : ReportDesignWidget::ReportDesignWidget(ReportEnginePrivate *report, QMainWindow *mainWindow, QWidget *parent) :
QWidget(parent), m_mainWindow(mainWindow), m_verticalGridStep(10), m_horizontalGridStep(10), m_useGrid(false) QWidget(parent), m_mainWindow(mainWindow), m_verticalGridStep(10), m_horizontalGridStep(10), m_useGrid(false)
{ {
#ifdef HAVE_QT5
m_tabWidget = new QTabWidget(this); m_tabWidget = new QTabWidget(this);
#endif
#ifdef HAVE_QT4
m_tabWidget = new LimeReportTabWidget(this);
#endif
m_tabWidget->setTabPosition(QTabWidget::South); m_tabWidget->setTabPosition(QTabWidget::South);
m_tabWidget->setMovable(true); m_tabWidget->setMovable(true);
connect(m_tabWidget->tabBar(), SIGNAL(tabMoved(int,int)), this, SLOT(slotTabMoved(int,int))); connect(m_tabWidget->tabBar(), SIGNAL(tabMoved(int,int)), this, SLOT(slotTabMoved(int,int)));

View File

@ -42,6 +42,15 @@
#include "lrreportengine_p.h" #include "lrreportengine_p.h"
#include "lrgraphicsviewzoom.h" #include "lrgraphicsviewzoom.h"
#ifdef HAVE_QT4
QT_BEGIN_NAMESPACE
class LimeReportTabWidget: public QTabWidget{
public:
explicit LimeReportTabWidget(QWidget *parent = 0):QTabWidget(parent){}
QTabBar* tabBar() const{ return QTabWidget::tabBar();}
};
QT_END_NAMESPACE
#endif
namespace LimeReport { namespace LimeReport {
@ -158,7 +167,12 @@ private:
QGraphicsView *m_view; QGraphicsView *m_view;
QTextEdit* m_scriptEditor; QTextEdit* m_scriptEditor;
QMainWindow *m_mainWindow; QMainWindow *m_mainWindow;
#ifdef HAVE_QT5
QTabWidget* m_tabWidget; QTabWidget* m_tabWidget;
#endif
#ifdef HAVE_QT4
LimeReportTabWidget* m_tabWidget;
#endif
GraphicsViewZoomer* m_zoomer; GraphicsViewZoomer* m_zoomer;
QFont m_defaultFont; QFont m_defaultFont;
int m_verticalGridStep; int m_verticalGridStep;