diff options
Diffstat (limited to 'qtinterface')
-rw-r--r-- | qtinterface/CMakeLists.txt | 195 | ||||
-rw-r--r-- | qtinterface/TQt.pc.cmake | 9 | ||||
-rwxr-xr-x | qtinterface/tmoc.cmake | 2 | ||||
-rwxr-xr-x | qtinterface/tqt-replace-stream.cmake | 6 | ||||
-rwxr-xr-x | qtinterface/tqt-replace.cmake | 6 | ||||
-rw-r--r-- | qtinterface/tqt.h.cmake (renamed from qtinterface/tqt.h) | 2 |
6 files changed, 210 insertions, 10 deletions
diff --git a/qtinterface/CMakeLists.txt b/qtinterface/CMakeLists.txt new file mode 100644 index 0000000..56931ed --- /dev/null +++ b/qtinterface/CMakeLists.txt @@ -0,0 +1,195 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/private + ${QT_INCLUDE_DIR} +) + +link_directories( + ${QT_LIBRARY_DIR} +) + + +##### headers ################################### + +configure_file( tqt.h.cmake tqt.h @ONLY ) + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/tqt.h tqtglobaldefines.h tqaccel.h tqaccessible.h + tqaction.h tqapplication.h tqasyncio.h tqbuttongroup.h tqbutton.h tqcanvas.h + tqcdestyle.h tqcheckbox.h tqclipboard.h tqcolordialog.h tqcombobox.h + tqcommonstyle.h tqdatabrowser.h tqdatatable.h tqdataview.h tqdatetimeedit.h + tqdesktopwidget.h tqdial.h tqdialog.h tqdns.h tqdockarea.h tqdockwindow.h + tqdragobject.h tqerrormessage.h tqeventloop.h tqfiledialog.h tqfontdialog.h + tqframe.h tqftp.h tqgl.h tqgplugin.h tqgrid.h tqgridview.h tqgroupbox.h + tqguardedptr.h tqhbox.h tqhbuttongroup.h tqheader.h tqhgroupbox.h + tqhttp.h tqiconview.h tqimageformatplugin.h tqinputdialog.h tqlabel.h + tqlayout.h tqlcdnumber.h tqlineedit.h tqlistbox.h tqlistview.h tqlocalfs.h + tqmainwindow.h tqmenubar.h tqmessagebox.h tqmotifplusstyle.h tqmotifstyle.h + tqmultilineedit.h tqnetworkprotocol.h tqnp.h tqobjectcleanuphandler.h + tqobject.h tqplatinumstyle.h tqpopupmenu.h tqprintdialog.h tqprocess.h + tqprogressbar.h tqprogressdialog.h tqpushbutton.h tqradiobutton.h + tqrangecontrol.h tqscrollbar.h tqscrollview.h tqsemimodal.h tqserversocket.h + tqsessionmanager.h tqsgistyle.h tqsignal.h tqsignalmapper.h tqsizegrip.h + tqslider.h tqsocket.h tqsocketnotifier.h tqsound.h tqspinbox.h tqsplashscreen.h + tqsplitter.h tqsqldatabase.h tqsqldriver.h tqsqldriverplugin.h tqsqlform.h + tqsqlquery.h tqstatusbar.h tqstyle.h tqstyleplugin.h tqstylesheet.h tqtabbar.h + tqtabdialog.h tqtable.h tqtabwidget.h tqtextbrowser.h tqtextcodecplugin.h + tqtextedit.h tqtextview.h tqtimer.h tqtoolbar.h tqtoolbox.h tqtoolbutton.h + tqtooltip.h tqtranslator.h tqurloperator.h tqvalidator.h tqvbox.h + tqvbuttongroup.h tqvgroupbox.h tqwidget.h tqwidgetplugin.h tqwidgetstack.h + tqwindowsstyle.h tqwizard.h tqworkspace.h tqapp.h tqarray.h tqbitarry.h + tqbttngrp.h tqchkbox.h tqclipbrd.h tqcollect.h tqcollection.h tqcombo.h + tqconfig.h tqconnect.h tqdatetm.h tqdrawutl.h tqdstream.h tqfeatures.h + tqfiledef.h tqfiledlg.h tqfileinf.h tqfontinf.h tqfontmet.h tqgbkcodec.h + tqgeneric.h tqgif.h tqglobal.h tqgrpbox.h tqintcach.h tqiodev.h tqjpegio.h + tqkeycode.h tqlined.h tqlist.h tqmenudta.h tqmetaobj.h tqmlined.h tqmngio.h + tqmodules.h tqmsgbox.h tqmultilinedit.h tqnetwork.h tqobjcoll.h tqobjdefs.h + tqpaintdc.h tqpaintd.h tqpdevmet.h tqpmcache.h tqpntarry.h tqpopmenu.h + tqprndlg.h tqprogbar.h tqprogdlg.h tqpushbt.h tqqueue.h tqradiobt.h tqrangect.h + tqscrbar.h tqsession.h tqsocknot.h tqstack.h tqtabdlg.h tqtstream.h tqvector.h + tqwidcoll.h tqwindefs.h tqwindowdefs.h tqwinexport.h tq1xcompatibility.h + tqabstractlayout.h tqasciicache.h tqasciidict.h tqasyncimageio.h tqbig5codec.h + tqbitarray.h tqbitmap.h tqbrush.h tqbuffer.h tqcache.h tqcleanuphandler.h + tqcolor.h tqcompactstyle.h tqconnection.h tqcstring.h tqcursor.h tqdatastream.h + tqdatetime.h tqdeepcopy.h tqdict.h tqdir.h tqdom.h tqdrawutil.h tqdropsite.h + tqeditorfactory.h tqeucjpcodec.h tqeuckrcodec.h tqevent.h tqfile.h tqfileinfo.h + tqfocusdata.h tqfontdatabase.h tqfont.h tqfontinfo.h tqfontmetrics.h + tqgarray.h tqgb18030codec.h tqgcache.h tqgdict.h tqglcolormap.h tqglist.h + tqgvector.h tqhostaddress.h tqiconset.h tqimage.h tqintcache.h tqintdict.h + tqinterlacestyle.h tqiodevice.h tqjiscodec.h tqjpunicode.h tqkeysequence.h + tqlibrary.h tqlocale.h tqmap.h tqmemarray.h tqmenudata.h tqmetaobject.h + tqmime.h tqmovie.h tqmutex.h tqnamespace.h tqobjectdict.h tqobjectlist.h + tqpaintdevice.h tqpaintdevicemetrics.h tqpainter.h tqpair.h tqpalette.h tqpen.h + tqpicture.h tqpixmapcache.h tqpixmap.h tqpngio.h tqpointarray.h tqpoint.h + tqpolygonscanner.h tqprinter.h tqptrcollection.h tqptrdict.h tqptrlist.h + tqptrqueue.h tqptrstack.h tqptrvector.h tqrect.h tqregexp.h tqregion.h + tqrtlcodec.h tqsemaphore.h tqsettings.h tqshared.h tqsignalslotimp.h + tqsimplerichtext.h tqsize.h tqsizepolicy.h tqsjiscodec.h tqsocketdevice.h + tqsortedlist.h tqsqlcursor.h tqsqleditorfactory.h tqsqlerror.h tqsqlfield.h + tqsql.h tqsqlindex.h tqsqlpropertymap.h tqsqlrecord.h tqsqlresult.h + tqsqlselectcursor.h tqstring.h tqstringlist.h tqstrlist.h tqstrvec.h + tqstylefactory.h tqsyntaxhighlighter.h tqtextcodecfactory.h tqtextcodec.h + tqtextstream.h tqthread.h tqthreadstorage.h tqtl.h tqtsciicodec.h tqurl.h + tqurlinfo.h tqutfcodec.h tquuid.h tqvaluelist.h tqvaluestack.h tqvaluevector.h + tqvariant.h tqvfbhdr.h tqwaitcondition.h tqwhatsthis.h tqwidgetfactory.h + tqwidgetintdict.h tqwidgetlist.h tqwmatrix.h tqxml.h private/tqucomextra_p.h + private/tqlayoutengine_p.h private/tqinternal_p.h private/tqeffects_p.h + tqlistiterator.h + DESTINATION ${INCLUDE_INSTALL_DIR} ) + +install( + DIRECTORY tqt4/Qt + DESTINATION ${INCLUDE_INSTALL_DIR} + PATTERN ".svn" EXCLUDE ) + + +##### tqt tools ################################# + +configure_file( tmoc.cmake tmoc @ONLY ) +configure_file( tqt-replace.cmake tqt-replace @ONLY ) +configure_file( tqt-replace-stream.cmake tqt-replace-stream @ONLY ) + +install( PROGRAMS + moc-tqt uic-tqt mcopidl-tqt dcopidl-tqt dcopidlng-tqt + dcopidl2cpp-tqt convert_qt_tqt1 convert_qt_tqt2 + convert_qt_tqt3 ${CMAKE_CURRENT_BINARY_DIR}/tmoc + ${CMAKE_CURRENT_BINARY_DIR}/tqt-replace + ${CMAKE_CURRENT_BINARY_DIR}/tqt-replace-stream + DESTINATION ${BIN_INSTALL_DIR} ) + + +##### tqt pkgconfig ############################# + +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} ) + +unset( PC_QT_LIBRARIES ) +foreach( _lib ${QT_LIBRARIES} ) + set( PC_QT_LIBRARIES "${PC_QT_LIBRARIES} -l${_lib}" ) +endforeach( ) + +configure_file( TQt.pc.cmake TQt.pc @ONLY ) + +install( FILES ${CMAKE_CURRENT_BINARY_DIR}/TQt.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} ) + + +##### tqt (shared) ############################## + + +tde_add_library( tqt SHARED + SOURCES + tqt.cpp tqaccel.cpp tqaccessible.cpp tqaction.cpp tqapplication.cpp + tqasyncio.cpp tqbuttongroup.cpp tqbutton.cpp tqcanvas.cpp tqcdestyle.cpp + tqcheckbox.cpp tqclipboard.cpp tqcolordialog.cpp tqcombobox.cpp + tqcommonstyle.cpp tqdatabrowser.cpp tqdatatable.cpp tqdataview.cpp + tqdatetimeedit.cpp tqdesktopwidget.cpp tqdial.cpp tqdialog.cpp tqdns.cpp + tqdockarea.cpp tqdockwindow.cpp tqdragobject.cpp tqerrormessage.cpp + tqeventloop.cpp tqframe.cpp tqftp.cpp tqfiledialog.cpp tqfontdialog.cpp + tqgl.cpp tqgplugin.cpp tqgrid.cpp tqgridview.cpp tqgroupbox.cpp + tqguardedptr.cpp tqhbox.cpp tqhbuttongroup.cpp tqheader.cpp + tqhgroupbox.cpp tqhttp.cpp tqiconview.cpp tqimageformatplugin.cpp + tqinputdialog.cpp tqlabel.cpp tqlayout.cpp tqlcdnumber.cpp tqlineedit.cpp + tqlistbox.cpp tqlistview.cpp tqlocalfs.cpp tqmainwindow.cpp tqmenubar.cpp + tqmessagebox.cpp tqmotifplusstyle.cpp tqmotifstyle.cpp tqmultilineedit.cpp + tqnetworkprotocol.cpp tqnp.cpp tqobjectcleanuphandler.cpp tqobject.cpp + tqplatinumstyle.cpp tqpopupmenu.cpp tqprintdialog.cpp tqprocess.cpp + tqprogressbar.cpp tqprogressdialog.cpp tqpushbutton.cpp tqradiobutton.cpp + tqrangecontrol.cpp tqscrollbar.cpp tqscrollview.cpp tqsemimodal.cpp + tqserversocket.cpp tqsessionmanager.cpp tqsgistyle.cpp tqsignal.cpp + tqsignalmapper.cpp tqsizegrip.cpp tqslider.cpp tqsocket.cpp + tqsocketnotifier.cpp tqsound.cpp tqspinbox.cpp tqsplashscreen.cpp + tqsplitter.cpp tqsqldatabase.cpp tqsqldriver.cpp tqsqldriverplugin.cpp + tqsqlform.cpp tqsqlquery.cpp tqstatusbar.cpp tqstyle.cpp tqstyleplugin.cpp + tqstylesheet.cpp tqtabbar.cpp tqtabdialog.cpp tqtable.cpp tqtabwidget.cpp + tqtextbrowser.cpp tqtextcodecplugin.cpp tqtextedit.cpp tqtextview.cpp + tqtimer.cpp tqtoolbar.cpp tqtoolbox.cpp tqtoolbutton.cpp tqtooltip.cpp + tqtranslator.cpp tqurloperator.cpp tqvalidator.cpp tqvbox.cpp + tqvbuttongroup.cpp tqvgroupbox.cpp tqwidget.cpp tqwidgetplugin.cpp + tqwidgetstack.cpp tqwindowsstyle.cpp tqwizard.cpp tqworkspace.cpp + tq1xcompatibility.cpp tqabstractlayout.cpp tqasciicache.cpp tqasciidict.cpp + tqasyncimageio.cpp tqbig5codec.cpp tqbitarray.cpp tqbitmap.cpp tqbrush.cpp + tqbuffer.cpp tqcache.cpp tqcleanuphandler.cpp tqcolor.cpp tqcompactstyle.cpp + tqconnection.cpp tqcstring.cpp tqcursor.cpp tqdatastream.cpp tqdatetime.cpp + tqdeepcopy.cpp tqdict.cpp tqdir.cpp tqdom.cpp tqdrawutil.cpp tqdropsite.cpp + tqeditorfactory.cpp tqeucjpcodec.cpp tqeuckrcodec.cpp tqevent.cpp tqfile.cpp + tqfileinfo.cpp tqfocusdata.cpp tqfontdatabase.cpp tqfont.cpp tqfontinfo.cpp + tqfontmetrics.cpp tqgarray.cpp tqgb18030codec.cpp tqgcache.cpp tqgdict.cpp + tqglcolormap.cpp tqglist.cpp tqgvector.cpp tqhostaddress.cpp tqiconset.cpp + tqimage.cpp tqintcache.cpp tqintdict.cpp tqinterlacestyle.cpp tqiodevice.cpp + tqjiscodec.h tqjpunicode.cpp tqkeysequence.cpp tqlibrary.cpp tqlocale.cpp + tqmap.cpp tqmemarray.cpp tqmenudata.cpp tqmetaobject.cpp tqmime.cpp tqmovie.cpp + tqmutex.cpp tqnamespace.cpp tqobjectdict.cpp tqobjectlist.cpp tqpaintdevice.cpp + tqpaintdevicemetrics.cpp tqpainter.cpp tqpair.cpp tqpalette.cpp tqpen.cpp + tqpicture.cpp tqpixmapcache.cpp tqpixmap.cpp tqpngio.cpp tqpointarray.cpp + tqpoint.cpp tqpolygonscanner.cpp tqprinter.cpp tqptrcollection.cpp + tqptrdict.cpp tqptrlist.cpp tqptrqueue.cpp tqptrstack.cpp tqptrvector.cpp + tqrect.cpp tqregexp.cpp tqregion.cpp tqrtlcodec.cpp tqsemaphore.cpp + tqsettings.cpp tqshared.cpp tqsignalslotimp.cpp tqsimplerichtext.cpp tqsize.cpp + tqsizepolicy.cpp tqsjiscodec.cpp tqsocketdevice.cpp tqsortedlist.cpp + tqsqlcursor.cpp tqsqleditorfactory.cpp tqsqlerror.cpp tqsqlfield.cpp + tqsql.cpp tqsqlindex.cpp tqsqlpropertymap.cpp tqsqlrecord.cpp tqsqlresult.cpp + tqsqlselectcursor.cpp tqstring.cpp tqstringlist.cpp tqstrlist.cpp tqstrvec.cpp + tqstylefactory.cpp tqsyntaxhighlighter.cpp tqtextcodecfactory.cpp + tqtextcodec.cpp tqtextstream.cpp tqthread.cpp tqthreadstorage.cpp + tqtl.cpp tqtsciicodec.cpp tqurl.cpp tqurlinfo.cpp tqutfcodec.cpp tquuid.cpp + tqvaluelist.cpp tqvaluestack.cpp tqvaluevector.cpp tqvariant.cpp tqvfbhdr.cpp + tqwaitcondition.cpp tqwhatsthis.cpp tqwidgetfactory.cpp tqwidgetintdict.cpp + tqwidgetlist.cpp tqwmatrix.cpp tqxml.cpp private/tqucomextra_p.cpp + tqlistiterator.cpp + VERSION 4.2.0 + LINK ${QT_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/qtinterface/TQt.pc.cmake b/qtinterface/TQt.pc.cmake index f7d8786..cb4697a 100644 --- a/qtinterface/TQt.pc.cmake +++ b/qtinterface/TQt.pc.cmake @@ -3,8 +3,13 @@ exec_prefix=@PC_EXEC_PREFIX@ libdir=@PC_LIB_DIR@ includedir=@PC_INCLUDE_DIR@ +tmoc_executable=@BIN_INSTALL_DIR@/tmoc +moc_executable=@MOC_EXECUTABLE@ +uic_executable=@UIC_EXECUTABLE@ + Name: TQt Description: Interface and abstraction library for Qt and Trinity Version: @TQT_VERSION@ -Libs: -L${libdir} -ltqt @PKGCONFIG_QT_LIBRARIES@ -Cflags: @PKGCONFIG_QT_DEFINITIONS@ -I@QT_INCLUDE_DIRS@ -I${includedir} +Libs: -L${libdir} -ltqt -L@QT_LIBRARY_DIR@ @PC_QT_LIBRARIES@ +Cflags: @QT_DEFINITIONS@ -I@QT_INCLUDE_DIR@ -I${includedir} -include tqt.h + diff --git a/qtinterface/tmoc.cmake b/qtinterface/tmoc.cmake index b733f87..087fbdb 100755 --- a/qtinterface/tmoc.cmake +++ b/qtinterface/tmoc.cmake @@ -11,7 +11,7 @@ if [ -f @BIN_INSTALL_DIR@/tqt-replace-stream ]; then input_file="$1" out_file="$3" @BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \ - @QT_MOC_EXECUTABLE@ | \ + @MOC_EXECUTABLE@ | \ sed "/#include <qmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \ > "${out_file}" fi diff --git a/qtinterface/tqt-replace-stream.cmake b/qtinterface/tqt-replace-stream.cmake index 3267ce6..6f5f352 100755 --- a/qtinterface/tqt-replace-stream.cmake +++ b/qtinterface/tqt-replace-stream.cmake @@ -1,16 +1,16 @@ #!/bin/bash -QT_VER=@QT_VER@ +QT_VERSION=@QT_VERSION@ if [[ $1 == "" ]]; then echo "Usage: tqt-replace-stream <filename>" else - if [[ $QT_VER == 3 ]]; then + if [[ $QT_VERSION == 3 ]]; then cat $1 | \ sed 's/TQ\([^T]\)/Q\1/g' | \ sed 's/TQT\([^_]\)/QT\1/g' fi - if [[ $QT_VER == 4 ]]; then + if [[ $QT_VERSION == 4 ]]; then cat $1 | \ sed 's/TQAccel/Q3Accel/g' | \ sed 's/TQAccessible/QAccessible/g' | \ diff --git a/qtinterface/tqt-replace.cmake b/qtinterface/tqt-replace.cmake index 66c8f57..7f28f05 100755 --- a/qtinterface/tqt-replace.cmake +++ b/qtinterface/tqt-replace.cmake @@ -1,10 +1,10 @@ #!/bin/bash -QT_VER=@QT_VER@ +QT_VERSION=@QT_VERSION@ if [[ $1 == "" ]]; then echo "Usage: tqt-replace <input_file>" else - if [[ $QT_VER == 3 ]]; then + if [[ $QT_VERSION == 3 ]]; then sed -i 's/TQ\([^T]\)/Q\1/g' "$1" sed -i 's/TQT\([^_]\)/QT\1/g' "$1" sed -i 's/Q_SLOTS>/slots>/g' "$1" @@ -12,7 +12,7 @@ else exit 0 fi - if [[ $QT_VER == 4 ]]; then + if [[ $QT_VERSION == 4 ]]; then sed -i 's/TQAccel/Q3Accel/g' "$1" sed -i 's/TQAccessible/QAccessible/g' "$1" sed -i 's/TQAccessibleObject/QAccessibleObject/g' "$1" diff --git a/qtinterface/tqt.h b/qtinterface/tqt.h.cmake index be6bd3f..8908e66 100644 --- a/qtinterface/tqt.h +++ b/qtinterface/tqt.h.cmake @@ -22,7 +22,7 @@ Boston, MA 02110-1301, USA. #ifndef TQT_H #define TQT_H -#define USE_QT3 +#define USE_QT@QT_VERSION@ #ifdef USE_QT4 #define QT3_SUPPORT |