[bt-devel] Missing file(s) ?

Torsten Uhlmann bt-devel@crosswire.org
Fri, 18 Feb 2000 09:19:02 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_001D_01BF79F1.324364E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: base64

VXBzLCBwcm9iYWJseSwgc29ycnkNClRoYXQgaGFwcGVucyBpZiBvbmUgd29ya3MgYSBsb25nIHRp
bWUgaW4gaGlzIG93biBzZWxsYXIgYW5kIHRoZW4gdHJpZXMNCnRvIHJlbWVtYmVyIHRoZSBjaGFu
Z2VzIGhlIG1hZGUuDQoNCkkgc2VudCB0aGUgZmlsZXMgaGVyZSBzaW5jZSBJIGRvbid0IGhhdmUg
YWNjZXNzIHRvIENWUyB1bnRpbCB0b21vcnJvdy4NCkJ1dCBJIHRoaW5rIGl0J3MgYmVzdCB3aGVu
IEkgYWRkIHRoZSBmaWxlcywgc28gd2Uga25vdyB3aG8gaXMgZG9pbmcgd2hhdA0KKGlmIGhlIGRv
ZXNuJ3QgZm9yZ2V0IDopDQoNCi0tLS0tIE9yaWdpbmFsIE1lc3NhZ2UgLS0tLS0gDQpGcm9tOiBK
b2FjaGltIEFuc29yZyA8Sm9ja2VsMTIzQGdteC5kZT4NClRvOiA8YnQtZGV2ZWxAY3Jvc3N3aXJl
Lm9yZz4NClNlbnQ6IEZyaWRheSwgRmVicnVhcnkgMTgsIDIwMDAgMTI6MjQgQU0NClN1YmplY3Q6
IFtidC1kZXZlbF0gTWlzc2luZyBmaWxlKHMpID8NCg0KDQo+IEhpIQ0KPiANCj4gVG9ydHNlbiwg
aXMgaXQgcG9zc2libGUgdGhhdCB5b3UgZm9yZ290IHRvIGFkZCBjc2VhcmNoZGlhbG9ncmVzdWx0
dmlldy4qIHRvIHRoZQ0KPiBDVlMgPw0KPiANCj4gVGhhbmtzIQ0KPiAgLS0gSm9hY2hpbQ0KPiBC
aWJsZVRpbWUgLSB0aGUgYmlibGUgc3R1ZHkgcHJvZ3JhbSBmb3IgS0RFDQo+IGh0dHA6Ly93d3cu
YmlibGV0aW1lLmRlLw0KPiBpbmZvQGJpYmxldGltZS5kZQ0K

------=_NextPart_000_001D_01BF79F1.324364E0
Content-Type: application/octet-stream;
	name="csearchdialogresultitem.cpp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="csearchdialogresultitem.cpp"

/************************************************************************=
***=0A=
                   csearchdialogresultitem.cpp  -  description=0A=
                             -------------------=0A=
    begin                : Tue Jan 25 2000=0A=
    copyright            : (C) 2000 by The BibleTime Team=0A=
    email                : Info@bibletime.de=0A=
 =
*************************************************************************=
**/=0A=
=0A=
/************************************************************************=
***=0A=
 *                                                                       =
  *=0A=
 *   This program is free software; you can redistribute it and/or =
modify  *=0A=
 *   it under the terms of the GNU General Public License as published =
by  *=0A=
 *   the Free Software Foundation; either version 2 of the License, or   =
  *=0A=
 *   (at your option) any later version.                                 =
  *=0A=
 *                                                                       =
  *=0A=
 =
*************************************************************************=
**/=0A=
=0A=
#include "csearchdialogresultitem.h"=0A=
#include "csearchdialogresultview.h"=0A=
#include "../../backend/csearchresultitem.h"=0A=
#include "../../backend/cmoduleinfo.h"=0A=
=0A=
#include <qpixmap.h>=0A=
#include <kglobal.h>=0A=
#include <kiconloader.h>=0A=
=0A=
=0A=
CSearchDialogResultItem::CSearchDialogResultItem(CSearchDialogResultItem =
*parent, const char *name,CSearchResultItem *resultItem, ItemType type ) =
: QListViewItem((QListViewItem*)parent) =0A=
{=0A=
	ASSERT(resultItem);=0A=
	this->type =3D type;	=0A=
	this->resultItem =3D resultItem;=0A=
	this->module =3D 0;=0A=
	setText(0, resultItem->getKey()->getKey());=0A=
	setText(1, getPreviewText(resultItem->getData()));=0A=
}=0A=
=0A=
CSearchDialogResultItem::CSearchDialogResultItem(CSearchDialogResultItem =
*parent, CSearchDialogResultItem *after, const char =
*name,CSearchResultItem *resultItem, ItemType type ) : =
QListViewItem((QListViewItem*)parent, (QListViewItem*)after) =0A=
{=0A=
	ASSERT(resultItem);=0A=
	this->type =3D type;	=0A=
	this->resultItem =3D resultItem;=0A=
	this->module =3D 0;=0A=
	setText(0, resultItem->getKey()->getKey());=0A=
	setText(1, getPreviewText(resultItem->getData()));=0A=
}=0A=
=0A=
=0A=
CSearchDialogResultItem::CSearchDialogResultItem(CSearchDialogResultView =
*parent, const char *name, QString caption, CModuleInfo *module) : =
QListViewItem((QListView*)parent) =0A=
{=0A=
	this->type =3D Module;	=0A=
	this->resultItem =3D 0;=0A=
	this->module =3D module;=0A=
	this->setText(0,caption);=0A=
	this->setPixmap(0,KGlobal::iconLoader()->loadIcon("folder", =
KIconLoader::Small));=0A=
};=0A=
=0A=
CSearchDialogResultItem::~CSearchDialogResultItem()=0A=
{=0A=
}=0A=
=0A=
QString CSearchDialogResultItem::getPreviewText(const QString &text)=0A=
{=0A=
	QString result =3D text.copy();=0A=
	if (result.length() > 100)=0A=
	{=0A=
		result =3D result.left(96) + (QString)" ...";=0A=
	}=0A=
	return result;=0A=
}=0A=
=0A=
/** Returns the type of this item */=0A=
CSearchDialogResultItem::ItemType CSearchDialogResultItem::getType(){=0A=
	return type;=0A=
}=0A=
=0A=
/** Shows child or not */=0A=
void CSearchDialogResultItem::setOpen( bool open ){=0A=
	QListViewItem::setOpen(open);=0A=
	=0A=
=0A=
	if (type =3D=3D Module) {=0A=
  	if (open)=0A=
			setPixmap(0,KGlobal::iconLoader()->loadIcon("folder_open", =
KIconLoader::Small));=0A=
		else=0A=
			setPixmap(0,KGlobal::iconLoader()->loadIcon("folder", =
KIconLoader::Small));=0A=
	}=0A=
}=0A=

------=_NextPart_000_001D_01BF79F1.324364E0
Content-Type: application/octet-stream;
	name="csearchdialogresultitem.h"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="csearchdialogresultitem.h"

/************************************************************************=
***=0A=
                     csearchdialogresultitem.h  -  description=0A=
                             -------------------=0A=
    begin                : Tue Jan 25 2000=0A=
    copyright            : (C) 2000 by The BibleTime Team=0A=
    email                : Info@bibletime.de=0A=
 =
*************************************************************************=
**/=0A=
=0A=
/************************************************************************=
***=0A=
 *                                                                       =
  *=0A=
 *   This program is free software; you can redistribute it and/or =
modify  *=0A=
 *   it under the terms of the GNU General Public License as published =
by  *=0A=
 *   the Free Software Foundation; either version 2 of the License, or   =
  *=0A=
 *   (at your option) any later version.                                 =
  *=0A=
 *                                                                       =
  *=0A=
 =
*************************************************************************=
**/=0A=
=0A=
#ifndef CSEARCHDIALOGRESULTITEM_H=0A=
#define CSEARCHDIALOGRESULTITEM_H=0A=
=0A=
#include "../../backend/cbackenddefs.h"=0A=
#include "../../structdef.h"=0A=
=0A=
//KDE includes=0A=
#include <qlistview.h>=0A=
#include <klistview.h>=0A=
=0A=
class CModuleInfo;=0A=
class CSearchResultItem;=0A=
class CSearchDialogResultView;=0A=
=0A=
/**An item which represents one found result during the last search=0A=
  *@author The BibleTime Team=0A=
  */=0A=
=0A=
class CSearchDialogResultItem : public QListViewItem  {=0A=
=0A=
	friend class CSearchDialogResult;=0A=
	friend class CSearchDialogResultView;=0A=
=0A=
public:=0A=
=0A=
	enum ItemType	{ Module, Key };=0A=
=0A=
	CSearchDialogResultItem( CSearchDialogResultItem *parent, const char =
*name, CSearchResultItem *resultItem, ItemType Type =3D Module );=0A=
	CSearchDialogResultItem( CSearchDialogResultItem *parent, =
CSearchDialogResultItem *after, const char *name, CSearchResultItem =
*resultItem, ItemType Type =3D Module );=0A=
=0A=
	CSearchDialogResultItem( CSearchDialogResultView *parent, const char =
*name, QString caption, CModuleInfo *module);=0A=
=0A=
	~CSearchDialogResultItem();=0A=
=0A=
protected: // Protected methods=0A=
	/** Returns the CModuleInfo obkject for this tree-item. */=0A=
	CSearchResultItem	*getResultItem() { return resultItem; };=0A=
	CModuleInfo			*getModule() { return module; };=0A=
	ItemType 			getType();=0A=
	void 					setOpen( bool );=0A=
	QString				getPreviewText(const QString&);=0A=
	=0A=
	CSearchResultItem		*resultItem;=0A=
	CModuleInfo				*module;=0A=
	ItemType					type;=0A=
};=0A=
=0A=
#endif
------=_NextPart_000_001D_01BF79F1.324364E0
Content-Type: application/octet-stream;
	name="csearchdialogresultview.cpp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="csearchdialogresultview.cpp"

/************************************************************************=
***=0A=
                   csearchdialogresultview.cpp  -  description=0A=
                             -------------------=0A=
    begin                : Wed Jan 19 2000=0A=
    copyright            : (C) 2000 by The BibleTime Team=0A=
    email                : Info@bibletime.de=0A=
 =
*************************************************************************=
**/=0A=
=0A=
/************************************************************************=
***=0A=
 *                                                                       =
  *=0A=
 *   This program is free software; you can redistribute it and/or =
modify  *=0A=
 *   it under the terms of the GNU General Public License as published =
by  *=0A=
 *   the Free Software Foundation; either version 2 of the License, or   =
  *=0A=
 *   (at your option) any later version.                                 =
  *=0A=
 *                                                                       =
  *=0A=
 =
*************************************************************************=
**/=0A=
=0A=
//own includes=0A=
#include "csearchdialogresultview.h"=0A=
#include "csearchdialogresultitem.h"=0A=
#include "../../backend/csearchresultitem.h"=0A=
#include "../../structdef.h"=0A=
#include "../../ressource.h"=0A=
=0A=
//QT includes=0A=
#include <qheader.h>=0A=
#include <qevent.h>=0A=
#include <qmessagebox.h>=0A=
#include <qdragobject.h>=0A=
=0A=
//KDE includes=0A=
#include <klocale.h>=0A=
#include <kstddirs.h>=0A=
#include <kiconloader.h>=0A=
#include <kconfig.h>=0A=
#include <kapp.h>=0A=
#include <kpopmenu.h>=0A=
=0A=
CSearchDialogResultView::CSearchDialogResultView(QWidget *parent, const =
char *name) : QListView(parent) =0A=
{=0A=
	currentItem =3D 0;=0A=
	initView();=0A=
	initConnections();=0A=
}=0A=
=0A=
CSearchDialogResultView::~CSearchDialogResultView()=0A=
{=0A=
}=0A=
=0A=
/** Initializes the tree of this ResultView */=0A=
void CSearchDialogResultView::setupTree()=0A=
{=0A=
	CSearchResultItem			*resultItem =3D 0;=0A=
	CModuleInfo					*oldModulePtr =3D 0;=0A=
	CModuleInfo					*tmpPtr =3D 0;=0A=
	=0A=
	CSearchDialogResultItem	*moduleGroup =3D 0;=0A=
	CSearchDialogResultItem	*item =3D 0;=0A=
	=0A=
	// build the first module group=0A=
	resultItem =3D searchResult->first();=0A=
	if (resultItem)=0A=
	{=0A=
		tmpPtr =3D resultItem->getModule();=0A=
		if (!tmpPtr) debug("module is NULL!");=0A=
		moduleGroup =3D new CSearchDialogResultItem(this, "moduleGroup", =
tmpPtr->getModuleDescription(), tmpPtr);=0A=
		oldModulePtr =3D resultItem->getModule();=0A=
	}=0A=
	=0A=
	for(resultItem =3D searchResult->first(); resultItem !=3D0; resultItem =
=3D searchResult->next())=0A=
	{=0A=
		if (oldModulePtr !=3D resultItem->getModule())=0A=
		{=0A=
			moduleGroup =3D new CSearchDialogResultItem(this, "moduleGroup", =
resultItem->getModule()->getModuleDescription(), =
resultItem->getModule());=0A=
		}=0A=
		oldModulePtr =3D resultItem->getModule();=0A=
		item =3D new CSearchDialogResultItem(moduleGroup, item, "key", =
resultItem, CSearchDialogResultItem::Key);=0A=
	}=0A=
//	setOpen(moduleGroup, true);=0A=
}=0A=
=0A=
/** Initializes the connections of this class */=0A=
void CSearchDialogResultView::initConnections()=0A=
{=0A=
//	connect(popupMenu, SIGNAL(aboutToShow()),=0A=
//		this, SLOT(popupAboutToShow()));=0A=
=0A=
}=0A=
=0A=
/** Initializes this widget */=0A=
void CSearchDialogResultView::initView(){=0A=
//	setSelectionMode(Extended)=0A=
	setFocusPolicy(QWidget::WheelFocus);=0A=
	setBackgroundMode(QWidget::PaletteBackground);=0A=
	setFontPropagation(QWidget::SameFont);=0A=
	setPalettePropagation(QWidget::SameFont);=0A=
	setFrameStyle( 54 );=0A=
	setLineWidth( 2 );=0A=
	setMidLineWidth( 0 );=0A=
	//QFrame::setMargin( 0 );=0A=
	setResizePolicy( QScrollView::Manual );=0A=
	setVScrollBarMode( QScrollView::Auto );=0A=
	setHScrollBarMode( QScrollView::Auto );=0A=
	setTreeStepSize( 20 );=0A=
	setMultiSelection( false );=0A=
	setAllColumnsShowFocus( true );=0A=
	setItemMargin( 2 );=0A=
	setRootIsDecorated( true );=0A=
=0A=
	addColumn( i18n( "Found keys" ), -1 );=0A=
	addColumn( i18n( "Passage" ), -1 );=0A=
	setColumnWidthMode( 0, QListView::Maximum );=0A=
	setColumnAlignment( 0, 1 );=0A=
	setSorting( -1 );=0A=
	=0A=
//	header()->hide();=0A=
	=0A=
	popupMenu =3D new KPopupMenu(this);=0A=
	popupMenu->insertTitle(i18n("Search Result Viewer"));=0A=
//	popupMenu->insertItem(i18n("Create new item"),this, =
SLOT(createItem()),0,ID_CREATE_ITEM);=0A=
//	popupMenu->insertItem(i18n("Change this =
item"),this,SLOT(changeItem()),0,ID_CHANGE_ITEM);=0A=
//	popupMenu->insertItem(i18n("Delete selected items"),this, =
SLOT(deleteSelectedItems()),0,ID_DELETE_ITEMS);=0A=
//	popupMenu->insertSeparator();=0A=
//	popupMenu->insertItem(i18n("Search Module"),this, =
SLOT(searchSelectedModules()),0,ID_SEARCH_MODULES);=0A=
//	popupMenu->insertItem(i18n("Show info"),this, =
SLOT(showAbout()),0,ID_SHOW_ABOUT);=0A=
}=0A=
=0A=
=0A=
/** Is called before the menu is shown */=0A=
void CSearchDialogResultView::popupAboutToShow(){=0A=
//	if (currentItem && currentItem->getType() =3D=3D Group) {=0A=
//		popupMenu->setItemEnabled(ID_SEARCH_MODULES, false);=0A=
//		popupMenu->setItemEnabled(ID_SHOW_ABOUT, false);=0A=
//	}=0A=
//	else=0A=
//	if (currentItem && currentItem->getType() !=3D Group) {=0A=
//		popupMenu->setItemEnabled(ID_SEARCH_MODULES, true);	=0A=
//		popupMenu->setItemEnabled(ID_SHOW_ABOUT, true);		=0A=
//	}=0A=
}=0A=
=0A=
/**  */=0A=
void CSearchDialogResultView::viewportMousePressEvent(QMouseEvent *e){=0A=
	QListView::viewportMousePressEvent(e);=0A=
=0A=
	currentItem =3D (CSearchDialogResultItem*)itemAt(e->pos());=0A=
=0A=
	if (!currentItem)=0A=
	{=0A=
		debug("item is NULL");=0A=
		return;=0A=
	}=0A=
	=0A=
	if (currentItem && e->button() =3D=3D LeftButton) {=0A=
		if (currentItem->getType() =3D=3D CSearchDialogResultItem::Key) =0A=
		{=0A=
		  	debug("key preview");=0A=
			emit keySelected( currentItem->getResultItem() );=0A=
			return;=0A=
		}=0A=
		if (currentItem->getType() =3D=3D CSearchDialogResultItem::Module)=0A=
		{=0A=
		  	debug("module selected");=0A=
			emit moduleSelected(currentItem->getModule());=0A=
			return;=0A=
		}=0A=
	}=0A=
	else if (e->button() =3D=3D RightButton) {=0A=
		popupMenu->popup(e->globalPos());=0A=
	}=0A=
}=0A=
=0A=

------=_NextPart_000_001D_01BF79F1.324364E0
Content-Type: application/octet-stream;
	name="csearchdialogscopeview.h"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="csearchdialogscopeview.h"

/************************************************************************=
***=0A=
                   csearchdialogscopeview.h  -  description=0A=
                             -------------------=0A=
    begin                : Wed Jan 19 2000=0A=
    copyright            : (C) 2000 by The BibleTime Team=0A=
    email                : Info@bibletime.de=0A=
 =
*************************************************************************=
**/=0A=
=0A=
/************************************************************************=
***=0A=
 *                                                                       =
  *=0A=
 *   This program is free software; you can redistribute it and/or =
modify  *=0A=
 *   it under the terms of the GNU General Public License as published =
by  *=0A=
 *   the Free Software Foundation; either version 2 of the License, or   =
  *=0A=
 *   (at your option) any later version.                                 =
  *=0A=
 *                                                                       =
  *=0A=
 =
*************************************************************************=
**/=0A=
=0A=
#ifndef CSEARCHDIALOGSCOPETVIEW_H=0A=
#define CSEARCHDIALOGSCOPETVIEW_H=0A=
=0A=
#include "../../backend/cmoduleinfo.h"=0A=
#include "../../backend/cbackenddefs.h"=0A=
=0A=
//QT includes=0A=
#include <qwidget.h>=0A=
=0A=
//KDE includes=0A=
#include <qlistview.h>=0A=
=0A=
class KPopupMenu;=0A=
class KConfig;=0A=
class CSearchDialogScopeItem;=0A=
=0A=
/**	handles the search result=0A=
  *	@author The BibleTime Team=0A=
  */=0A=
class CSearchDialogScopeView : public QListView  {=0A=
=0A=
   Q_OBJECT=0A=
   =0A=
public: =0A=
	CSearchDialogScopeView(QWidget *parent=3D0, const char *name=3D0);=0A=
	~CSearchDialogScopeView();=0A=
	/** set the list of modules we represent */=0A=
	void 			setModuleList(ListCModuleInfo *list) { moduleList =3D list; =
setupTree(); };=0A=
	/** Initializes the tree of this CGroupmanager */=0A=
	void					setupTree();=0A=
	void					initView();=0A=
	QString				getLowerBound();=0A=
	QString				getUpperBound();=0A=
	SearchScopeStruct	*getSearchScope();=0A=
	void					setFirstBound(CModuleInfo*);=0A=
	void					setNextBound();=0A=
	bool					isCurrentBound();=0A=
	void					addBound(SearchScopeStruct*);=0A=
	=0A=
public slots:=0A=
	/** deletes the current bound */=0A=
	void					slotDeleteBound();=0A=
=0A=
protected slots: // Protected slots=0A=
	/**Is called before the menu is shown*/=0A=
	void 					popupAboutToShow();=0A=
=0A=
signals: // Signals=0A=
	/** Is emitted when the root the tree was selected. */=0A=
	void					rootSelected();=0A=
	/** Is emitted when a module in the tree was selected. */=0A=
	void moduleSelected(CModuleInfo*);=0A=
	/** Is emitted when a scope in the tree was selected. */=0A=
	void scopeSelected(SearchScopeStruct*);=0A=
=0A=
protected:=0A=
	/* Initializes the connections of this class*/=0A=
	virtual void initConnections();=0A=
	virtual void viewportMousePressEvent(QMouseEvent *e);=0A=
 =0A=
	/** The popp menu which conatins the options after RMB on an item */=0A=
	KPopupMenu					*popupMenu;=0A=
	/** The selected item */=0A=
	CSearchDialogScopeItem	*currentItem;=0A=
	CSearchDialogScopeItem	*boundsItem;=0A=
	CModuleInfo					*currentScopeModule;=0A=
	ListCModuleInfo				*moduleList;=0A=
=0A=
};=0A=
=0A=
#endif
------=_NextPart_000_001D_01BF79F1.324364E0--