mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
cmake buildsystem
This commit is contained in:
17
frontend_qt4/CMakeLists.txt
Normal file
17
frontend_qt4/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# (c) 2008 by BogDan Vatra < bogdan@licentia.eu >
|
||||
|
||||
project(QZint_frontend)
|
||||
|
||||
include_directories(BEFORE ../backend ../backend_qt4)
|
||||
|
||||
set(QZint_frontend_SRCS barcodeitem.cpp main.cpp mainwindow.cpp)
|
||||
QT4_WRAP_CPP(QZint_frontend_SRCS barcodeitem.h mainwindow.h)
|
||||
QT4_WRAP_UI(QZint_frontend_SRCS mainWindow.ui)
|
||||
|
||||
add_executable(QZint_frontend ${QZint_frontend_SRCS})
|
||||
add_dependencies(QZint_frontend QZint zint)
|
||||
|
||||
link_directories( "../backend" "../backend_qt4" )
|
||||
|
||||
target_link_libraries(QZint_frontend zint QZint ${QT_QTGUI_LIBRARY}
|
||||
${QT_QTCORE_LIBRARY} )
|
@ -37,7 +37,7 @@ QRectF BarcodeItem::boundingRect() const
|
||||
|
||||
void BarcodeItem::paint(QPainter * painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
|
||||
{
|
||||
bc.render(*painter,boundingRect(),Zint::BareCode::IgnoreAspectRatio,scaleFactor);
|
||||
bc.render(*painter,boundingRect(),Zint::QZint::IgnoreAspectRatio,scaleFactor);
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define BARCODEITEM_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <barcoderender.h>
|
||||
#include <qzint.h>
|
||||
|
||||
/**
|
||||
@author BogDan Vatra <taipan@licentia.eu>
|
||||
@ -33,7 +33,7 @@ public:
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
|
||||
|
||||
public:
|
||||
mutable Zint::BareCode bc;
|
||||
mutable Zint::QZint bc;
|
||||
int scaleFactor;
|
||||
int w,h;
|
||||
};
|
||||
|
@ -75,7 +75,7 @@ void MainWindow::on_generate_clicked()
|
||||
m_bc.bc.setPrimaryMessage(primary->text());
|
||||
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(stype->currentIndex()));
|
||||
|
||||
m_bc.bc.setBorderType((Zint::BareCode::BorderType)btype->currentIndex());
|
||||
m_bc.bc.setBorderType((Zint::QZint::BorderType)btype->currentIndex());
|
||||
m_bc.bc.setBorderWidth(bwidth->value());
|
||||
m_bc.bc.setHeight(heightb->value());
|
||||
m_bc.bc.setWidth(widthb->value());
|
||||
|
Reference in New Issue
Block a user