File: c2bReferenceList.h

package info (click to toggle)
cb2bib 1.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,368 kB
  • sloc: cpp: 24,179; sh: 481; makefile: 16
file content (105 lines) | stat: -rw-r--r-- 2,583 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/***************************************************************************
 *   Copyright (C) 2004-2015 by Pere Constans
 *   constans@molspaces.com
 *   cb2Bib version 1.9.2. Licensed under the GNU GPL version 3.
 *   See the LICENSE file that comes with this distribution.
 ***************************************************************************/
#ifndef C2BREFERENCELIST_H
#define C2BREFERENCELIST_H

#include "ui_c2bReferenceList.h"

#include <QWidget>


class bibSearcher;
class c2bCoreCiter;
class c2bRLWebSearchSettings;
class c2bSettings;
class c2bTextBrowser;
class c2bTextEdit;


class c2bReferenceList : public QWidget
{
    Q_OBJECT

public:
    c2bReferenceList(c2bTextEdit* ed, c2bTextBrowser* br, QWidget* parentw = 0);
    ~c2bReferenceList();

    QAction* citeEntryAction;
    QAction* clearSelectionsAction;
    QAction* openAuthorsWebSearchAction;
    QAction* openDOIAction;
    QAction* openFileAction;
    QAction* openTextLocalSearchAction;
    QAction* openTextWebSearchAction;
    QAction* openTitleWebSearchAction;
    QAction* openUrlAction;
    QAction* refreshListAction;
    QAction* webSearchSettingsAction;
    QStringList selectedKeys() const;
    void goToReference(const QString& id);
    void goToReference(const int position);


public slots:
    void loadList(const QString& txt, bibSearcher* searcher = 0);
    void refreshList();
    void setLyXPipe();


signals:
    void hasSelectedItems(bool);
    void openFile(const QString& fn);


protected slots:
    void citeEntry();
    void clearSelections();
    void goToReference(QTreeWidgetItem* ref);
    void itemSelectionChanged();
    void openAuthorWebSearch();
    void openDOI();
    void openFile();
    void openLink(const QUrl& ln);
    void openTextLocalSearch();
    void openTextWebSearch();
    void openTitleWebSearch();
    void openUrl();
    void scrollToReference(const QString& id);
    void webSearchSettings();


private:
    QList<int> _positionList;
    QString _bib_item_html;
    QString _filter_mode;
    QString _references_html;
    QStringList _doiList;
    QStringList _fileList;
    QStringList _urlList;
    Ui::c2bReferenceList ui;
    c2bCoreCiter* _citerP;
    c2bSettings* _settingsP;
    c2bTextBrowser* _browserP;
    c2bTextEdit* _editorP;
    int _author_index;
    int _id_index;
    int _journal_index;
    int _key_index;
    int _title_index;
    int _year_index;
    void setupFilterBar();


private slots:
    void blockFilterSignals();
    void filterList();
    void keepFilterPattern();
    void setFilterMode(QAction* mode);

};

#endif