diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-16 16:06:06 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-16 16:06:06 -0600 |
commit | 34784ccef6ac9dd33b4460560c68e5422a73560a (patch) | |
tree | a206e2a4050c2861ce0706a8fd3542ff29e234e1 /libtdeedu/tdeeduui | |
parent | 89354dfc31a795bae9415f79bb07b32be643e4f4 (diff) | |
download | tdeedu-34784ccef6ac9dd33b4460560c68e5422a73560a.tar.gz tdeedu-34784ccef6ac9dd33b4460560c68e5422a73560a.zip |
Finish rename from prior commit
Diffstat (limited to 'libtdeedu/tdeeduui')
-rw-r--r-- | libtdeedu/tdeeduui/Makefile.am | 16 | ||||
-rw-r--r-- | libtdeedu/tdeeduui/kedusimpleentrydlg.cpp | 3 | ||||
-rw-r--r-- | libtdeedu/tdeeduui/kedusimpleentrydlg.h | 20 | ||||
-rw-r--r-- | libtdeedu/tdeeduui/kedusimpleentrydlgForm.ui | 110 | ||||
-rw-r--r-- | libtdeedu/tdeeduui/tdeeduglossary.cpp | 406 | ||||
-rw-r--r-- | libtdeedu/tdeeduui/tdeeduglossary.h | 293 | ||||
-rw-r--r-- | libtdeedu/tdeeduui/tdeeduui.kdevprj | 92 | ||||
-rw-r--r-- | libtdeedu/tdeeduui/tests/Makefile.am | 11 | ||||
-rw-r--r-- | libtdeedu/tdeeduui/tests/entrydialogs.cpp | 6 |
9 files changed, 957 insertions, 0 deletions
diff --git a/libtdeedu/tdeeduui/Makefile.am b/libtdeedu/tdeeduui/Makefile.am new file mode 100644 index 00000000..9ebedbab --- /dev/null +++ b/libtdeedu/tdeeduui/Makefile.am @@ -0,0 +1,16 @@ +INCLUDES= $(all_includes) +SUBDIRS = . tests + +lib_LTLIBRARIES = libtdeeduui.la + +libtdeeduui_la_SOURCES = \ + kedusimpleentrydlg.cpp kedusimpleentrydlgForm.ui tdeeduglossary.cpp + +libtdeeduuiincludedir = $(includedir)/libtdeedu +libtdeeduuiinclude_HEADERS = tdeeduglossary.h + +libtdeeduui_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 3:5:0 +libtdeeduui_la_LIBADD = $(LIB_TDECORE) $(LIB_KIO) $(LIB_TDEUI) $(LIB_KHTML) + +METASOURCES = AUTO + diff --git a/libtdeedu/tdeeduui/kedusimpleentrydlg.cpp b/libtdeedu/tdeeduui/kedusimpleentrydlg.cpp new file mode 100644 index 00000000..89f8412c --- /dev/null +++ b/libtdeedu/tdeeduui/kedusimpleentrydlg.cpp @@ -0,0 +1,3 @@ +#include "kedusimpleentrydlg.h" + +#include "kedusimpleentrydlg.moc" diff --git a/libtdeedu/tdeeduui/kedusimpleentrydlg.h b/libtdeedu/tdeeduui/kedusimpleentrydlg.h new file mode 100644 index 00000000..d84fe00c --- /dev/null +++ b/libtdeedu/tdeeduui/kedusimpleentrydlg.h @@ -0,0 +1,20 @@ +#ifndef kedusimpleentrydlg_included +#define kedusimpleentrydlg_included + + +#include "kedusimpleentrydlgForm.h" + +class KEduSimpleEntryDlg : public KEduSimpleEntryDlgForm +{ + Q_OBJECT + TQ_OBJECT + + public: + + + + + +}; + +#endif // kedusimpleentrydlg_included diff --git a/libtdeedu/tdeeduui/kedusimpleentrydlgForm.ui b/libtdeedu/tdeeduui/kedusimpleentrydlgForm.ui new file mode 100644 index 00000000..45ab6c3f --- /dev/null +++ b/libtdeedu/tdeeduui/kedusimpleentrydlgForm.ui @@ -0,0 +1,110 @@ +<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> +<class>KEduSimpleEntryDlgForm</class> +<widget class="TQDialog"> + <property name="name"> + <cstring>Simple_entry_dialog</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>592</width> + <height>480</height> + </rect> + </property> + <property name="caption"> + <string>Simple Entry Dialog</string> + </property> + <widget class="TQLineEdit"> + <property name="name"> + <cstring>e_original</cstring> + </property> + <property name="geometry"> + <rect> + <x>40</x> + <y>80</y> + <width>511</width> + <height>40</height> + </rect> + </property> + </widget> + <widget class="TQLineEdit"> + <property name="name"> + <cstring>e_translation</cstring> + </property> + <property name="geometry"> + <rect> + <x>40</x> + <y>180</y> + <width>511</width> + <height>40</height> + </rect> + </property> + </widget> + <widget class="TQPushButton"> + <property name="name"> + <cstring>PushButton1</cstring> + </property> + <property name="geometry"> + <rect> + <x>50</x> + <y>360</y> + <width>91</width> + <height>41</height> + </rect> + </property> + <property name="text"> + <string>&OK</string> + </property> + </widget> + <widget class="TQPushButton"> + <property name="name"> + <cstring>PushButton1_2</cstring> + </property> + <property name="geometry"> + <rect> + <x>460</x> + <y>360</y> + <width>91</width> + <height>41</height> + </rect> + </property> + <property name="text"> + <string>C&ancel</string> + </property> + </widget> + <widget class="TQLabel"> + <property name="name"> + <cstring>TextLabel1</cstring> + </property> + <property name="geometry"> + <rect> + <x>40</x> + <y>50</y> + <width>171</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Original:</string> + </property> + </widget> + <widget class="TQLabel"> + <property name="name"> + <cstring>TextLabel1_2</cstring> + </property> + <property name="geometry"> + <rect> + <x>40</x> + <y>150</y> + <width>171</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Translation:</string> + </property> + </widget> +</widget> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/libtdeedu/tdeeduui/tdeeduglossary.cpp b/libtdeedu/tdeeduui/tdeeduglossary.cpp new file mode 100644 index 00000000..1e405abf --- /dev/null +++ b/libtdeedu/tdeeduui/tdeeduglossary.cpp @@ -0,0 +1,406 @@ +/*************************************************************************** + * * + * 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; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "tdeeduglossary.h" + +#include <kdebug.h> +#include <klocale.h> +#include <kiconloader.h> +#include <khtml_part.h> +#include <khtmlview.h> +#include <kglobal.h> +#include <klistview.h> +#include <klistviewsearchline.h> +#include <kstandarddirs.h> +#include <kactioncollection.h> + +#include <tqfile.h> +#include <tqlabel.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqsplitter.h> +#include <tqstringlist.h> +#include <tqtoolbutton.h> + +Glossary::Glossary() +{ + // setting a generic name for a new glossary + m_name = i18n( "Glossary" ); +} + +Glossary::~Glossary() +{ +} + +bool Glossary::loadLayout( TQDomDocument &Document, const KURL& url ) +{ + TQFile layoutFile( url.path() ); + + if (!layoutFile.exists()) + { + kdDebug() << "no such file: " << layoutFile.name() << endl; + return false; + } + + if (!layoutFile.open(IO_ReadOnly)) + return false; + + ///Check if document is well-formed + if (!Document.setContent(&layoutFile)) + { + kdDebug() << "wrong xml" << endl; + layoutFile.close(); + return false; + } + layoutFile.close(); + + return true; +} + +bool Glossary::isEmpty() const +{ + return m_itemlist.count() == 0; +} + + +Glossary* Glossary::readFromXML( const KURL& url, const TQString& path ) +{ + TQDomDocument doc( "document" ); + + Glossary *glossary = new Glossary(); + + glossary->setPicturePath( path ); + + if ( glossary->loadLayout( doc, url ) ) + { + TQValueList<GlossaryItem*> itemList; + itemList = glossary->readItems( doc ); + glossary->setItemlist( itemList ); + glossary->fixImagePath(); + } + + return glossary; +} + +void Glossary::fixImagePath() +{ + kdDebug() << "Glossary::fixImagePath()" << endl; + TQValueList<GlossaryItem*>::iterator it = m_itemlist.begin(); + const TQValueList<GlossaryItem*>::iterator itEnd = m_itemlist.end(); + TQString path = m_picturepath; + TQString firstpart = "<img src=\""; + firstpart += path; + + for ( ; it != itEnd ; ++it ) + { + ( *it )->setDesc( ( *it )->desc().replace("[img]", firstpart ) ); + ( *it )->setDesc( ( *it )->desc().replace("[/img]", "\" />" ) ); + } +} + +TQValueList<GlossaryItem*> Glossary::readItems( TQDomDocument &itemDocument ) +{ + TQValueList<GlossaryItem*> list; + + TQDomNodeList itemList; + TQDomNodeList refNodeList; + TQDomElement itemElement; + TQStringList reflist; + + itemList = itemDocument.elementsByTagName( "item" ); + + const uint num = itemList.count(); + for ( uint i = 0; i < num; ++i ) + { + reflist.clear(); + GlossaryItem *item = new GlossaryItem(); + + itemElement = ( const TQDomElement& ) itemList.item( i ).toElement(); + + TQDomNode nameNode = itemElement.namedItem( "name" ); + TQDomNode descNode = itemElement.namedItem( "desc" ); + + TQString picName = itemElement.namedItem( "picture" ).toElement().text(); + TQDomElement refNode = ( const TQDomElement& ) itemElement.namedItem( "references" ).toElement(); + + TQString desc = i18n( descNode.toElement().text().utf8() ); + if ( !picName.isEmpty() ) + desc.prepend("[img]"+picName +"[/img]" ); + + item->setName( i18n( nameNode.toElement( ).text().utf8() ) ); + + item->setDesc( desc.replace("[b]", "<b>" ) ); + item->setDesc( item->desc().replace("[/b]", "</b>" ) ); + item->setDesc( item->desc().replace("[i]", "<i>" ) ); + item->setDesc( item->desc().replace("[/i]", "</i>" ) ); + item->setDesc( item->desc().replace("[sub]", "<sub>" ) ); + item->setDesc( item->desc().replace("[/sub]", "</sub>" ) ); + item->setDesc( item->desc().replace("[sup]", "<sup>" ) ); + item->setDesc( item->desc().replace("[/sup]", "</sup>" ) ); + item->setDesc( item->desc().replace("[br]", "<br />" ) ); + + refNodeList = refNode.elementsByTagName( "refitem" ); + for ( uint it = 0; it < refNodeList.count(); it++ ) + { + reflist << i18n( refNodeList.item( it ).toElement().text().utf8() ); + } + reflist.sort(); + item->setRef( reflist ); + + list.append( item ); + } + + return list; +} + + + +GlossaryDialog::GlossaryDialog( bool folded, TQWidget *parent, const char *name) + : KDialogBase( Plain, i18n( "Glossary" ), Close, NoDefault, parent, name, false ) +{ + //this string will be used for all items. If a backgroundpicture should + //be used call Glossary::setBackgroundPicture(). + m_htmlbasestring = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><body>" ; + + m_folded = folded; + + TQVBoxLayout *vbox = new TQVBoxLayout( plainPage(), 0, KDialog::spacingHint() ); + vbox->activate(); + + TQHBoxLayout *hbox = new TQHBoxLayout( 0L, 0, KDialog::spacingHint() ); + hbox->activate(); + + TQToolButton *clear = new TQToolButton( plainPage() ); + clear->setIconSet( SmallIconSet( "locationbar_erase" ) ); + hbox->addWidget( clear ); + + TQLabel *lbl = new TQLabel( plainPage() ); + lbl->setText( i18n( "Search:" ) ); + hbox->addWidget( lbl ); + + m_search = new KListViewSearchLine( plainPage(), 0, "search-line" ); + hbox->addWidget( m_search ); + vbox->addLayout( hbox ); + setFocusProxy(m_search); + + TQSplitter *vs = new TQSplitter( plainPage() ); + vbox->addWidget( vs ); + + m_glosstree = new KListView( vs, "treeview" ); + m_glosstree->addColumn( "entries" ); + m_glosstree->header()->hide(); + m_glosstree->setFullWidth( true ); + m_glosstree->setRootIsDecorated( true ); + + m_search->setListView( m_glosstree ); + + m_htmlpart = new KHTMLPart( vs, "html-part" ); + + connect( m_htmlpart->browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, TQT_SLOT( displayItem( const KURL &, const KParts::URLArgs & ) ) ); + connect( m_glosstree, TQT_SIGNAL(clicked( TQListViewItem * )), this, TQT_SLOT(slotClicked( TQListViewItem * ))); + connect( clear, TQT_SIGNAL(clicked()), m_search, TQT_SLOT(clear())); + + resize( 600, 400 ); +} + +GlossaryDialog::~GlossaryDialog() +{ +} + +void GlossaryDialog::keyPressEvent(TQKeyEvent* e) +{ + if (e->key() == TQt::Key_Return) { + e->ignore(); + } + KDialogBase::keyPressEvent(e); +} + +void GlossaryDialog::displayItem( const KURL& url, const KParts::URLArgs& ) +{ + // using the "host" part of a kurl as reference + TQString myurl = url.host().lower(); + m_search->setText( "" ); + m_search->updateSearch( "" ); + TQListViewItem *found = 0; + TQListViewItemIterator it( m_glosstree ); + TQListViewItem *item; + while ( it.current() ) + { + item = it.current(); + if ( item->text(0).lower() == myurl ) + { + found = item; + break; + } + ++it; + } + if ( found ) + { + m_glosstree->ensureItemVisible( found ); + m_glosstree->setCurrentItem( found ); + slotClicked( found ); + } +} + +void GlossaryDialog::updateTree() +{ + m_glosstree->clear(); + + TQValueList<Glossary*>::const_iterator itGl = m_glossaries.begin(); + const TQValueList<Glossary*>::const_iterator itGlEnd = m_glossaries.end(); + + for ( ; itGl != itGlEnd ; ++itGl ) + { + TQValueList<GlossaryItem*> items = ( *itGl )->itemlist(); + TQValueList<GlossaryItem*>::iterator it = items.begin(); + const TQValueList<GlossaryItem*>::iterator itEnd = items.end(); + + TQListViewItem *main = new TQListViewItem( m_glosstree, ( *itGl )->name() ); + main->setExpandable( true ); + main->setSelectable( false ); + //XXX TMP!!! + bool foldinsubtrees = m_folded; + + for ( ; it != itEnd ; ++it ) + { + if ( foldinsubtrees ) + { + TQChar thisletter = ( *it )->name().upper()[0]; + TQListViewItem *thisletteritem = findTreeWithLetter( thisletter, main ); + if ( !thisletteritem ) + { + thisletteritem = new TQListViewItem( main, thisletter ); + thisletteritem->setExpandable( true ); + thisletteritem->setSelectable( false ); + } + new TQListViewItem( thisletteritem, ( *it )->name() ); + } + else + new TQListViewItem( main, ( *it )->name() ); + } + main->sort(); + } +} + +void GlossaryDialog::addGlossary( Glossary* newgloss ) +{ + if ( !newgloss ) return; + if ( newgloss->isEmpty() ) return; + m_glossaries.append( newgloss ); + + kdDebug() << "Count of the new glossary: " << newgloss->itemlist().count() << endl; + kdDebug() << "Number of glossaries: " << m_glossaries.count() << endl; + + updateTree(); +} + +TQListViewItem* GlossaryDialog::findTreeWithLetter( const TQChar& l, TQListViewItem* i ) +{ + TQListViewItem *it = i->firstChild(); + while ( it ) + { + if ( it->text(0)[0] == l ) + return it; + it = it->nextSibling(); + } + return 0; +} + +void GlossaryDialog::slotClicked( TQListViewItem *item ) +{ + if ( !item ) + return; + + /** + * The next lines are searching for the correct KnowledgeItem + * in the m_itemList. When it is found the HTML will be + * generated + */ + TQValueList<Glossary*>::iterator itGl = m_glossaries.begin(); + const TQValueList<Glossary*>::iterator itGlEnd = m_glossaries.end(); + bool found = false; + GlossaryItem *i = 0; + + TQString bg_picture; + + while ( !found && itGl != itGlEnd ) + { + TQValueList<GlossaryItem*> items = ( *itGl )->itemlist(); + TQValueList<GlossaryItem*>::const_iterator it = items.begin(); + const TQValueList<GlossaryItem*>::const_iterator itEnd = items.end(); + while ( !found && it != itEnd ) + { + if ( ( *it )->name() == item->text( 0 ) ) + { + i = *it; + bg_picture = ( *itGl )->backgroundPicture(); + found = true; + } + ++it; + } + ++itGl; + } + if ( found && i ) + { + TQString html; + if ( !bg_picture.isEmpty() ) + { + html = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><body background=\"" ; + html.append( bg_picture ); + html.append("\">"); + }else + html = m_htmlbasestring; + + html += i->toHtml() + "</body></html>"; + m_htmlpart->begin(); + m_htmlpart->write( html ); + + m_htmlpart->end(); + return; + } +} + +void GlossaryDialog::slotClose() +{ + emit closed(); + accept(); +} + +TQString GlossaryItem::toHtml() const +{ + TQString code = "<h1>" + m_name + "</h1>" + m_desc; + + if ( !m_ref.isEmpty() ) + { + TQString refcode = parseReferences(); + code += refcode; + } + return code; +} + +TQString GlossaryItem::parseReferences() const +{ + TQString htmlcode = "<h3>" + i18n( "References" ) + "</h3>"; + + bool first = true; + for ( uint i = 0; i < m_ref.size(); i++ ) + { + if ( !first ) + htmlcode += "<br>"; + else + first = false; + htmlcode += TQString( "<a href=\"item://%1\">%2</a>" ).tqarg( m_ref[i], m_ref[i] ); + } + + return htmlcode; +} + + +#include "tdeeduglossary.moc" diff --git a/libtdeedu/tdeeduui/tdeeduglossary.h b/libtdeedu/tdeeduui/tdeeduglossary.h new file mode 100644 index 00000000..e5d29ba0 --- /dev/null +++ b/libtdeedu/tdeeduui/tdeeduglossary.h @@ -0,0 +1,293 @@ +#ifndef KDEEDUGLOSSARY_H +#define KDEEDUGLOSSARY_H +/*************************************************************************** + + copyright : (C) 2005 by Carsten Niehaus + email : cniehaus@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * 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; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#include <khtml_part.h> +#include <kdialogbase.h> + +class TQChar; +class TQDomDocument; +class TQListViewItem; +class KListView; +class KListViewSearchLine; +class KActionCollection; +class GlossaryItem; + +/** + * @class Glossary + * @author Carsten Niehaus + * + * This class stores all items to be displayed. It also + * has access-methods to the items + */ +class Glossary +{ + public: + Glossary(); + virtual ~Glossary(); + + /** + * add the item @p item to the glossary + */ + void addItem( GlossaryItem* item ){ + m_itemlist.append( item ); + } + + TQValueList<GlossaryItem*> itemlist()const{ + return m_itemlist; + } + + /** + * clear the Glossary + */ + void clear(){ + m_itemlist.clear(); + } + + /** + * does this glossary have items? + */ + bool isEmpty() const; + + /** + * Every glossary can have a name. It will be + * set to @p name + */ + void setName( const TQString& name ){ + m_name = name; + } + + /** + * @returns the name of the glossary + */ + TQString name()const{ + return m_name; + } + + /** + * sets the internal list of items to @p list + */ + void setItemlist( TQValueList<GlossaryItem*> list ){ + m_itemlist = list; + } + + /** + * Read a glossary from an XML file. + * + * @param url The path of the file to load + * @param path The path of the pictures. Will be used as m_picturepath + * + * @return a pointer to the loaded glossary. Even in case of + * error, this won't return 0 but an empty Glossary. + */ + static Glossary* readFromXML( const KURL& url, const TQString& path = 0 ); + + /** + * Every glossaryitem can show pictures. [img src="foo.png] + * will look for the file foo.png in the path defined be + * @p path + */ + void setPicturePath( const TQString& path ){ + m_picturepath = path; + } + + TQString picturePath()const{ + return m_picturepath; + } + + /** + * defines which picture to use as the background + * of the htmlview. The dialog + * will use the file specifiec by the @p filename + */ + void setBackgroundPicture( const TQString& filename ){ + m_backgroundpicture = filename; + } + + /** + * @return the picuture used as the background in + * this background + */ + TQString backgroundPicture()const{ + return m_backgroundpicture; + } + + private: + /** + * This methods parses the given xml-code. It will extract + * the information of the items and return them as a + * TQValueList<GlossaryItem*> + */ + virtual TQValueList<GlossaryItem*> readItems( TQDomDocument &itemDocument ); + + TQString m_backgroundpicture; + + /** + * replaces the [img]-pseudocode with valid html. The path where + * the pictures are stored will be used for pictures + */ + void fixImagePath(); + + /** + * the path in which pictures of the glossary will be searched + */ + TQString m_picturepath; + + /** + * Load the tqlayout from an XML file. + * + * @param doc The TQDomDocument which will contain the read XML + * contents. + * @param url The path of the file to load + * + * @return a bool indicating whether the loading of the XML was + * successfull or not + */ + bool loadLayout( TQDomDocument& doc, const KURL& url ); + + TQValueList<GlossaryItem*> m_itemlist; + + /** + * the name of the glossary + */ + TQString m_name; +}; + +/** + * @class GlossaryItem + * @author Carsten Niehaus + * + * A GlossaryItem stores the information of the content of + * the item and its name. Furthermore, every item can have + * a number of pictures or references associated to it. + * These are stored as TQStringLists. + */ +class GlossaryItem +{ + public: + GlossaryItem(){} + ~GlossaryItem(){} + + void setName( const TQString& s ){ + m_name = s; + } + + void setDesc( const TQString& s){ + m_desc = s; + } + + void setRef( const TQStringList& s){ + m_ref = s; + } + + void setPictures( const TQString& s ){ + m_pic = s; + } + + TQString name() const { + return m_name; + } + + TQString desc() const { + return m_desc; + } + + TQStringList ref() const { + return m_ref; + } + + TQStringList pictures() const { + return m_pic; + } + + /** + * @return the formated HTML code for current item. + **/ + TQString toHtml() const; + + /** + * This method parses the references. + * @return the HTML code with the references as HTML links + */ + TQString parseReferences() const; + + private: + TQString m_name; + TQString m_desc; + TQStringList m_ref; + TQStringList m_pic; +}; + +/** + * @class GlossaryDialog + * @author Pino Toscano + * @author Carsten Niehaus + */ +class GlossaryDialog : public KDialogBase +{ + Q_OBJECT + TQ_OBJECT + + public: + GlossaryDialog( bool folded = true, TQWidget *parent=0, const char *name=0); + ~GlossaryDialog(); + + void keyPressEvent(TQKeyEvent*); + + /** + * add a new glossary + * + * @param newgloss the new glossary to add + */ + void addGlossary( Glossary* newgloss ); + + private: + TQValueList<Glossary*> m_glossaries; + + /** + * if true the items will be displayed folded + */ + bool m_folded; + + void updateTree(); + + KHTMLPart *m_htmlpart; + KListView *m_glosstree; + TQString m_htmlbasestring; + + KActionCollection* m_actionCollection; + + TQListViewItem* findTreeWithLetter( const TQChar&, TQListViewItem* ); + + KListViewSearchLine *m_search; + + private slots: + void slotClicked( TQListViewItem * ); + /** + * The user clicked on a href. Emit the corresponding item + */ + void displayItem( const KURL& url, const KParts::URLArgs& args ); + + protected slots: + virtual void slotClose(); + + signals: + void closed(); +}; + +#endif // KDEEDUGLOSSARY_H + diff --git a/libtdeedu/tdeeduui/tdeeduui.kdevprj b/libtdeedu/tdeeduui/tdeeduui.kdevprj new file mode 100644 index 00000000..1fa59784 --- /dev/null +++ b/libtdeedu/tdeeduui/tdeeduui.kdevprj @@ -0,0 +1,92 @@ +[./Makefile.am] +files=./tdeeduui.kdevprj, +sub_dirs= +type=normal + +[./tdeeduui.kdevprj] +dist=true +install=false +install_location= +type=DATA + +[Config for BinMakefileAm] +addcxxflags= +bin_program=tdeeduui +cflags= +cppflags= +cxxflags=\s-O0 +ldadd= +ldflags=\s \s +libtool_dir= +path_to_bin_program=. + +[General] +author=earnold +configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux\s +dir_where_make_will_be_called=\s +email=earnold@venus +kdevprj_version=1.3 +lfv_open_groups=Others +make_options=\s-j1 all\s +makefiles=./Makefile.am,Makefile.am,tests/Makefile.am +modifyMakefiles=false +project_name=tdeeduui +project_type=normal_empty +short_info= +sub_dir= +version=1.0 +version_control=CVS +workspace=1 + +[LFV Groups] +GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS, +Headers=*.h,*.hxx,*.hpp,*.H, +Others=*, +Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l, +Translations=*.ts,*.po, +User Interface=*.ui,*.kdevdlg,*.rc, +groups=Headers,Sources,GNU,Translations,User Interface,Others + +[Makefile.am] +dist=true +files=Makefile.am,kedusimpleentrydlg.h,kedusimpleentrydlgForm.ui,kedusimpleentrydlg.cpp +install=false +install_location= +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=. +sub_dirs=tests +type=static_library + +[kedusimpleentrydlg.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[kedusimpleentrydlg.h] +dist=true +install=false +install_location= +type=HEADER + +[kedusimpleentrydlgForm.ui] +dist=true +install=false +install_location= +type=SOURCE + +[tests/Makefile.am] +dist=true +files=tests/entrydialogs.cpp,tests/Makefile.am +install=false +install_location= +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=tests +sub_dirs= +type=DATA + +[tests/entrydialogs.cpp] +dist=true +install=false +install_location= +type=SOURCE diff --git a/libtdeedu/tdeeduui/tests/Makefile.am b/libtdeedu/tdeeduui/tests/Makefile.am new file mode 100644 index 00000000..6fcb251b --- /dev/null +++ b/libtdeedu/tdeeduui/tests/Makefile.am @@ -0,0 +1,11 @@ +SUBDIRS = . +INCLUDES = -I. -I$(top_srcdir)/tdeeduui $(all_includes) + +check_PROGRAMS = entrydialogs + +#all: check + +entrydialogs_SOURCES = entrydialogs.cpp +entrydialogs_LDADD = ../libtdeeduui.la +entrydialogs_LDFLAGS = $(all_libraries) + diff --git a/libtdeedu/tdeeduui/tests/entrydialogs.cpp b/libtdeedu/tdeeduui/tests/entrydialogs.cpp new file mode 100644 index 00000000..781b32e1 --- /dev/null +++ b/libtdeedu/tdeeduui/tests/entrydialogs.cpp @@ -0,0 +1,6 @@ + +int main() +{ + + return 0; +}
\ No newline at end of file |