Proper check for rawzor libraries.
[rawtherapee-fixes.git] / rtgui / batchqueue.h
blob2e968a47d01de43394fca1968c7d2347542df97c
1 /*
2 * This file is part of RawTherapee.
4 * Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
6 * RawTherapee is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * RawTherapee is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef _BATCHQUEUE_
20 #define _BATCHQUEUE_
22 #include <gtkmm.h>
23 #include <batchqueueentry.h>
24 #include <rtengine.h>
25 #include <options.h>
26 #include <lwbuttonset.h>
27 #include <thumbbrowserbase.h>
29 class BatchQueueListener {
31 public:
32 virtual void queueSizeChanged (int qsize) {}
33 virtual void imageProcessingReady (Glib::ustring fname) {}
34 virtual void queueEmpty () {}
35 virtual bool canStartNext () {}
38 class FileCatalog;
39 class BatchQueue : public ThumbBrowserBase,
40 public rtengine::BatchProcessingListener,
41 public LWButtonListener {
43 protected:
45 BatchQueueEntry* processing;
47 Glib::ustring nameTemplate;
49 Gtk::MenuItem* cancel;
50 Gtk::MenuItem* head;
51 Gtk::MenuItem* tail;
52 Gtk::MenuItem* selall;
53 Gtk::Menu* pmenu;
55 BatchQueueListener* listener;
57 Glib::ustring obtainFileName (const Glib::ustring& origFileName);
58 Glib::ustring autoCompleteFileName (const Glib::ustring& fileName, const Glib::ustring& format);
60 public:
61 BatchQueue ();
63 void addEntry (BatchQueueEntry* entry, bool head=false);
65 void cancelItems (std::vector<ThumbBrowserEntryBase*>* items);
66 void headItems (std::vector<ThumbBrowserEntryBase*>* items);
67 void tailItems (std::vector<ThumbBrowserEntryBase*>* items);
68 void selectAll ();
70 void startProcessing ();
72 bool hasJobs () { return fd.size()>0; }
74 rtengine::ProcessingJob* imageReady (rtengine::IImage16* img);
75 void setProgress (double p);
76 void rightClicked (ThumbBrowserEntryBase* entry);
77 void buttonPressed (LWButton* button, int actionCode, void* actionData);
78 void redrawNeeded (LWButton* button);
80 void setBatchQueueListener (BatchQueueListener* l) { listener = l; }
81 void notifyListener ();
84 #endif