summaryrefslogtreecommitdiff
path: root/src/frontend/mainindex/cmainindex.h
blob: b5d217d57f815a88162bbcee423cc86d6fcc762d (plain)
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
/*********
*
* This file is part of BibleTime's source code, http://www.bibletime.info/.
*
* Copyright 1999-2008 by the BibleTime developers.
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
*
**********/

#ifndef CMAININDEX_H
#define CMAININDEX_H

#include "frontend/displaywindow/cdisplaywindow.h"

#include <QTabWidget>
#include <QFocusEvent>

class CBookmarkIndex;
class CBookshelfIndex;
class CSwordModuleInfo;

/** The class which manages all bookmarks and modules. The modules are put into own, fixed subfolders sorted by language.
  * @author The BibleTime team
  */
class CMainIndex : public QTabWidget {
	Q_OBJECT

public:
	CMainIndex(QWidget *parent);
	virtual ~CMainIndex() {};

	//void reloadSword();

	CBookshelfIndex* bookshelfIndex() {return m_bookshelfPage;}

signals:
	/**
	* Is emitted when a module should be opened,
	*/
	void createReadDisplayWindow( QList<CSwordModuleInfo*>, const QString& );
	/**
	 * Is emitted when a write window should be created.
	 */
	void createWriteDisplayWindow( CSwordModuleInfo*, const QString&, const  CDisplayWindow::WriteWindowType& );

protected:
	/** QWidget method - move focus to the active page widget */
	virtual void focusInEvent(QFocusEvent*) {currentWidget()->setFocus();}

private:

	CBookmarkIndex* m_bookmarksPage;
	CBookshelfIndex* m_bookshelfPage;

};

#endif