0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 16:44:39 +03:00

Qt4 build fixed

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

View File

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

View File

@ -42,6 +42,15 @@
#include "lrreportengine_p.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 {
@ -198,7 +207,12 @@ private:
DialogDesignerManager* m_dialogDesignerManager;
#endif
QMainWindow *m_mainWindow;
#ifdef HAVE_QT5
QTabWidget* m_tabWidget;
#endif
#ifdef HAVE_QT4
LimeReportTabWidget* m_tabWidget;
#endif
GraphicsViewZoomer* m_zoomer;
QFont m_defaultFont;
int m_verticalGridStep;