/* * 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 . */ #pragma once #include #include #include "toolpanel.h" class ExifPanel : public Gtk::VBox, public ToolPanel { private: const rtengine::FramesMetaData* idata; const std::unique_ptr changeList; const std::unique_ptr 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; Gtk::TreeModelColumn isSeparator; ExifColumns() { add (field); add (value); add (icon); add (action); add (edited); add (field_nopango); add (value_nopango); add (editable); add (orig_value); add (isSeparator); } }; 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::ToggleButton* showAll; 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, bool checkForSeparator = false); Gtk::TreeModel::Children addSeparator(); 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); void removePressed(); void keepPressed(); void resetPressed(); void resetAllPressed(); void addPressed(); void showAlltoggled(); bool rowSeperatorFunc(const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter); public: ExifPanel (); ~ExifPanel() override; void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override; void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) override; void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void setImageData (const rtengine::FramesMetaData* id); void exifSelectionChanged(); void row_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column); void notifyListener(); };