namespace KTextEditor

This is the kparts interface classes for text editors. More...

List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types


Detailed Description

This is the kparts interface classes for text editors. The text editors use the Document/View model that allows multiple views into one file (Document)

Line numbers passed via this interface must begin at line number zero (0).

TODO: See documentation at http://??????? for information on how to use kparts in general. A simple (but sufficient) implementation is shown below.


 QHBoxLayout *layout = new QHBoxLayout(this);
 QSplitter *fixme = new QSplitter(this);

 KTrader::OfferList offers = KTrader::self()->query( "KTextEditor/Document" );
 assert( offers.count() >= 1 );
 KService::Ptr service = *offers.begin();
 KLibFactory *factory = KLibLoader::self()->factory( service->library() );
 assert( factory );
 m_part = static_cast<KTextEditor::Document *>(
 						factory->create( this, 0, "KTextEditor::Document" ) );
 assert( m_part );
 m_part->createView( fixme, 0 );
 layout->addWidget(fixme);
 m_part->setText( "" );

You may also be able to use a dynamic_cast for the document part above (depending on compliation of the library used)

Document (class)

Document

View (class)

View

The View class encapsulates a single view into the document.


Generated by: dfaure on kde.faure.org on Thu Jan 17 22:20:11 2002, using kdoc 2.0a53.