SVN commit 683852 by cgilles:
digiKam from trunk: complete KDE4 port of Infrared image plugin. CCMAIL: [hidden email] M +10 -16 CMakeLists.txt M +28 -21 imageeffect_infrared.cpp M +4 -3 imageplugin_infrared.cpp M +1 -2 imageplugin_infrared.h M +2 -2 infrared.cpp --- trunk/extragear/graphics/digikam/imageplugins/infrared/CMakeLists.txt #683851:683852 @@ -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_infrared_PART_SRCS imageplugin_infrared.cpp + imageeffect_infrared.cpp + infrared.cpp + ) +KDE4_AUTOMOC(${digikamimageplugin_infrared_PART_SRCS}) -########### next target ############### +KDE4_ADD_PLUGIN(digikamimageplugin_infrared ${digikamimageplugin_infrared_PART_SRCS}) -set(digikamimageplugin_infrared_PART_SRCS imageplugin_infrared.cpp imageeffect_infrared.cpp infrared.cpp ) +TARGET_LINK_LIBRARIES(digikamimageplugin_infrared digikam) -kde4_automoc(${digikamimageplugin_infrared_PART_SRCS}) +INSTALL(TARGETS digikamimageplugin_infrared DESTINATION ${PLUGIN_INSTALL_DIR}) -kde4_add_plugin(digikamimageplugin_infrared ${digikamimageplugin_infrared_PART_SRCS}) - -target_link_libraries(digikamimageplugin_infrared digikam ) - -install(TARGETS digikamimageplugin_infrared DESTINATION ${PLUGIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES digikamimageplugin_infrared_ui.rc DESTINATION ${DATA_INSTALL_DIR}/digikam ) -install( FILES digikamimageplugin_infrared.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - +INSTALL(FILES digikamimageplugin_infrared_ui.rc DESTINATION ${DATA_INSTALL_DIR}/digikam) +INSTALL(FILES digikamimageplugin_infrared.desktop DESTINATION ${SERVICES_INSTALL_DIR}) --- trunk/extragear/graphics/digikam/imageplugins/infrared/imageeffect_infrared.cpp #683851:683852 @@ -25,17 +25,14 @@ // Qt includes. -#include <qimage.h> -#include <qlabel.h> +#include <QImage> +#include <QLabel> +#include <QLCDNumber> +#include <QSlider> +#include <QDateTime> +#include <QCheckBox> +#include <QGridLayout> -#include <qlcdnumber.h> -#include <qslider.h> -#include <qlayout.h> -#include <qdatetime.h> -#include <qcheckbox.h> -//Added by qt3to4: -#include <Q3GridLayout> - // KDE includes. #include <klocale.h> @@ -88,13 +85,18 @@ // ------------------------------------------------------------- QWidget *gboxSettings = new QWidget(m_imagePreviewWidget); - Q3GridLayout* gridSettings = new Q3GridLayout( gboxSettings, 2, 1, 0, spacingHint()); + QGridLayout* gridSettings = new QGridLayout( gboxSettings ); + QLabel *label1 = new QLabel(i18n("Sensitivity (ISO):"), gboxSettings); - m_sensibilitySlider = new QSlider(1, 25, 1, 1, Qt::Horizontal, gboxSettings); + m_sensibilitySlider = new QSlider(Qt::Horizontal, gboxSettings); + m_sensibilitySlider->setMinimum(2); + m_sensibilitySlider->setMaximum(30); + m_sensibilitySlider->setPageStep(1); + m_sensibilitySlider->setValue(12); m_sensibilitySlider->setTracking ( false ); m_sensibilitySlider->setTickInterval(1); - m_sensibilitySlider->setTickmarks(QSlider::TicksBelow); + m_sensibilitySlider->setTickPosition(QSlider::TicksBelow); m_sensibilityLCDValue = new QLCDNumber (4, gboxSettings); m_sensibilityLCDValue->setSegmentStyle ( QLCDNumber::Flat ); @@ -103,23 +105,29 @@ "Increasing this value will increase the portion of green color in the mix. " "It will also increase the halo effect on the hightlights, and the film " "graininess (if that box is checked).</p>" - "<p>Note: to simulate an <b>Ilford SFX200</b> infrared film, use a sensitivity excursion of 200 to 800. " - "A sensitivity over 800 simulates <b>Kodak HIE</b> high-speed infrared film. This last one creates a more " + "<p>Note: to simulate an <b>Ilford SFX200</b> infrared film, use a sensitivity " + "excursion of 200 to 800. " + "A sensitivity over 800 simulates <b>Kodak HIE</b> high-speed infrared film. " + "This last one creates a more " "dramatic photographic style.</p>"); m_sensibilityLCDValue->setWhatsThis( whatsThis); m_sensibilitySlider->setWhatsThis( whatsThis); - gridSettings->addMultiCellWidget(label1, 0, 0, 0, 1); - gridSettings->addMultiCellWidget(m_sensibilitySlider, 1, 1, 0, 0); - gridSettings->addMultiCellWidget(m_sensibilityLCDValue, 1, 1, 1, 1); - // ------------------------------------------------------------- m_addFilmGrain = new QCheckBox( i18n("Add film grain"), gboxSettings); m_addFilmGrain->setChecked( true ); m_addFilmGrain->setWhatsThis( i18n("<p>This option adds infrared film grain to " - "the image depending on ISO-sensitivity.")); + "the image depending on ISO-sensitivity.")); + + // ------------------------------------------------------------- + + gridSettings->setMargin(spacingHint()); + gridSettings->setSpacing(spacingHint()); + gridSettings->addMultiCellWidget(label1, 0, 0, 0, 1); + gridSettings->addMultiCellWidget(m_sensibilitySlider, 1, 1, 0, 0); + gridSettings->addMultiCellWidget(m_sensibilityLCDValue, 1, 1, 1, 1); gridSettings->addMultiCellWidget(m_addFilmGrain, 2, 2, 0, 1); m_imagePreviewWidget->setUserAreaWidget(gboxSettings); @@ -227,4 +235,3 @@ } } // NameSpace DigikamInfraredImagesPlugin - --- trunk/extragear/graphics/digikam/imageplugins/infrared/imageplugin_infrared.cpp #683851:683852 @@ -45,10 +45,11 @@ : Digikam::ImagePlugin(parent, "ImagePlugin_Infrared") { - m_infraredAction = new KAction(KIcon("infrared"), i18n("Infrared Film..."), this); - actionCollection()->addAction("imageplugin_infrared",m_infraredAction ); - connect(m_infraredAction, SIGNAL(triggered(bool) ), SLOT(slotInfrared())); + m_infraredAction = new KAction(KIcon("infrared"), i18n("Infrared Film..."), this); + actionCollection()->addAction("imageplugin_infrared", m_infraredAction ); + connect(m_infraredAction, SIGNAL(triggered(bool)), + this, SLOT(slotInfrared())); setXMLFile( "digikamimageplugin_infrared_ui.rc" ); --- trunk/extragear/graphics/digikam/imageplugins/infrared/imageplugin_infrared.h #683851:683852 @@ -38,8 +38,7 @@ public: - ImagePlugin_Infrared(QObject *parent, - const QStringList &args); + ImagePlugin_Infrared(QObject *parent, const QStringList &args); ~ImagePlugin_Infrared(); void setEnabledActions(bool enable); --- trunk/extragear/graphics/digikam/imageplugins/infrared/infrared.cpp #683851:683852 @@ -3,7 +3,7 @@ * This file is a part of digiKam project * http://www.digikam.org * - * Date : 2005-05-25 + * Date : 2005-05-25 * Description : Infrared threaded image filter. * * Copyright (C) 2005-2007 by Gilles Caulier <caulier dot gilles at gmail dot com> @@ -29,7 +29,7 @@ // Qt includes. -#include <qdatetime.h> +#include <QDateTime> // Local includes. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |