[go: up one dir, main page]

Menu

[r301]: / librarysearch.h  Maximize  Restore  History

Download this file

102 lines (84 with data), 3.1 kB

  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
/* Marcion
Copyright (C) 2009 - 2011 Milan Konvicka
This program 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; version 2 of the License.
This program 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 this program */
#ifndef LIBRARYSEARCH_H
#define LIBRARYSEARCH_H
#include "ui_librarysearch.h"
#include <QMenu>
#include <QProcess>
#include "ctranslit.h"
#include "messages.h"
#include "settings.h"
#include "searchcriteria2.h"
#include "libsearchresult.h"
#include "librarywidget.h"
#include "libsearchbase.h"
#include "mlibsearchtitle.h"
#define SPEC_INDEX_COUNT 2
class CLibrarySearch : public QWidget, public CLibSearchBase, private Ui::CLibrarySearch {
Q_OBJECT
Q_DISABLE_COPY(CLibrarySearch)
public:
friend class MainWnd;
explicit CLibrarySearch(CMessages * const messages,
CLibraryWidget * const libw,
MLibSearchTitle & title,
QWidget *parent = 0);
void searchCoptic(QString const & text);
QWidget & dialog(){return c_d;}
void event_Query();
void event_Refresh();
void event_stateChanged();
private slots:
void on_txtSwInput_returnPressed();
void on_btSwPar_clicked();
void on_btSwPhrase_clicked();
void on_btSwQuest_clicked();
void on_btSwAst_clicked();
void on_btSwNear_clicked();
void on_btSwNot_clicked();
void on_btSwOr_clicked();
void on_btSwAnd_clicked();
void on_btAction_clicked();
void on_treeColl_itemChanged(QTreeWidgetItem* item, int column);
void on_treeColl_customContextMenuRequested(QPoint pos);
void on_tabColl_currentChanged(int index);
void on_btRmNW_clicked();
void on_inputText_query();
//void on_cmbLang_currentIndexChanged(int index);
void on_btEdit_clicked();
void on_cmbScriptLang_currentIndexChanged(int index);
void indexChangedSlot(bool);
void settings_fontChanged(CTranslit::Script, QFont);
void slot_requestTitle(int);
//void slot_searchInLibrary(QString);
private:
CMessages * const messages;
CLibraryWidget * const libw;
MLibSearchTitle & title;
void init();
bool is_initialized;
QString where_collection(char *,QString &,QString &) const;
void collectCheckedHtmlLibItems(QList<QTreeWidgetItem*> &,QTreeWidgetItem*);
QList<QTreeWidgetItem> coll;
CSearchCriteria2 c_d;
void query();
void queryHtml();
void readBooks(QTreeWidgetItem *);
void removeBooks(QTreeWidgetItem *);
void checkAllBooks(QTreeWidgetItem *);
//QString makeLinks(QString const &) const;
QTreeWidget * htmlTree(){return treeHtmlLib;}
QMenu pmenu;
QAction * a_readbooks,*a_hidebooks;
bool disable_itch,bt_action;
};
#endif // LIBRARYSEARCH_H