cb2bib  2.0.1
About: cb2Bib is a multiplatform application for rapidly extracting unformatted, or unstandardized bibliographic references from email alerts, journal Web pages, and PDF files.
  Fossies Dox: cb2bib-2.0.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

c2bBibParser Class Reference

#include <c2bBibParser.h>

Inheritance diagram for c2bBibParser:
[legend]
Collaboration diagram for c2bBibParser:
[legend]

Signals

void bibModified (bool modified)
 
void setDocumentFilename ()
 
- Signals inherited from bibParser
void statusMessage (const QString &ms)
 

Public Member Functions

 c2bBibParser (QObject *parento=0)
 
 ~c2bBibParser ()
 
void clearCurrentReference ()
 
void setWidgetMapping ()
 
void addField (const QString &name, c2bLineEdit *editor)
 
void addTypes (QComboBox *types)
 
QString field (const QString &name) const
 
void setField (const QString &name, const QString &value) override
 
void setField (const QString &name, const QString &value, const QString &init_value)
 
- Public Member Functions inherited from bibParser
 bibParser (QObject *parento=0)
 
virtual ~bibParser ()
 
QString documentFilename (const QString &base_fn, const QString &bibtex_fn)
 
QString excerpt (const QString &text, const QStringList &hints) const
 
QString parse (const QString &field, const QString &value, const QString &init_value=QString())
 
QString setJournalsToAbbreviated (const QString &text, const bool alternate)
 
QString setJournalsToFull (const QString &text, const bool alternate)
 
QString setTags (const QString &text) const
 
bibReferenceparse (bibReference &reference)
 
void guessFields (const QString &text)
 
void parse (const QString &text, QString *out_text, QString *out_tagtext)
 
void preparse (const QString &text, QString *out_text)
 
QString abbreviatedJournal (const QString &name) const
 
QString fullJournal (const QString &name) const
 
QString alternateAbbreviatedJournal (const QString &name) const
 
QString alternateFullJournal (const QString &name) const
 
const QStringList & abbreviatedJournalList () const
 
bool isAutoRecognized () const
 
QString autoRecognizedString () const
 
QString toBibTeX (bool sig=true) const
 
QString toBibTeX (const bibReference &ref, bool sig=true) const
 
const bibReferencecurrentReference () const
 
void clearCurrentReference ()
 
int fieldCount () const
 
- Public Member Functions inherited from coreBibParser
 coreBibParser (QObject *parento=0)
 
virtual ~coreBibParser ()
 
QString referenceToBibTeX (const bibReference &ref) const
 
QString referenceToFomattedBibTeX (const bibReference &ref) const
 
QString singleReferenceField (const QString &field, const bibReference &ref) const
 
bibReference wholeReference (const QString &str) const
 
bool referenceAtKey (const QString &key, const QString &str, bibReference *ref)
 
bool referencesIn (const QString &str, bibReference *ref)
 
void initReferenceParsing (const QString &dir, const QStringList &fields, bibReference *ref)
 
const QStringList & bibliographicFields () const
 
const QStringList & sortedBibliographicFields () const
 
const QStringList & bibliographicTypes () const
 
void setReferenceParsingDir (const QString &dir)
 
bool hasBibTeX (const QString &str) const
 
int fieldCount (const bibReference &ref) const
 
QString & authorFromBibTeX (QString &as)
 
QString authorFromMedline (const QString &author) const
 
const QString & authorPrefixes () const
 

Private Slots

void referenceEdited (const QString &value)
 
void setField ()
 
void showLog (const QString &log)
 

Private Member Functions

void checkRegExpFile (const QString &fn) override
 
void currentReferenceUpdated () override
 
void setCiteID () override
 
void setReferenceType (const QString &type) override
 

Private Attributes

QComboBox * _type_editor
 
QHash< QString, c2bLineEdit * > _field_editors
 
QPointer< c2bBibPreparserLog_preparser_logP
 
QWidget * _c2b_mainP
 
bool _bp_updates_gui
 

Additional Inherited Members

- Protected Member Functions inherited from coreBibParser
QString adjacentNumbers (const QString &numbers) const
 
- Protected Attributes inherited from bibParser
bibPreparser_preparserP
 
bibReference _current_reference
 
idMaker_cite_idmP
 
idMaker_file_idmP
 
- Protected Attributes inherited from coreBibParser
QRegExp _field_re
 
QStringList _bibliographic_fields
 
QStringList _bibliographic_types
 
QStringList _current_bibliographic_fields
 
QStringList _sorted_bibliographic_fields
 
authorString _authorString
 
settings_settingsP
 

Detailed Description

cb2Bib interface to bibParser

This class groups Bib Parser functionality related to GUI

Author
Pere Constans

Definition at line 28 of file c2bBibParser.h.

Constructor & Destructor Documentation

◆ c2bBibParser()

c2bBibParser::c2bBibParser ( QObject *  parento = 0)
explicit

Copyright (C) 2004-2021 by Pere Constans const.nosp@m.ans@.nosp@m.molsp.nosp@m.aces.nosp@m..com cb2Bib version 2.0.1. Licensed under the GNU GPL version 3. See the LICENSE file that comes with this distribution.

Definition at line 18 of file c2bBibParser.cpp.

References _bp_updates_gui, _c2b_mainP, bibParser::_preparserP, coreBibParser::_settingsP, settings::fileName(), c2b::instance(), c2b::mainWidget(), showLog(), and bibParser::statusMessage().

◆ ~c2bBibParser()

c2bBibParser::~c2bBibParser ( )

Definition at line 50 of file c2bBibParser.cpp.

Member Function Documentation

◆ addField()

void c2bBibParser::addField ( const QString &  name,
c2bLineEdit editor 
)
inline

Definition at line 40 of file c2bBibParser.h.

References _field_editors.

Referenced by cb2Bib::setWidgetMapping().

◆ addTypes()

void c2bBibParser::addTypes ( QComboBox *  types)
inline

Definition at line 44 of file c2bBibParser.h.

References _type_editor.

Referenced by cb2Bib::setWidgetMapping().

◆ bibModified

void c2bBibParser::bibModified ( bool  modified)
signal

◆ checkRegExpFile()

void c2bBibParser::checkRegExpFile ( const QString &  fn)
overrideprivatevirtual

Reimplemented from bibParser.

Definition at line 175 of file c2bBibParser.cpp.

References _c2b_mainP.

◆ clearCurrentReference()

◆ currentReferenceUpdated()

void c2bBibParser::currentReferenceUpdated ( )
overrideprivatevirtual

◆ field()

QString c2bBibParser::field ( const QString &  name) const
inline

◆ referenceEdited

void c2bBibParser::referenceEdited ( const QString &  value)
privateslot

◆ setCiteID()

void c2bBibParser::setCiteID ( )
overrideprivatevirtual

◆ setDocumentFilename

void c2bBibParser::setDocumentFilename ( )
signal

Referenced by referenceEdited().

◆ setField [1/3]

void c2bBibParser::setField ( )
privateslot

Definition at line 122 of file c2bBibParser.cpp.

References _field_editors, and bibParser::parse().

Referenced by setWidgetMapping().

◆ setField() [2/3]

void c2bBibParser::setField ( const QString &  name,
const QString &  value 
)
inlineoverridevirtual

Reimplemented from bibParser.

Definition at line 52 of file c2bBibParser.h.

References _field_editors, and bibParser::parse().

Referenced by cb2Bib::addAuthors(), cb2Bib::addEditors(), and cb2Bib::readField().

◆ setField() [3/3]

void c2bBibParser::setField ( const QString &  name,
const QString &  value,
const QString &  init_value 
)
inline

Definition at line 56 of file c2bBibParser.h.

References _field_editors, and bibParser::parse().

◆ setReferenceType()

void c2bBibParser::setReferenceType ( const QString &  type)
overrideprivatevirtual

Reimplemented from bibParser.

Definition at line 132 of file c2bBibParser.cpp.

References _type_editor.

Referenced by currentReferenceUpdated().

◆ setWidgetMapping()

◆ showLog

void c2bBibParser::showLog ( const QString &  log)
privateslot

Definition at line 167 of file c2bBibParser.cpp.

References _c2b_mainP, and _preparser_logP.

Referenced by c2bBibParser().

Member Data Documentation

◆ _bp_updates_gui

bool c2bBibParser::_bp_updates_gui
private

◆ _c2b_mainP

QWidget* c2bBibParser::_c2b_mainP
private

Definition at line 74 of file c2bBibParser.h.

Referenced by c2bBibParser(), checkRegExpFile(), and showLog().

◆ _field_editors

QHash<QString, c2bLineEdit*> c2bBibParser::_field_editors
private

◆ _preparser_logP

QPointer<c2bBibPreparserLog> c2bBibParser::_preparser_logP
private

Definition at line 73 of file c2bBibParser.h.

Referenced by showLog().

◆ _type_editor

QComboBox* c2bBibParser::_type_editor
private

Definition at line 71 of file c2bBibParser.h.

Referenced by addTypes(), clearCurrentReference(), setReferenceType(), and setWidgetMapping().


The documentation for this class was generated from the following files: