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

TDevelop Interfaces Library

  • lib
  • interfaces
kdevpartcontroller.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 2002 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
3 Copyright (C) 2002 Bernd Gehrmann <bernd@kdevelop.org>
4 Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org>
5 Copyright (C) 2003 Hamish Rodda <rodda@kde.org>
6 Copyright (C) 2003 Harald Fernengel <harry@kdevelop.org>
7 Copyright (C) 2003 Jens Dagerbo <jens.dagerbo@swipnet.se>
8 Copyright (C) 2004 Alexander Dymo <adymo@kdevelop.org>
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Library General Public
12 License as published by the Free Software Foundation; either
13 version 2 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Library General Public License for more details.
19
20 You should have received a copy of the GNU Library General Public License
21 along with this library; see the file COPYING.LIB. If not, write to
22 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301, USA.
24*/
25#ifndef KDEV_PARTCONTROLLER_H
26#define KDEV_PARTCONTROLLER_H
27
28#include <kurl.h>
29#include <tdeparts/partmanager.h>
30#include <ktrader.h>
31
37namespace KParts
38{
39 class ReadOnlyPart;
40}
41
43enum DocumentState
44{
45 Clean,
46 Modified,
47 Dirty,
48 DirtyAndModified
49};
50
56class KDevPartController: public KParts::PartManager
57{
58 TQ_OBJECT
59
60
61public:
64 KDevPartController(TQWidget *parent);
65
69 virtual void setEncoding(const TQString &encoding) = 0;
70
75 virtual void editDocument(const KURL &url, int lineNum=-1, int col=-1) = 0;
76
82 virtual void splitCurrentDocument(const KURL &url, int lineNum=-1, int col=-1) = 0;
83
89 virtual void scrollToLineColumn(const KURL &url, int lineNum=-1, int col=-1, bool storeHistory = false ) = 0;
90
94 virtual void showDocument(const KURL &url, bool newWin = false) = 0;
95
100 virtual void showPart(KParts::Part* part, const TQString& name, const TQString& shortDescription ) = 0;
101
105 virtual KParts::ReadOnlyPart *partForURL(const KURL & url) = 0;
106
110 virtual KParts::Part *partForWidget(const TQWidget *widget) = 0;
111
113 virtual KURL::List openURLs() = 0;
114
117 virtual bool saveAllFiles() = 0;
118
122 virtual bool saveFiles(const KURL::List &list) = 0;
123
125 virtual void revertAllFiles() = 0;
126
129 virtual void revertFiles(const KURL::List &list) = 0;
130
132 virtual bool closeAllFiles() = 0;
133
136 virtual bool closeFiles(const KURL::List &list) = 0;
137
141 virtual bool closePart(KParts::Part *part) = 0;
142
145 virtual void activatePart( KParts::Part * part ) = 0;
146
150 virtual DocumentState documentState( KURL const & url ) = 0;
151
152signals:
153
155 void savedFile(const KURL &);
156
158 void loadedFile(const KURL &);
159
161 void closedFile(const KURL &);
162
164 void fileDirty(const KURL &);
165
168 void partURLChanged(KParts::ReadOnlyPart *);
169
172 void documentChangedState(const KURL &, DocumentState);
173
174};
175
176#endif
KDevPartController
Interface to control loaded parts and other documents.
Definition kdevpartcontroller.h:57
KDevPartController::closedFile
void closedFile(const KURL &)
Emitted when a document has been closed.
KDevPartController::showPart
virtual void showPart(KParts::Part *part, const TQString &name, const TQString &shortDescription)=0
Embeds a part into the main area of the mainwindow.
KDevPartController::scrollToLineColumn
virtual void scrollToLineColumn(const KURL &url, int lineNum=-1, int col=-1, bool storeHistory=false)=0
Scrolls the viewport of the already opened document to the specified line and column if applicable,...
KDevPartController::documentState
virtual DocumentState documentState(KURL const &url)=0
Checks the state of a document.
KDevPartController::showDocument
virtual void showDocument(const KURL &url, bool newWin=false)=0
Shows a HTML document in the documentation viewer.
KDevPartController::partURLChanged
void partURLChanged(KParts::ReadOnlyPart *)
This is typically emitted when an editorpart does "save as" which will change the part's URL.
KDevPartController::closePart
virtual bool closePart(KParts::Part *part)=0
Closes this part (closes the window/tab for this part).
KDevPartController::openURLs
virtual KURL::List openURLs()=0
KDevPartController::setEncoding
virtual void setEncoding(const TQString &encoding)=0
Call this before a call to editDocument to set the encoding of the document to be opened.
KDevPartController::editDocument
virtual void editDocument(const KURL &url, int lineNum=-1, int col=-1)=0
Opens a new or existing document.
KDevPartController::closeAllFiles
virtual bool closeAllFiles()=0
Closes all open files.
KDevPartController::closeFiles
virtual bool closeFiles(const KURL::List &list)=0
Closes a list of files.
KDevPartController::partForURL
virtual KParts::ReadOnlyPart * partForURL(const KURL &url)=0
Finds the embedded part corresponding to a given URL.
KDevPartController::revertAllFiles
virtual void revertAllFiles()=0
Reloads all open files.
KDevPartController::splitCurrentDocument
virtual void splitCurrentDocument(const KURL &url, int lineNum=-1, int col=-1)=0
Opens a new or existing document by splitting the view with the current, if applicable.
KDevPartController::saveAllFiles
virtual bool saveAllFiles()=0
Saves all open files.
KDevPartController::documentChangedState
void documentChangedState(const KURL &, DocumentState)
This is emitted when the document changes, either internally or on disc.
KDevPartController::partForWidget
virtual KParts::Part * partForWidget(const TQWidget *widget)=0
Finds the embedded part corresponding to a given main widget.
KDevPartController::loadedFile
void loadedFile(const KURL &)
Emitted when a document has been loaded.
KDevPartController::saveFiles
virtual bool saveFiles(const KURL::List &list)=0
Saves a list of files.
KDevPartController::savedFile
void savedFile(const KURL &)
Emitted when a document has been saved.
KDevPartController::activatePart
virtual void activatePart(KParts::Part *part)=0
Activate this part.
KDevPartController::revertFiles
virtual void revertFiles(const KURL::List &list)=0
Reloads a list of files.
KDevPartController::fileDirty
void fileDirty(const KURL &)
Emitted when a file has been modified outside of KDevelop.
DocumentState
DocumentState
Document state enum.
Definition kdevpartcontroller.h:44
Modified
@ Modified
Document is modified inside a shell.
Definition kdevpartcontroller.h:46
Dirty
@ Dirty
Document is modified by an external process.
Definition kdevpartcontroller.h:47
Clean
@ Clean
Document is not touched.
Definition kdevpartcontroller.h:45
DirtyAndModified
@ DirtyAndModified
Document is modified inside a shell and at the same time by an external process.
Definition kdevpartcontroller.h:48

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.9.8
This website is maintained by Timothy Pearson.