• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • TDevelop Interfaces Library
 

TDevelop Interfaces Library

Signals | Public Member Functions | List of all members
KDevPartController Class Referenceabstract

#include <kdevpartcontroller.h>

Inherits PartManager.

Signals

void savedFile (const KURL &)
 
void loadedFile (const KURL &)
 
void closedFile (const KURL &)
 
void fileDirty (const KURL &)
 
void partURLChanged (KParts::ReadOnlyPart *)
 
void documentChangedState (const KURL &, DocumentState)
 

Public Member Functions

 KDevPartController (TQWidget *parent)
 
virtual void setEncoding (const TQString &encoding)=0
 
virtual void editDocument (const KURL &url, int lineNum=-1, int col=-1)=0
 
virtual void splitCurrentDocument (const KURL &url, int lineNum=-1, int col=-1)=0
 
virtual void scrollToLineColumn (const KURL &url, int lineNum=-1, int col=-1, bool storeHistory=false)=0
 
virtual void showDocument (const KURL &url, bool newWin=false)=0
 
virtual void showPart (KParts::Part *part, const TQString &name, const TQString &shortDescription)=0
 
virtual KParts::ReadOnlyPart * partForURL (const KURL &url)=0
 
virtual KParts::Part * partForWidget (const TQWidget *widget)=0
 
virtual KURL::List openURLs ()=0
 
virtual bool saveAllFiles ()=0
 
virtual bool saveFiles (const KURL::List &list)=0
 
virtual void revertAllFiles ()=0
 
virtual void revertFiles (const KURL::List &list)=0
 
virtual bool closeAllFiles ()=0
 
virtual bool closeFiles (const KURL::List &list)=0
 
virtual bool closePart (KParts::Part *part)=0
 
virtual void activatePart (KParts::Part *part)=0
 
virtual DocumentState documentState (KURL const &url)=0
 

Detailed Description

Interface to control loaded parts and other documents.

Part controller works with embedded into the shell parts. Such parts are usually editors, GUI designers, etc.

Definition at line 56 of file kdevpartcontroller.h.

Constructor & Destructor Documentation

◆ KDevPartController()

KDevPartController::KDevPartController ( TQWidget *  parent)

Constructor.

Parameters
parentThe parent object.

Definition at line 23 of file kdevpartcontroller.cpp.

Member Function Documentation

◆ activatePart()

virtual void KDevPartController::activatePart ( KParts::Part *  part)
pure virtual

Activate this part.

Parameters
partThe part to activate.

◆ closeAllFiles()

virtual bool KDevPartController::closeAllFiles ( )
pure virtual

Closes all open files.

◆ closedFile

void KDevPartController::closedFile ( const KURL &  )
signal

Emitted when a document has been closed.

◆ closeFiles()

virtual bool KDevPartController::closeFiles ( const KURL::List &  list)
pure virtual

Closes a list of files.

Parameters
listThe list of URLs for the files to close.

◆ closePart()

virtual bool KDevPartController::closePart ( KParts::Part *  part)
pure virtual

Closes this part (closes the window/tab for this part).

Parameters
partThe part to close.
Returns
true if the part was sucessfuly closed.

◆ documentChangedState

void KDevPartController::documentChangedState ( const KURL &  ,
DocumentState   
)
signal

This is emitted when the document changes, either internally or on disc.

◆ documentState()

virtual DocumentState KDevPartController::documentState ( KURL const &  url)
pure virtual

Checks the state of a document.

Parameters
urlThe URL to check.
Returns
The DocumentState enum corresponding to the document state.

◆ editDocument()

virtual void KDevPartController::editDocument ( const KURL &  url,
int  lineNum = -1,
int  col = -1 
)
pure virtual

Opens a new or existing document.

Parameters
urlThe URL of the document to open.
lineNumThe line number to place the cursor at, if applicable.
colThe column number to place the cursor at, if applicable.

◆ fileDirty

void KDevPartController::fileDirty ( const KURL &  )
signal

Emitted when a file has been modified outside of KDevelop.

◆ loadedFile

void KDevPartController::loadedFile ( const KURL &  )
signal

Emitted when a document has been loaded.

◆ openURLs()

virtual KURL::List KDevPartController::openURLs ( )
pure virtual
Returns
The list of open documents

◆ partForURL()

virtual KParts::ReadOnlyPart* KDevPartController::partForURL ( const KURL &  url)
pure virtual

Finds the embedded part corresponding to a given URL.

Parameters
urlThe URL of the document.
Returns
The corresponding part, 0 if not found.

◆ partForWidget()

virtual KParts::Part* KDevPartController::partForWidget ( const TQWidget *  widget)
pure virtual

Finds the embedded part corresponding to a given main widget.

Parameters
widgetThe parts main widget.
Returns
The corresponding part, 0 if not found.

◆ partURLChanged

void KDevPartController::partURLChanged ( KParts::ReadOnlyPart *  )
signal

This is typically emitted when an editorpart does "save as" which will change the part's URL.

◆ revertAllFiles()

virtual void KDevPartController::revertAllFiles ( )
pure virtual

Reloads all open files.

◆ revertFiles()

virtual void KDevPartController::revertFiles ( const KURL::List &  list)
pure virtual

Reloads a list of files.

Parameters
listThe list of URLs to reload.

◆ saveAllFiles()

virtual bool KDevPartController::saveAllFiles ( )
pure virtual

Saves all open files.

Returns
false if it was cancelled by the user, true otherwise

◆ savedFile

void KDevPartController::savedFile ( const KURL &  )
signal

Emitted when a document has been saved.

◆ saveFiles()

virtual bool KDevPartController::saveFiles ( const KURL::List &  list)
pure virtual

Saves a list of files.

Parameters
listThe list of URLs to save.
Returns
false if it was cancelled by the user, true otherwise

◆ scrollToLineColumn()

virtual void KDevPartController::scrollToLineColumn ( const KURL &  url,
int  lineNum = -1,
int  col = -1,
bool  storeHistory = false 
)
pure virtual

Scrolls the viewport of the already opened document to the specified line and column if applicable, but does not give focus to the document.

Parameters
urlThe URL of the already opened document.
lineNumThe line number to place the cursor at, if applicable.
colThe column number to place the cursor at, if applicable.

◆ setEncoding()

virtual void KDevPartController::setEncoding ( const TQString &  encoding)
pure virtual

Call this before a call to editDocument to set the encoding of the document to be opened.

Parameters
encodingThe encoding to open as.

◆ showDocument()

virtual void KDevPartController::showDocument ( const KURL &  url,
bool  newWin = false 
)
pure virtual

Shows a HTML document in the documentation viewer.

Parameters
urlThe URL of the document to view.
newWinIf true, the new window will be created instead of using current.

◆ showPart()

virtual void KDevPartController::showPart ( KParts::Part *  part,
const TQString &  name,
const TQString &  shortDescription 
)
pure virtual

Embeds a part into the main area of the mainwindow.

Parameters
partThe part to embed.
nameThe name of the part.
shortDescriptionCurrently not used.

◆ splitCurrentDocument()

virtual void KDevPartController::splitCurrentDocument ( const KURL &  url,
int  lineNum = -1,
int  col = -1 
)
pure virtual

Opens a new or existing document by splitting the view with the current, if applicable.

Offers split views of source code and header files for instance.

Parameters
urlThe URL of the document to open.
lineNumThe line number to place the cursor at, if applicable.
colThe column number to place the cursor at, if applicable.

The documentation for this class was generated from the following files:
  • kdevpartcontroller.h
  • kdevpartcontroller.cpp

TDevelop Interfaces Library

Skip menu "TDevelop Interfaces Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

TDevelop Interfaces Library

Skip menu "TDevelop Interfaces Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for TDevelop Interfaces Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.