SVN commit 683238 by cgilles:
digikam from trunk: complete KDE4 port of OilPaint image plugin CCMAIL: [hidden email] M +10 -18 CMakeLists.txt M +10 -13 imageeffect_oilpaint.cpp M +4 -3 imageplugin_oilpaint.cpp M +1 -2 imageplugin_oilpaint.h --- trunk/extragear/graphics/digikam/imageplugins/oilpaint/CMakeLists.txt #683237:683238 @@ -1,24 +1,16 @@ -include_directories( ${CMAKE_SOURCE_DIR}/digikam/utilities/imageeditor/editor ${CMAKE_SOURCE_DIR}/digikam/utilities/imageeditor/canvas ${CMAKE_SOURCE_DIR}/digikam/libs/histogram ${CMAKE_SOURCE_DIR}/digikam/libs/levels ${CMAKE_SOURCE_DIR}/digikam/libs/curves ${CMAKE_SOURCE_DIR}/digikam/libs/whitebalance ${CMAKE_SOURCE_DIR}/digikam/libs/widgets/common ${CMAKE_SOURCE_DIR}/digikam/libs/widgets/iccprofiles ${CMAKE_SOURCE_DIR}/digikam/libs/widgets/imageplugins ${CMAKE_SOURCE_DIR}/digikam/libs/dialogs ${CMAKE_SOURCE_DIR}/digikam/libs/dimg ${CMAKE_SOURCE_DIR}/digikam/libs/dmetadata ${CMAKE_SOURCE_DIR}/digikam/libs/dimg/filters ${CMAKE_SOURCE_DIR}/digikam/digikam ) +SET(digikamimageplugin_oilpaint_PART_SRCS imageplugin_oilpaint.cpp + imageeffect_oilpaint.cpp + oilpaint.cpp + ) +KDE4_AUTOMOC(${digikamimageplugin_oilpaint_PART_SRCS}) -########### next target ############### +KDE4_ADD_PLUGIN(digikamimageplugin_oilpaint ${digikamimageplugin_oilpaint_PART_SRCS}) -set(digikamimageplugin_oilpaint_PART_SRCS imageplugin_oilpaint.cpp imageeffect_oilpaint.cpp oilpaint.cpp ) +TARGET_LINK_LIBRARIES(digikamimageplugin_oilpaint digikam) +INSTALL(TARGETS digikamimageplugin_oilpaint DESTINATION ${PLUGIN_INSTALL_DIR}) -kde4_automoc(${digikamimageplugin_oilpaint_PART_SRCS}) - -kde4_add_plugin(digikamimageplugin_oilpaint ${digikamimageplugin_oilpaint_PART_SRCS}) - -target_link_libraries(digikamimageplugin_oilpaint digikam ) - -install(TARGETS digikamimageplugin_oilpaint DESTINATION ${PLUGIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES digikamimageplugin_oilpaint_ui.rc DESTINATION ${DATA_INSTALL_DIR}/digikam ) -install( FILES digikamimageplugin_oilpaint.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - +install(FILES digikamimageplugin_oilpaint_ui.rc DESTINATION ${DATA_INSTALL_DIR}/digikam) +install(FILES digikamimageplugin_oilpaint.desktop DESTINATION ${SERVICES_INSTALL_DIR}) --- trunk/extragear/graphics/digikam/imageplugins/oilpaint/imageeffect_oilpaint.cpp #683237:683238 @@ -24,13 +24,10 @@ // Qt includes. -#include <qlabel.h> +#include <QLabel> +#include <QImage> +#include <QGridLayout> -#include <qimage.h> -#include <qlayout.h> -//Added by qt3to4: -#include <Q3GridLayout> - // KDE includes. #include <kcursor.h> @@ -88,25 +85,26 @@ // ------------------------------------------------------------- QWidget *gboxSettings = new QWidget(m_imagePreviewWidget); - Q3GridLayout* gridSettings = new Q3GridLayout( gboxSettings, 3, 1, 0, spacingHint()); + QGridLayout* gridSettings = new QGridLayout(gboxSettings); QLabel *label1 = new QLabel(i18n("Brush size:"), gboxSettings); m_brushSizeInput = new KIntNumInput(gboxSettings); m_brushSizeInput->setRange(1, 5, 1, true); m_brushSizeInput->setWhatsThis( i18n("<p>Set here the brush size to use for " - "simulating the oil painting.") ); + "simulating the oil painting.") ); - gridSettings->addMultiCellWidget(label1, 0, 0, 0, 1); - gridSettings->addMultiCellWidget(m_brushSizeInput, 1, 1, 0, 1); - // ------------------------------------------------------------- QLabel *label2 = new QLabel(i18n("Smooth:"), gboxSettings); m_smoothInput = new KIntNumInput(gboxSettings); m_smoothInput->setRange(10, 255, 1, true); m_smoothInput->setWhatsThis( i18n("<p>This value controls the smoothing effect " - "of the brush under the canvas.") ); + "of the brush under the canvas.") ); + gridSettings->setMargin(0); + gridSettings->setSpacing(spacingHint()); + gridSettings->addMultiCellWidget(label1, 0, 0, 0, 1); + gridSettings->addMultiCellWidget(m_brushSizeInput, 1, 1, 0, 1); gridSettings->addMultiCellWidget(label2, 2, 2, 0, 1); gridSettings->addMultiCellWidget(m_smoothInput, 3, 3, 0, 1); @@ -201,4 +199,3 @@ } } // NameSpace DigikamOilPaintImagesPlugin - --- trunk/extragear/graphics/digikam/imageplugins/oilpaint/imageplugin_oilpaint.cpp #683237:683238 @@ -45,8 +45,10 @@ : Digikam::ImagePlugin(parent, "ImagePlugin_OilPaint") { m_oilpaintAction = new KAction(KIcon("oilpaint"), i18n("Oil Paint..."), this); - actionCollection()->addAction("imageplugin_oilpaint", m_oilpaintAction ); - connect(m_oilpaintAction, SIGNAL(triggered(bool) ), SLOT(slotOilPaint())); + actionCollection()->addAction("imageplugin_oilpaint", m_oilpaintAction); + + connect(m_oilpaintAction, SIGNAL(triggered(bool) ), + this ,SLOT(slotOilPaint())); setXMLFile( "digikamimageplugin_oilpaint_ui.rc" ); @@ -67,4 +69,3 @@ DigikamOilPaintImagesPlugin::ImageEffect_OilPaint dlg(parentWidget()); dlg.exec(); } - --- trunk/extragear/graphics/digikam/imageplugins/oilpaint/imageplugin_oilpaint.h #683237:683238 @@ -37,8 +37,7 @@ public: - ImagePlugin_OilPaint(QObject *parent, - const QStringList &args); + ImagePlugin_OilPaint(QObject *parent, const QStringList &args); ~ImagePlugin_OilPaint(); void setEnabledActions(bool enable); _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |