#include <kdevpartcontroller.h>
Inherits PartManager.
|
| 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 |
|
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.
◆ KDevPartController()
KDevPartController::KDevPartController |
( |
TQWidget * |
parent | ) |
|
◆ activatePart()
virtual void KDevPartController::activatePart |
( |
KParts::Part * |
part | ) |
|
|
pure virtual |
Activate this part.
- Parameters
-
part | The part to activate. |
◆ closeAllFiles()
virtual bool KDevPartController::closeAllFiles |
( |
| ) |
|
|
pure virtual |
◆ 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
-
list | The 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
-
- 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
-
- 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
-
url | The URL of the document to open. |
lineNum | The line number to place the cursor at, if applicable. |
col | The 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
-
url | The 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
-
widget | The 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 |
◆ revertFiles()
virtual void KDevPartController::revertFiles |
( |
const KURL::List & |
list | ) |
|
|
pure virtual |
Reloads a list of files.
- Parameters
-
list | The 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
-
list | The 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
-
url | The URL of the already opened document. |
lineNum | The line number to place the cursor at, if applicable. |
col | The 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
-
encoding | The 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
-
url | The URL of the document to view. |
newWin | If 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
-
part | The part to embed. |
name | The name of the part. |
shortDescription | Currently 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
-
url | The URL of the document to open. |
lineNum | The line number to place the cursor at, if applicable. |
col | The column number to place the cursor at, if applicable. |
The documentation for this class was generated from the following files: