Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

KTextEditor Namespace Reference


Classes

class  View
class  Document


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)


Generated on Sat Nov 5 17:59:04 2005 for OPIE by  doxygen 1.4.2