Further reduction of include dependencies
This commit is contained in:
parent
785273e7bf
commit
962f81f6bc
@ -28,6 +28,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "cachemanager.h"
|
||||||
#include "thumbnail.h"
|
#include "thumbnail.h"
|
||||||
#include "batchqueue.h"
|
#include "batchqueue.h"
|
||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
|
@ -17,8 +17,24 @@
|
|||||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "bqentryupdater.h"
|
#include "bqentryupdater.h"
|
||||||
#include <gtkmm.h>
|
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
#include "../rtengine/utils.h"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
void thumbInterp(const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (options.thumbInterp == 0) {
|
||||||
|
rtengine::nearestInterp (src, sw, sh, dst, dw, dh);
|
||||||
|
} else if (options.thumbInterp == 1) {
|
||||||
|
rtengine::bilinearInterp (src, sw, sh, dst, dw, dh);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
BatchQueueEntryUpdater batchQueueEntryUpdater;
|
BatchQueueEntryUpdater batchQueueEntryUpdater;
|
||||||
|
|
||||||
@ -27,7 +43,7 @@ BatchQueueEntryUpdater::BatchQueueEntryUpdater ()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void BatchQueueEntryUpdater::process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::ProcParams* pparams, Thumbnail* thumbnail)
|
void BatchQueueEntryUpdater::process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::procparams::ProcParams* pparams, Thumbnail* thumbnail)
|
||||||
{
|
{
|
||||||
if (!oimg && (!pparams || !thumbnail)) {
|
if (!oimg && (!pparams || !thumbnail)) {
|
||||||
//printf("WARNING! !oimg && (!pparams || !thumbnail)\n");
|
//printf("WARNING! !oimg && (!pparams || !thumbnail)\n");
|
||||||
|
@ -48,7 +48,7 @@ class BatchQueueEntryUpdater
|
|||||||
guint8* oimg;
|
guint8* oimg;
|
||||||
int ow, oh, newh;
|
int ow, oh, newh;
|
||||||
BQEntryUpdateListener* listener;
|
BQEntryUpdateListener* listener;
|
||||||
rtengine::ProcParams* pparams;
|
rtengine::procparams::ProcParams* pparams;
|
||||||
Thumbnail* thumbnail;
|
Thumbnail* thumbnail;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
BatchQueueEntryUpdater ();
|
BatchQueueEntryUpdater ();
|
||||||
|
|
||||||
void process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::ProcParams* pparams = nullptr, Thumbnail* thumbnail = nullptr);
|
void process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::procparams::ProcParams* pparams = nullptr, Thumbnail* thumbnail = nullptr);
|
||||||
void removeJobs (BQEntryUpdateListener* listener);
|
void removeJobs (BQEntryUpdateListener* listener);
|
||||||
void terminate ();
|
void terminate ();
|
||||||
|
|
||||||
|
@ -217,16 +217,6 @@ bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void thumbInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (options.thumbInterp == 0) {
|
|
||||||
rtengine::nearestInterp (src, sw, sh, dst, dw, dh);
|
|
||||||
} else if (options.thumbInterp == 1) {
|
|
||||||
rtengine::bilinearInterp (src, sw, sh, dst, dw, dh);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool confirmOverwrite (Gtk::Window& parent, const std::string& filename)
|
bool confirmOverwrite (Gtk::Window& parent, const std::string& filename)
|
||||||
{
|
{
|
||||||
bool safe = true;
|
bool safe = true;
|
||||||
|
@ -48,7 +48,6 @@ class RTImage;
|
|||||||
|
|
||||||
Glib::ustring escapeHtmlChars(const Glib::ustring &src);
|
Glib::ustring escapeHtmlChars(const Glib::ustring &src);
|
||||||
bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference = true);
|
bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference = true);
|
||||||
void thumbInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh);
|
|
||||||
bool confirmOverwrite (Gtk::Window& parent, const std::string& filename);
|
bool confirmOverwrite (Gtk::Window& parent, const std::string& filename);
|
||||||
void writeFailed (Gtk::Window& parent, const std::string& filename);
|
void writeFailed (Gtk::Window& parent, const std::string& filename);
|
||||||
void drawCrop (Cairo::RefPtr<Cairo::Context> cr, int imx, int imy, int imw, int imh, int startx, int starty, double scale, const rtengine::procparams::CropParams& cparams, bool drawGuide = true, bool useBgColor = true, bool fullImageVisible = true);
|
void drawCrop (Cairo::RefPtr<Cairo::Context> cr, int imx, int imy, int imw, int imh, int startx, int starty, double scale, const rtengine::procparams::CropParams& cparams, bool drawGuide = true, bool useBgColor = true, bool fullImageVisible = true);
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <lensfun.h>
|
#include <lensfun.h>
|
||||||
|
#include "cachemanager.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "soundman.h"
|
#include "soundman.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include "cachemanager.h"
|
||||||
|
#include "filebrowserentry.h"
|
||||||
#include "previewloader.h"
|
#include "previewloader.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
#include "threadutils.h"
|
#include "threadutils.h"
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
|
|
||||||
#include "filebrowserentry.h"
|
|
||||||
|
|
||||||
#include "../rtengine/noncopyable.h"
|
#include "../rtengine/noncopyable.h"
|
||||||
|
|
||||||
|
class FileBrowserEntry;
|
||||||
|
|
||||||
class PreviewLoaderListener
|
class PreviewLoaderListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -88,7 +88,7 @@ void PreviewWindow::updatePreviewImage ()
|
|||||||
cc->fill();
|
cc->fill();
|
||||||
|
|
||||||
if (previewHandler->getCropParams().enabled) {
|
if (previewHandler->getCropParams().enabled) {
|
||||||
rtengine::CropParams cparams = previewHandler->getCropParams();
|
rtengine::procparams::CropParams cparams = previewHandler->getCropParams();
|
||||||
switch (options.cropGuides) {
|
switch (options.cropGuides) {
|
||||||
case Options::CROP_GUIDE_NONE:
|
case Options::CROP_GUIDE_NONE:
|
||||||
cparams.guide = "None";
|
cparams.guide = "None";
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include "rtwindow.h"
|
#include "rtwindow.h"
|
||||||
|
#include "cachemanager.h"
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
#include "iccprofilecreator.h"
|
#include "iccprofilecreator.h"
|
||||||
#include "cursormanager.h"
|
#include "cursormanager.h"
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
#include "cachemanager.h"
|
||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
#include "thumbnail.h"
|
#include "thumbnail.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -25,6 +26,7 @@
|
|||||||
#include "../rtengine/colortemp.h"
|
#include "../rtengine/colortemp.h"
|
||||||
#include "../rtengine/imagedata.h"
|
#include "../rtengine/imagedata.h"
|
||||||
#include "../rtengine/procparams.h"
|
#include "../rtengine/procparams.h"
|
||||||
|
#include "../rtengine/rtthumbnail.h"
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
|
|
||||||
#include "../rtengine/dynamicprofile.h"
|
#include "../rtengine/dynamicprofile.h"
|
||||||
@ -1151,3 +1153,48 @@ bool Thumbnail::imageLoad(bool loading)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Thumbnail::getCamWB(double& temp, double& green) const
|
||||||
|
{
|
||||||
|
if (tpp) {
|
||||||
|
tpp->getCamWB (temp, green);
|
||||||
|
} else {
|
||||||
|
temp = green = -1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Thumbnail::getSpotWB(int x, int y, int rect, double& temp, double& green)
|
||||||
|
{
|
||||||
|
if (tpp) {
|
||||||
|
tpp->getSpotWB (getProcParams(), x, y, rect, temp, green);
|
||||||
|
} else {
|
||||||
|
temp = green = -1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Thumbnail::applyAutoExp (rtengine::procparams::ProcParams& pparams)
|
||||||
|
{
|
||||||
|
if (tpp) {
|
||||||
|
tpp->applyAutoExp (pparams);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const CacheImageData* Thumbnail::getCacheImageData()
|
||||||
|
{
|
||||||
|
return &cfs;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string Thumbnail::getMD5() const
|
||||||
|
{
|
||||||
|
return cfs.md5;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Thumbnail::isQuick() const
|
||||||
|
{
|
||||||
|
return cfs.thumbImgType == CacheImageData::QUICK_THUMBNAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Thumbnail::isPParamsValid() const
|
||||||
|
{
|
||||||
|
return pparamsValid;
|
||||||
|
}
|
||||||
|
@ -24,13 +24,21 @@
|
|||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
|
|
||||||
#include "cacheimagedata.h"
|
#include "cacheimagedata.h"
|
||||||
#include "cachemanager.h"
|
|
||||||
#include "threadutils.h"
|
#include "threadutils.h"
|
||||||
#include "thumbnaillistener.h"
|
#include "thumbnaillistener.h"
|
||||||
|
|
||||||
#include "../rtengine/rtengine.h"
|
namespace rtengine
|
||||||
#include "../rtengine/rtthumbnail.h"
|
{
|
||||||
|
class Thumbnail;
|
||||||
|
|
||||||
|
namespace procparams
|
||||||
|
{
|
||||||
|
|
||||||
|
class ProcParams;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
class CacheManager;
|
class CacheManager;
|
||||||
|
|
||||||
struct ParamsEdited;
|
struct ParamsEdited;
|
||||||
@ -98,14 +106,8 @@ public:
|
|||||||
|
|
||||||
void notifylisterners_procParamsChanged(int whoChangedIt);
|
void notifylisterners_procParamsChanged(int whoChangedIt);
|
||||||
|
|
||||||
bool isQuick() const
|
bool isQuick() const;
|
||||||
{
|
bool isPParamsValid() const;
|
||||||
return cfs.thumbImgType == CacheImageData::QUICK_THUMBNAIL;
|
|
||||||
}
|
|
||||||
bool isPParamsValid() const
|
|
||||||
{
|
|
||||||
return pparamsValid;
|
|
||||||
}
|
|
||||||
bool isRecentlySaved () const;
|
bool isRecentlySaved () const;
|
||||||
void imageDeveloped ();
|
void imageDeveloped ();
|
||||||
void imageEnqueued ();
|
void imageEnqueued ();
|
||||||
@ -123,29 +125,10 @@ public:
|
|||||||
|
|
||||||
const Glib::ustring& getExifString () const;
|
const Glib::ustring& getExifString () const;
|
||||||
const Glib::ustring& getDateTimeString () const;
|
const Glib::ustring& getDateTimeString () const;
|
||||||
void getCamWB (double& temp, double& green) const
|
void getCamWB (double& temp, double& green) const;
|
||||||
{
|
|
||||||
if (tpp) {
|
|
||||||
tpp->getCamWB (temp, green);
|
|
||||||
} else {
|
|
||||||
temp = green = -1.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void getAutoWB (double& temp, double& green, double equal, double tempBias);
|
void getAutoWB (double& temp, double& green, double equal, double tempBias);
|
||||||
void getSpotWB (int x, int y, int rect, double& temp, double& green)
|
void getSpotWB (int x, int y, int rect, double& temp, double& green);
|
||||||
{
|
void applyAutoExp (rtengine::procparams::ProcParams& pparams);
|
||||||
if (tpp) {
|
|
||||||
tpp->getSpotWB (getProcParams(), x, y, rect, temp, green);
|
|
||||||
} else {
|
|
||||||
temp = green = -1.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void applyAutoExp (rtengine::procparams::ProcParams& pparams)
|
|
||||||
{
|
|
||||||
if (tpp) {
|
|
||||||
tpp->applyAutoExp (pparams);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ThFileType getType ();
|
ThFileType getType ();
|
||||||
Glib::ustring getFileName () const
|
Glib::ustring getFileName () const
|
||||||
@ -156,14 +139,8 @@ public:
|
|||||||
|
|
||||||
bool isSupported ();
|
bool isSupported ();
|
||||||
|
|
||||||
const CacheImageData* getCacheImageData()
|
const CacheImageData* getCacheImageData();
|
||||||
{
|
std::string getMD5 () const;
|
||||||
return &cfs;
|
|
||||||
}
|
|
||||||
std::string getMD5 () const
|
|
||||||
{
|
|
||||||
return cfs.md5;
|
|
||||||
}
|
|
||||||
|
|
||||||
int getRank () const;
|
int getRank () const;
|
||||||
void setRank (int rank);
|
void setRank (int rank);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user