/* * This file is part of RawTherapee. * * Copyright (c) 2004-2010 Gabor Horvath * * RawTherapee is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * RawTherapee is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ #ifndef _EXIFPANEL_ #define _EXIFPANEL_ #include #include "toolpanel.h" class ExifPanel : public Gtk::VBox, public ToolPanel { private: const rtengine::ImageMetaData* idata; rtengine::procparams::ExifPairs changeList; rtengine::procparams::ExifPairs defChangeList; bool recursiveOp; class ExifColumns : public Gtk::TreeModelColumnRecord { public: Gtk::TreeModelColumn > icon; Gtk::TreeModelColumn field; Gtk::TreeModelColumn field_nopango; Gtk::TreeModelColumn value; Gtk::TreeModelColumn value_nopango; Gtk::TreeModelColumn orig_value; Gtk::TreeModelColumn action; Gtk::TreeModelColumn editable; Gtk::TreeModelColumn edited; ExifColumns() { add(field); add(value); add(icon); add(action); add(edited); add(field_nopango); add(value_nopango); add(editable); add(orig_value); } }; Glib::RefPtr delicon; Glib::RefPtr keepicon; Glib::RefPtr editicon; ExifColumns exifColumns; Gtk::TreeView* exifTree; Gtk::ScrolledWindow* scrolledWindow; Glib::RefPtr exifTreeModel; Gtk::Button* remove; Gtk::Button* keep; Gtk::Button* add; Gtk::Button* reset; Gtk::Button* resetAll; Gtk::TreeModel::Children addTag (const Gtk::TreeModel::Children& root, Glib::ustring field, Glib::ustring value, rtexif::ActionCode action, bool editable); void editTag (Gtk::TreeModel::Children root, Glib::ustring name, Glib::ustring value); void updateChangeList (Gtk::TreeModel::Children root, std::string prefix); void addDirectory (const rtexif::TagDirectory* dir, Gtk::TreeModel::Children root); Glib::ustring getSelection (bool onlyifeditable = false); Glib::ustring getSelectedValue (); void updateChangeList (); void applyChangeList (); void keepIt (Gtk::TreeModel::iterator iter); void delIt (Gtk::TreeModel::iterator iter); Gtk::TreeModel::iterator resetIt (Gtk::TreeModel::iterator iter); public: ExifPanel (); virtual ~ExifPanel (); void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setImageData (const rtengine::ImageMetaData* id); void exifSelectionChanged (); void removePressed (); void keepPressed (); void resetPressed (); void resetAllPressed (); void addPressed (); void row_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column); void notifyListener (); }; #endif