1 /*************************************************************************** 2 * Copyright (C) 2004-2021 by Pere Constans 3 * constans@molspaces.com 4 * cb2Bib version 2.0.1. Licensed under the GNU GPL version 3. 5 * See the LICENSE file that comes with this distribution. 6 ***************************************************************************/ 7 #ifndef C2BUPDATEMETADATA_H 8 #define C2BUPDATEMETADATA_H 9 10 #include "ui_c2bLogWidget.h" 11 12 #include <QDialog> 13 14 15 class bibReference; 16 class c2bBibParser; 17 18 19 class c2bUpdateMetadata : public QDialog 20 { 21 22 Q_OBJECT 23 24 public: 25 explicit c2bUpdateMetadata(QWidget* parentw = 0); 26 ~c2bUpdateMetadata(); 27 28 void update(const QString& fn, const QString& bibtex); 29 30 31 private slots: 32 void aborted(); 33 void help(); 34 void update(); 35 36 37 private: 38 QPushButton* _buttonAbort; 39 QString _bibtex; 40 QString _fn; 41 Ui::c2bLogWidget ui; 42 bool _aborted; 43 bool needsUpdating(const bibReference& ref, const bibReference& mref); 44 c2bBibParser* _bpP; 45 void writeDifferences(const bibReference& ref, const bibReference& mref); 46 }; 47 48 #endif