SVN commit 683279 by cgilles:
digiKam from trunk: complete KDE4 port of Raindrop image plugin. CCMAIL: [hidden email] M +10 -17 CMakeLists.txt M +14 -20 imageeffect_raindrop.cpp M +3 -1 imageplugin_raindrop.cpp M +1 -2 imageplugin_raindrop.h M +3 -4 raindrop.cpp --- trunk/extragear/graphics/digikam/imageplugins/raindrop/CMakeLists.txt #683278:683279 @@ -1,23 +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_raindrop_PART_SRCS imageplugin_raindrop.cpp + imageeffect_raindrop.cpp + raindrop.cpp + ) +KDE4_AUTOMOC(${digikamimageplugin_raindrop_PART_SRCS}) -########### next target ############### +KDE4_ADD_PLUGIN(digikamimageplugin_raindrop ${digikamimageplugin_raindrop_PART_SRCS}) -set(digikamimageplugin_raindrop_PART_SRCS imageplugin_raindrop.cpp imageeffect_raindrop.cpp raindrop.cpp ) +TARGET_LINK_LIBRARIES(digikamimageplugin_raindrop digikam) -kde4_automoc(${digikamimageplugin_raindrop_PART_SRCS}) +INSTALL(TARGETS digikamimageplugin_raindrop DESTINATION ${PLUGIN_INSTALL_DIR}) -kde4_add_plugin(digikamimageplugin_raindrop ${digikamimageplugin_raindrop_PART_SRCS}) - -target_link_libraries(digikamimageplugin_raindrop digikam ) - -install(TARGETS digikamimageplugin_raindrop DESTINATION ${PLUGIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES digikamimageplugin_raindrop_ui.rc DESTINATION ${DATA_INSTALL_DIR}/digikam ) -install( FILES digikamimageplugin_raindrop.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - +INSTALL(FILES digikamimageplugin_raindrop_ui.rc DESTINATION ${DATA_INSTALL_DIR}/digikam ) +INSTALL(FILES digikamimageplugin_raindrop.desktop DESTINATION ${SERVICES_INSTALL_DIR}) --- trunk/extragear/graphics/digikam/imageplugins/raindrop/imageeffect_raindrop.cpp #683278:683279 @@ -24,14 +24,11 @@ // Qt includes. -#include <qlabel.h> +#include <QLabel> +#include <QFrame> +#include <QImage> +#include <QGridLayout> -#include <qlayout.h> -#include <q3frame.h> -#include <qimage.h> -//Added by qt3to4: -#include <Q3GridLayout> - // KDE includes. #include <kconfig.h> @@ -91,10 +88,8 @@ // ------------------------------------------------------------- - QWidget *widget = new QWidget(this); - setMainWidget(widget); - QWidget *gboxSettings = new QWidget(widget); - Q3GridLayout* gridSettings = new Q3GridLayout( gboxSettings, 5, 2, spacingHint()); + QWidget *gboxSettings = new QWidget(mainWidget()); + QGridLayout* gridSettings = new QGridLayout(gboxSettings); QLabel *label1 = new QLabel(i18n("Drop size:"), gboxSettings); @@ -102,10 +97,7 @@ m_dropInput->setRange(0, 200, 1, true); m_dropInput->setValue(80); m_dropInput->setWhatsThis( i18n("<p>Set here the raindrops' size.")); - - gridSettings->addMultiCellWidget(label1, 0, 0, 0, 2); - gridSettings->addMultiCellWidget(m_dropInput, 1, 1, 0, 2); - + // ------------------------------------------------------------- QLabel *label2 = new QLabel(i18n("Number:"), gboxSettings); @@ -115,9 +107,6 @@ m_amountInput->setValue(150); m_amountInput->setWhatsThis( i18n("<p>This value controls the maximum number of raindrops.")); - gridSettings->addMultiCellWidget(label2, 2, 2, 0, 2); - gridSettings->addMultiCellWidget(m_amountInput, 3, 3, 0, 2); - // ------------------------------------------------------------- QLabel *label3 = new QLabel(i18n("Fish eyes:"), gboxSettings); @@ -126,10 +115,16 @@ m_coeffInput->setRange(1, 100, 1, true); m_coeffInput->setValue(30); m_coeffInput->setWhatsThis( i18n("<p>This value is the fish-eye-effect optical " - "distortion coefficient.")); + "distortion coefficient.")); + gridSettings->addMultiCellWidget(label1, 0, 0, 0, 2); + gridSettings->addMultiCellWidget(m_dropInput, 1, 1, 0, 2); + gridSettings->addMultiCellWidget(label2, 2, 2, 0, 2); + gridSettings->addMultiCellWidget(m_amountInput, 3, 3, 0, 2); gridSettings->addMultiCellWidget(label3, 4, 4, 0, 2); gridSettings->addMultiCellWidget(m_coeffInput, 5, 5, 0, 2); + gridSettings->setMargin(spacingHint()); + gridSettings->setSpacing(0); setUserAreaWidget(gboxSettings); @@ -261,4 +256,3 @@ } } // NameSpace DigikamRainDropImagesPlugin - --- trunk/extragear/graphics/digikam/imageplugins/raindrop/imageplugin_raindrop.cpp #683278:683279 @@ -45,7 +45,9 @@ { m_raindropAction = new KAction(KIcon("raindrop"), i18n("Raindrops..."), this); actionCollection()->addAction("imageplugin_raindrop", m_raindropAction ); - connect(m_raindropAction, SIGNAL(triggered(bool) ), SLOT(slotRainDrop())); + + connect(m_raindropAction, SIGNAL(triggered(bool) ), + this, SLOT(slotRainDrop())); setXMLFile( "digikamimageplugin_raindrop_ui.rc" ); --- trunk/extragear/graphics/digikam/imageplugins/raindrop/imageplugin_raindrop.h #683278:683279 @@ -37,8 +37,7 @@ public: - ImagePlugin_RainDrop(QObject *parent, - const QStringList &args); + ImagePlugin_RainDrop(QObject *parent, const QStringList &args); ~ImagePlugin_RainDrop(); void setEnabledActions(bool enable); --- trunk/extragear/graphics/digikam/imageplugins/raindrop/raindrop.cpp #683278:683279 @@ -32,9 +32,8 @@ // Qt includes. -#include <q3deepcopy.h> -#include <qdatetime.h> -#include <qrect.h> +#include <QDateTime> +#include <QRect> // Local includes. @@ -46,7 +45,7 @@ { RainDrop::RainDrop(Digikam::DImg *orgImage, QObject *parent, int drop, - int amount, int coeff, QRect *selection) + int amount, int coeff, QRect *selection) : Digikam::DImgThreadedFilter(orgImage, parent, "RainDrop") { m_drop = drop; _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |