SVN commit 683836 by cgilles:
digiKam from trunk: complete KDE4 port of Emboss image plugin. CCMAIL: [hidden email] M +10 -16 CMakeLists.txt M +13 -11 imageeffect_emboss.cpp M +4 -3 imageplugin_emboss.cpp M +1 -2 imageplugin_emboss.h --- trunk/extragear/graphics/digikam/imageplugins/emboss/CMakeLists.txt #683835:683836 @@ -1,22 +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_emboss_PART_SRCS imageplugin_emboss.cpp + imageeffect_emboss.cpp + emboss.cpp + ) +KDE4_AUTOMOC(${digikamimageplugin_emboss_PART_SRCS}) -########### next target ############### +KDE4_ADD_PLUGIN(digikamimageplugin_emboss ${digikamimageplugin_emboss_PART_SRCS}) -set(digikamimageplugin_emboss_PART_SRCS imageplugin_emboss.cpp imageeffect_emboss.cpp emboss.cpp ) +TARGET_LINK_LIBRARIES(digikamimageplugin_emboss digikam) -kde4_automoc(${digikamimageplugin_emboss_PART_SRCS}) +INSTALL(TARGETS digikamimageplugin_emboss DESTINATION ${PLUGIN_INSTALL_DIR}) -kde4_add_plugin(digikamimageplugin_emboss ${digikamimageplugin_emboss_PART_SRCS}) - -target_link_libraries(digikamimageplugin_emboss digikam digikam ) - -install(TARGETS digikamimageplugin_emboss DESTINATION ${PLUGIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES digikamimageplugin_emboss_ui.rc DESTINATION ${DATA_INSTALL_DIR}/digikam ) -install( FILES digikamimageplugin_emboss.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - +INSTALL(FILES digikamimageplugin_emboss_ui.rc DESTINATION ${DATA_INSTALL_DIR}/digikam) +install(FILES digikamimageplugin_emboss.desktop DESTINATION ${SERVICES_INSTALL_DIR}) --- trunk/extragear/graphics/digikam/imageplugins/emboss/imageeffect_emboss.cpp #683835:683836 @@ -25,12 +25,9 @@ // Qt includes. -#include <qlabel.h> +#include <QLabel> +#include <QGridLayout> -#include <qlayout.h> -//Added by qt3to4: -#include <Q3GridLayout> - // KDE includes. #include <klocale.h> @@ -55,7 +52,8 @@ { ImageEffect_Emboss::ImageEffect_Emboss(QWidget* parent) - : Digikam::CtrlPanelDlg(parent, i18n("Emboss Image"), "emboss", false, false, true, + : Digikam::CtrlPanelDlg(parent, i18n("Emboss Image"), "emboss", + false, false, true, Digikam::ImagePannelWidget::SeparateViewAll) { QString whatsThis; @@ -83,17 +81,22 @@ // ------------------------------------------------------------- - QWidget *gboxSettings = new QWidget(m_imagePreviewWidget); - Q3GridLayout* gridSettings = new Q3GridLayout( gboxSettings, 1, 1, 0, spacingHint()); + QWidget *gboxSettings = new QWidget(m_imagePreviewWidget); + QGridLayout* gridSettings = new QGridLayout( gboxSettings ); + QLabel *label1 = new QLabel(i18n("Depth:"), gboxSettings); - m_depthInput = new KIntNumInput(gboxSettings); + m_depthInput = new KIntNumInput(gboxSettings); m_depthInput->setRange(10, 300, 1, true); m_depthInput->setWhatsThis( i18n("<p>Set here the depth of the embossing image effect.") ); + + // ------------------------------------------------------------- gridSettings->addMultiCellWidget(label1, 0, 0, 0, 1); gridSettings->addMultiCellWidget(m_depthInput, 1, 1, 0, 1); - + gridSettings->setMargin(spacingHint()); + gridSettings->setSpacing(spacingHint()); + m_imagePreviewWidget->setUserAreaWidget(gboxSettings); // ------------------------------------------------------------- @@ -170,4 +173,3 @@ } } // NameSpace DigikamEmbossImagesPlugin - --- trunk/extragear/graphics/digikam/imageplugins/emboss/imageplugin_emboss.cpp #683835:683836 @@ -41,14 +41,15 @@ K_EXPORT_COMPONENT_FACTORY(digikamimageplugin_emboss, KGenericFactory<ImagePlugin_Emboss>("digikamimageplugin_emboss")); -ImagePlugin_Emboss::ImagePlugin_Emboss(QObject *parent, - const QStringList &) +ImagePlugin_Emboss::ImagePlugin_Emboss(QObject *parent, const QStringList &) : Digikam::ImagePlugin(parent, "ImagePlugin_Emboss") { m_embossAction = new KAction(KIcon("embosstool"), i18n("Emboss..."), this); actionCollection()->addAction("imageplugin_emboss", m_embossAction ); - connect(m_embossAction, SIGNAL(triggered(bool) ), SLOT(slotEmboss())); + + connect(m_embossAction, SIGNAL(triggered(bool)), + this, SLOT(slotEmboss())); setXMLFile( "digikamimageplugin_emboss_ui.rc" ); --- trunk/extragear/graphics/digikam/imageplugins/emboss/imageplugin_emboss.h #683835:683836 @@ -38,8 +38,7 @@ public: - ImagePlugin_Emboss(QObject *parent, - const QStringList &args); + ImagePlugin_Emboss(QObject *parent, const QStringList &args); ~ImagePlugin_Emboss(); 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 |